Repository navigation
fix(items): a keyed create claims its key before the plan-limit check (TASK-3585) - #2088
Merged
Merged
Conversation
… (TASK-3585) Retro CONVE-735 finding on #2065. handleCreateItem enforced the workspace item limit before claiming the idempotency key, so a create that succeeded AT the limit and lost its answer could not replay: its retry met the limit its own success had reached. The claim now comes first; the request is not modified in between, so the key's hash is unchanged, and every refusal after it (the limit included) still releases the key. Claude-Session: https://claude.ai/code/session_01Q9WssCjFuHjSfLABoW4tmS
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.
Retro CONVE-735 finding on #2065 (TASK-3585).
handleCreateItemenforced the workspace item limit before claiming the idempotency key. A create that succeeded AT the limit and lost its answer could therefore not replay: its retry met the limit its own success had reached.Fix
Tests
TestTASK3585_CreateAtTheLimitReplays: with the cap set to live + 1, the keyed create that reaches the cap replays on retry. The control: a NEW key at the cap is still refused. Red with the limit check moved back ahead of the claim.internal/server+internal/store+ lint are still running locally; CI runs the same packages.Codex: CLEAN at fedeb08 (gpt-6-luna).
https://claude.ai/code/session_01Q9WssCjFuHjSfLABoW4tmS