Repository navigation
fleet-queue: file no second live task for the same work (#10627) - #11802
Merged
Merged
Conversation
Enqueue now computes the packet's work identity: repo, issue and kind family (small_fix, triage, or pr_shepherd per PR set). When a live task in any queue already holds that identity, no row is filed; the reply carries the holding task like a dedupe_key hit, plus a work_identity_collision naming its id, state and identity, and the CLI says the work is already queued. Terminal tasks never block a filing, so re-queue after failure is unchanged. ci_investigation and second_pass recur by design and take no part; a packet can declare dedupe_exempt: true, or file a deliberate parallel with dedupe_override: "<reason>", recorded as a dedupe_override event. A quarantined (invalid, blocked) row never absorbs a filing, so a repaired packet still files. Refs #10627 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dezren39
marked this pull request as ready for review
November 18, 2026 12:19
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 29 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Before: enqueue only deduped on
(queue, dedupe_key). A generator that keyed the same work differently, or filed it into another stream, created a second live task for the same issue. The 2026-11-16 measurement counted 155 sibling_done completions in a week and 86 same-issue pairs with overlapping claim windows.After: enqueue also checks the packet's work identity. If a live task in any queue already holds it, nothing is filed. The reply returns the holding task, as a dedupe_key hit does, plus a
work_identity_collisionobject naming its id, state, queue and identity. The CLI prints "work already queued: existing task N …".How:
turso_queue/work_identity.rs: identity is(repo, issue, kind family). Families are small_fix →fix,triage, andpr_shepherdkeyed per sorted PR set, so the Unowned PR batch from branch disposition (2026-11-07) #7297 shepherd hub's per-PR tasks stay separate.ci_investigationandsecond_passrecur by design and take no part.verb_enqueueafter the dedupe_key check and before the insert. Live means queued, claimed, parked, handed_off or blocked. A blocked row whose packet fails the claim guard (a repo-queue: claim can hand out a payload-null task, and list views cannot recover a live claim by lane #5444 quarantine) never absorbs a filing, so a repaired packet still files.payload.dedupe_exempt: truefor a recurring kind, andpayload.dedupe_override: "<reason>"for a deliberate parallel, which files and records adedupe_overrideevent on the new task.Tests:
cargo test -p fleet-queue --all-features --lib(443 pass), including identity shapes, shepherd PR sets, exempt kinds, quarantined and terminal rows, the override reason, the collision shape, and a source-order check that the identity check sits between the dedupe_key check and the insert.Not covered: acceptance 5 (the 7-day trend after deploy) and a one-time sweep of duplicates already queued.
Refs #10627
Generated by Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.