Flag Subscribe and EnableCardColumnOnHold as naturally idempotent - #514
Merged
Merged
Conversation
Both POSTs are set-membership operations: subscribing an already- subscribed user and enabling an already-enabled on-hold section are server-side no-ops, so a retried request cannot duplicate anything. That is the same contract CompleteTodo/PauseQuestion/SubscribeToCardColumn already carry, and BC3's controllers confirm it (#480). @basecampIdempotent(natural: true) in the Smithy spec flows through regeneration to all six SDKs: behavior-model idempotent: true, the five metadata emitters, and Go's doWithRetry call sites. The parity gate's source-of-truth counts move 69->71 idempotent, 186->188 idempotent-or- readonly. maxAttempts stays 2 — whether these belong at 3 is #479's question, not this change. Closes #480.
SPEC.md's ceiling narrative, Swift divergence note, and Appendix E move to the new totals; SECURITY.md's retry-behavior section names the five flagged POSTs. Also corrects two pre-existing count drifts the sweep surfaced: 183->182 ops at max 3 and 187->186 (now 188) retry-eligible — both had been off by one since the per-op ceiling landed.
Mirrors the CompleteTodo case — mock [503, 200-with-subscription], assert two requests and no error. Dispatch branches added to the Go, TypeScript, Python, and Kotlin runners; Ruby skips it with the standard GET-only-retry reason.
Member
Author
|
Copilot errored on both review attempts (service-side; same pattern on cli#62 today). All required checks green; full local |
This was referenced Jul 31, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
#480:
SubscribeandEnableCardColumnOnHoldare set-membership POSTs — subscribing an already-subscribed user and enabling an already-enabled on-hold section are server-side no-ops — so a retried request cannot duplicate anything. They carry the same contract as the already-flaggedCompleteTodo/PauseQuestion/SubscribeToCardColumnbut were never flagged, leaving them un-retried in every SDK for no reason.What
@basecampIdempotent(natural: true)on both operations in the Smithy spec; fullmake generateflows it through behavior-model.json (idempotent: true), all five metadata emitters, and Go'sdoWithRetrycall-site booleans.maxAttemptsstays 2 — whether these belong at 3 is Retry metadata fidelity: Go and Python ignore per-operation retry_on and max_attempts #479's question, deliberately untouched.Subscribemocked[503, 200]must make 2 requests — mirrors the CompleteTodo case; dispatch branches in the Go/TS/Python/Kotlin runners, Ruby skip-list entry (GET-only retry).Verification
Full
makegreen locally (exit 0). Conformance: Go/Kotlin/Python printPASS: Subscribe POST retries when marked idempotent, RubySKIP (Ruby SDK only retries GET), TS suite 118 passed (unknown-op dispatch throws there, so the case demonstrably ran).Behavior change: these two POSTs now retry on 429/503 (and network errors in Go/Python/Swift) — bundled ahead of v0.11.0 so the release carries all retry-contract changes at once.
Closes #480.
Summary by cubic
Marks Subscribe and EnableCardColumnOnHold as naturally idempotent so SDKs safely retry these POSTs on transient errors. Aligns behavior with existing idempotent POSTs and closes #480.
@basecampIdempotent(natural: true)in the Smithy spec; regeneration updates all SDK metadata and GodoWithRetrycall sites.Written for commit c5e91ab. Summary will update on new commits.