Repository navigation
Preserve pending debounce ownership during job recovery - #231
Merged
Merged
Conversation
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.
After an interrupted job, startup recovery can requeue it while a newer pending job already owns the same queue/debounce key. Persisting the recovered record then violates the partial unique index and prevents the bot from starting.
Keep the newer pending job as the coalescing target and clear the conflicting debounce key only on the recovered record. Preserve both jobs, their payloads, lane keys, and checkpoints. Apply the same reset to orphan startup recovery, general startup requeue, and expired-processing recovery. Uncontested keys remain unchanged; agent processing runs retain their existing resume behavior.
Validation: regression reproduced before the fix; all three recovery paths now retain and dequeue both requests in order. A second case verifies that the same key in another queue does not cause detachment. Workspace/all-target tests: 2,475 passed, 10 ignored. Formatting and workspace/all-target Clippy with warnings denied passed.