Repository navigation
Closed
Labels
app/fleetpkgs/fleet multicall binary + platform cratespkgs/fleet multicall binary + platform crateskind/bugSomething isn't working (prefixed form of the classic bug label)Something isn't working (prefixed form of the classic bug label)priority/lowNice to have; do when convenientNice to have; do when convenientstatus/donestatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted testsQueue packet kind: bounded fix with reproduction and targeted tests
Description
Problem (follow-up fix for triaged issue #6660)
In the GitHub-native queue fallback mode (pkgs/fleet/crates/fleet-queue/src/fallback.rs), a contested claim never expires: once a second worker's claim marker lands while a claim is live, the issue is permanently bricked in fallback mode unless the original holder releases it. Verified against main @207e61203b790c525edebd84c906b34df617e741 during triage of issue #6660 (see that issue for the full probe evidence):
fold_claimreturnsClaimState::Contestedwhenever a contest was recorded and a holder exists (fallback.rs:448-455) — before and regardless of the lease-age check that follows it. Lease expiry never applies to a contested issue.cmd_claimrefuses a contested issue (reason: "contested", exit 5, fallback.rs:888), so the fold's clean-supersede arm can never fire once a contest exists.cmd_heartbeatrefuses a contested issue too (fallback.rs:970), so even a live holder cannot renew after a stray claim from a since-dead challenger.cmd_releasehas no contested check (it matches onstate.holder()), so a holder release is the only exit — and if the holder is the dead worker, nobody can ever claim the issue through the tool again. A challenger's release does not clear the contest either (the fold's Release arm only acts when the releaser is the holder).
Fix direction
- In
fold_claim, a contest should expire with the lease: when the holder's last activity (and the contest) are older than the lease window, the contested state folds to stale/claimable like any other silent claim — a new claim then cleanly supersedes. - A heartbeat from the holder while contested should be accepted (it proves the holder is alive); consider clearing or aging the contest once the challenger has been silent for a full lease window.
- Keep the within-lease behavior unchanged: a live contest inside the lease window stays hands-off.
Acceptance criteria
- New fold tests: contest folded after lease expiry (both workers silent ~100 leases) is claimable/stale, not contested (issue fleet-queue(fallback): a contested claim never expires — the fold ignores the lease, the holder cannot heartbeat, and a dead holder bricks the issue for the whole outage #6660 Case 1).
- New fold test: holder heartbeats after a contest keep the claim live/renewable (issue fleet-queue(fallback): a contested claim never expires — the fold ignores the lease, the holder cannot heartbeat, and a dead holder bricks the issue for the whole outage #6660 Case 2), and the heartbeat verb no longer refuses a contested issue for the holder.
- New fold test: challenger release + lease expiry leaves the issue claimable (issue fleet-queue(fallback): a contested claim never expires — the fold ignores the lease, the holder cannot heartbeat, and a dead holder bricks the issue for the whole outage #6660 Case 3).
- Existing test
fold_stale_supersede_and_live_conteststill passes (within-lease contest stays contested). -
doc/fleet/queue-fallback-mode.mdupdated if the contested semantics text changes.
Origin: triage of issue #6660 by repo-worker-code lane code-y (fallback mode, 2026-11-06).
Metadata
Metadata
Assignees
Labels
app/fleetpkgs/fleet multicall binary + platform cratespkgs/fleet multicall binary + platform crateskind/bugSomething isn't working (prefixed form of the classic bug label)Something isn't working (prefixed form of the classic bug label)priority/lowNice to have; do when convenientNice to have; do when convenientstatus/donestatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted testsQueue packet kind: bounded fix with reproduction and targeted tests
Activity
developing-today commentedon Nov 7, 2026
CODE-2065
dezren39 commentedon Nov 7, 2026
Picked up by repo-worker-code-z (lane code-z, repo-queue-worker-shift-z) in FALLBACK MODE (queue backend down: PostgREST PGRST002 503 on fleet queue health/claim). Working issue #6668 per repo-queue worker instruction §0a: contested claim should expire with the lease in pkgs/fleet/crates/fleet-queue/src/fallback.rs.
🤖 Agent note · picked up
dezren39 commentedon Nov 7, 2026
Checkpoint: branch_created — worktree ~/git/fleet/6668-contested-lease on laptop, branch queue/fallback-6668-contested-lease from origin/main 207e612. Next: read fold_claim / cmd_claim / cmd_heartbeat in fallback.rs and implement.
dezren39 commentedon Nov 7, 2026
Checkpoint: implementation_complete — fold_claim contest now ages out one lease after the contest lands (fall-through to holder activity: live if holder heartbeated, stale/claimable if silent); challenger release clears the contest in the fold; cmd_heartbeat no longer refuses the holder on a contested issue (consistent with cmd_release); module/fn/doc comments + doc/fleet/queue-fallback-mode.md updated; 3 new fold tests (ages-out, holder-heartbeats-stay-live, challenger-release-clears). Next: cargo test for fleet-queue on the laptop, then push + PR.
26 remaining items
dezren39 commentedon Nov 10, 2026
agent-note:v1
lane: code-v
task: 13710
issue: #6668
stage: handed_off
Lane code-v claimed task 13710. Fresh check: issue #6668 is OPEN, labels include status/parked, queue/parked, work/assigned — no held / user/owned / do-not-merge / do-not-auto-edit labels, and no status/needs-triage label. Execution lane assignment is opencode (lane row 5827). Handing off to the opencode claimant: scheduled shift is time-bounded; claimant is the persistent execution session. Parked 1200s for claimant launch.
next: claimant launches the bound opencode session
dezren39 commentedon Nov 10, 2026
🤖 Agent note · handed off
opencode(lane row 5827)dezren39 commentedon Nov 10, 2026
Agent note — task 13710 handed off to opencode claimant, lane code-v
opencode.status/needs-triage.handed_offwith reason "scheduled shift is time-bounded; claimant is the persistent execution session" (Rule 4, Queue/lane design rules: no by-id blocking by default, optional platform selector, triage separate from fixes #8097), and parked task 13710 for 1200s so the claim does not evaporate while the claimant launches the bound opencode session.dezren39 commentedon Nov 11, 2026
state: done
task: 13710
lane: any-b
worker: repo-worker-code
Triage/fix verification for #6668 — already fixed and merged; closing with evidence:
pkgs/fleet/crates/fleet-queue/src/fallback.rscarries the new semantics in its module docs (a contest is not permanent: it ages out one lease window after the challenger's last activity; a challenger release clears that challenger's contest; holder heartbeats stay live) and infold_claim.fold_contest_ages_out_with_the_lease(Case 1),fold_contest_holder_heartbeats_stay_live(Case 2),fold_contest_challenger_release_clears(Case 3), plus the preserved within-lease guardfold_stale_supersede_and_live_contestandfold_contest_repeat_claim_refreshes_and_multi_challenger.Closing #6668 as completed; task 13710 completes with outcome already_done.