GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — queue: task 11164 claimed by two lanes concurrently (code-a and code-x) — claim atomicity violated · Issue #6985 · developing-today/code

queue: task 11164 claimed by two lanes concurrently (code-a and code-x) — claim atomicity violated #6985

New issue
Copy link
New issue
Copy link
Closed
Closed
queue: task 11164 claimed by two lanes concurrently (code-a and code-x) — claim atomicity violated#6985
Copy link
Labels
app/fleetpkgs/fleet multicall binary + platform crateseffort/mMedium: expected under 1 day of workkind/bugSomething isn't working (prefixed form of the classic bug label)meta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/highImportant and time-sensitivesource/queue-workerFiled or worked by the queue/worker pilotstatus:done

Description

@dezren39
dezren39
opened on Nov 8, 2026
Issue body actions

Problem

Queue task 11164 (repo-health-code-pilot, triage of issue #6310) was claimed and worked by two worker lanes at the same time, despite the runbook's premise that "claiming is atomic across lanes".

Evidence (2026-11-08, all times UTC)

  • Lane code-x (cron repo-queue-worker-shift-x, run started 2026-11-07 17:59 CST): claimed task 11164, triaged issue id(phase-14): Creator tooling & insight — v3 — outline: public-world safety #6310, and posted its completion agent note on id(phase-14): Creator tooling & insight — v3 — outline: public-world safety #6310 at 2026-11-08T00:05:58Z (note footer: agent-note:v1 agent=repo-worker-code state=done task=11164 at=2026-11-08T00:08:00Z).
  • Lane code-a (cron repo-queue-worker-shift, run started 2026-11-07 18:00 CST): fleet queue claim --queue repo-health-code-pilot --worker repo-worker-code --lane code-a --lease-seconds 2700 returned task 11164 as a fresh claim in the same window; fleet queue lane 11164 created lane ledger row 3413 at 2026-11-08T00:05:36Z with assigned_lane direct, and a claimed checkpoint was accepted.
  • Minutes later, lane code-a's heartbeat returned the verdict heartbeat_task: task 11164 is not claimed by repo-worker-code — the task had already reached its terminal state under the other lane's work. Lane code-a stopped per the runbook heartbeat-verdict rule and posted no duplicate note.

Why it matters

The atomic claim is the fleet's only protection against double work when lanes overlap by design (the lane locks are per-lane, not global). A double claim wastes two shifts on one task and risks divergent writes (notes, labels, terminal verbs) on the same issue; here the collision was visible only because both lanes post agent notes on the issue.

Acceptance criteria

  • Reproduce or explain from queue event history how task 11164 came to be claimed by two lanes (concurrent claim race, completion-then-reclaim, or another path), with the task's claim/complete event rows cited.
  • claim_repo_task (or its successor) cannot return a task that is already claimed-and-live or already terminal to a second claimer; a regression test or a documented invariant check covers the concurrent-claim case.
  • If the root cause is that a completed task was re-presented, the claim path filters terminal tasks and the event history for task 11164 shows where the filter failed.

Verification (2026-11-23)

  • fleet queue timeline 11164 --json returns event 1792 (claimed, 2026-11-08T00:05:23Z) and event 1842 (completed, 2026-11-08T00:06:12Z). Together with the incident's lane code-a claim/ledger evidence at 00:05:36Z, this places code-a's second claim after the initial claim and before completion: a concurrent live-claim race, not completion-then-reclaim. The old history has no separate event for code-a's second claim, which is the observability defect; merged PR fleet-queue: record refused by-id claims + surface claim displacements in timeline (#6985) #10939 records refused live by-id claims and exposes displacement events in timelines.
  • The single-winner invariant is covered by merged PR test(fleet-queue): concurrent-claim regression fixture for the losing-claim race (#7068) #8107 (claim_race_two_lanes_exactly_one_winner_per_task, task 11895 fixture); PR fleet-queue: record refused by-id claims + surface claim displacements in timeline (#6985) #10939 adds the same-worker/two-lane refusal event; PR fix(fleet-queue): lifecycle verbs refuse another lane's claim (#6985) #11803 makes lifecycle verbs reject another lane's claim. On current main, fleet shell --target local --cwd "$PWD/pkgs/fleet" -- cargo test -p fleet-queue --all-features claim_race_two_lanes_exactly_one_winner_per_task passed (1 test).
  • The terminal-representation condition does not apply to this incident: the second-claim evidence predates event 1842. Current default_pick_predicate only selects queued, eligible parked, or eligible handoff work (pkgs/fleet/crates/fleet-queue/src/turso_queue/claim.rs:2143-2153); claimed and terminal statuses are excluded.

Activity

Next
  1. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    on Nov 8, 2026
  2. developing-today commented on Nov 8, 2026

    @developing-today
    developing-todayBot
    on Nov 8, 2026 – with developing.today
    Contributor
    More actions

    CODE-2219

  3. dezren39 commented on Nov 8, 2026

    @dezren39
    dezren39
    on Nov 8, 2026
    MemberAuthor
    More actions

    🤖 Agent note · evidence

    • Agent: queue worker (repo-worker-code), lane code-r
    • Session / ID: repo-queue-worker-shift-r, 2026-11-07 18:09 CST run
    • Found via: queue claim collision observed this shift
    • Task: Another instance of the claim-atomicity defect: task 11379 (issue aggregator(alerts): the all-gone delivery/escalation path from #3690 has no test — no gone:true sender fake exists #6905) was claimed concurrently by lanes code-r, code-g, and code-x. All three converged on the same worktree/branch (queue/11379-6905-all-gone-tests) and the same PR test(aggregator): pin all-gone alert delivery/escalation lifecycle (#6905) #6991, which merged once (7abb85c); lane code-x completed task 11379 in the queue, after which lane code-r's complete/heartbeat correctly returned "task 11379 is not claimed by repo-worker-code". No duplicate PR resulted, but three lanes burned the same task in parallel — same pattern as task 11164 reported here earlier.
  4. dezren39 commented on Nov 8, 2026

    @dezren39
    dezren39
    on Nov 8, 2026
    MemberAuthor
    More actions

    🤖 Agent note · evidence

    • Agent: queue worker (repo-worker-code), lane code-r
    • Session / ID: repo-queue-worker-shift-r, 2026-11-07 18:09 CST run
    • Found via: second collision in the same shift
    • Task: Task 11212 (issue cold-store-reaper(repair_dump): a multi-line schema statement is terminated by the first interior line ending in ');' — the fragment is rewritten as the whole statement and the tail passes through raw #6531) was also claimed concurrently by lane code-m: code-m posted a done note at 2026-11-08T00:26:35Z and completed the queue task while lane code-r was merging PR cold-store-reaper(repair_dump): don't terminate a schema statement at an interior ');' line (#6531) #6543; code-r's subsequent complete/heartbeat returned "task 11212 is not claimed by repo-worker-code". Outcome was recorded by both lanes and the merge landed once (f752e0a), so no work was lost — but the duplicate-claim pattern from task 11164 / task 11379 is recurring fleet-wide tonight, not a one-off.
  5. dezren39 commented on Nov 8, 2026

    @dezren39
    dezren39
    on Nov 8, 2026
    MemberAuthor
    More actions

    Intake review

    🤖 Agent note · intake

    • Agent: fleet monitor
    • Session / ID: repo-fleet-monitor run 2026-11-07 18:12 CST
    • Found via: monitor reconciliation (Duty 2 intake enrichment)
    • Task: Intake pass on this issue (protocol §5).
    • Expectation: Triage routes it as a queue claim-atomicity investigation.
    • Links: issue id(phase-14): Creator tooling & insight — v3 — outline: public-world safety #6310 (the double-claimed task 11164's triage target)

    Still live: verified this run — no merged PR or commit on main fixes claim atomicity for claim_repo_task; the issue was filed 2026-11-08T00:07Z from the incident itself and the underlying claim path is unchanged. Related: issue #6853 (claim rejects lane ids — the neighbouring claim-path defect), issue #6838 (fleet-queue Turso verb gaps). This issue is distinct from both: it is about a task being handed to two lanes concurrently, not about lane-id rejection or missing verbs.

    Notes: The evidence in the body is unusually complete — both lanes' claim paths, the lane ledger row (3413), timestamps, and the heartbeat verdict that exposed the collision are all cited. The second lane (code-a) behaved correctly on the heartbeat verdict and posted no duplicate note, so the damage this time was one wasted partial shift; the risk is a repeat where both lanes write.

    Risks: A fix here touches the fleet's only double-work protection; changes to claim_repo_task need the concurrent-claim regression coverage the acceptance criteria demand, and must not break the lane claim flow that #6853 is separately tracking.

    Suggested approach: Start from the queue event history for task 11164 (claim/complete rows for both lanes), decide which of the body's three hypotheses the rows support, then pin the invariant in the claim path (filter claimed-live and terminal tasks at claim time) with a concurrent-claim test.

    Labels normalized this pass: priority/high, effort/m, status/needs-triage, source/queue-worker, app/fleet, meta/enriched (kind/bug was already present; the body already carries an acceptance-criteria section, so no body edit was needed).

  6. dezren39
    added
    priority/highImportant and time-sensitive
    effort/mMedium: expected under 1 day of work
    status/needs-triageNot yet triaged; needs a first look
    source/queue-workerFiled or worked by the queue/worker pilot
    app/fleetpkgs/fleet multicall binary + platform crates
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Nov 8, 2026
  7. developing-today commented on Nov 8, 2026

    @developing-today
    developing-todayBot
    on Nov 8, 2026 – with developing.today
    Contributor
    More actions

    🤖 Agent note · handed off

    • Agent: queue worker (repo-worker-code, lane code-l)
    • Session / ID: task 11436
    • Found via: queue claim
    • Task: Triage issue queue: task 11164 claimed by two lanes concurrently (code-a and code-x) — claim atomicity violated #6985 — assigned_lane=opencode; handed off to the opencode claimant, which launches the bound session.
    • Expectation: claimant session drives task 11436 to its terminal state.
    • Links: issue queue: task 11164 claimed by two lanes concurrently (code-a and code-x) — claim atomicity violated #6985
  8. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    on Nov 8, 2026
  9. 73 remaining items

  10. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 17, 2026
  11. developing-today
    added
    status:in-review
    on Nov 17, 2026
  12. dezren39 commented on Nov 17, 2026

    @dezren39
    dezren39
    on Nov 17, 2026
    MemberAuthor
    More actions

    [agent: repo-worker-code / lane code-a, task 20013] Scoped fix for the task-17490 recurrence — PR #10939.

    Investigation (fresh, this shift): every claim surface in the turso broker is already single-winner — the pick is an id-keyed conditional UPDATE re-checking the full predicate (the #7068 fix), by-id is gated by by_id_claimable plus a status-pinned UPDATE, transfers refuse explicitly. The recurrence's real gap is record-keeping: task 17490's "exactly two events" timeline was partly an artifact — cmd_timeline never queries lease_expired / lease_expired_at_cap, so a lease-expiry displacement is invisible in the primary diagnostic, and a by-id claim refused over a live claim returned a silent Ok(None).

    PR #10939: (1) claim_by_id emits a claim_refused event naming the holder from the row's lease fields (new live_claim_holder helper) — keyed on the live lease, never worker identity; (2) the timeline kind list gains lease_expired, lease_expired_at_cap, claim_refused; (3) regression tests in the #7068 style extended to the same-worker two-lane case (task 17490 fixture). cargo test -p fleet-queue --all-features: 389 passed.

    Honest remainder, also stated on the PR: this does not prove which production path handed 17490 to the second lane — but a recurrence is now diagnosable from fleet queue timeline alone, and refused claims are on the record. #6985 stays open for that verification. Task 20013 parks awaiting CI on PR #10939.

  13. dezren39
    added a commit that references this issue on Nov 17, 2026

    Merge pull request #10939 from developing-today/queue/20013-6985-clai…

    2fb14b4
  14. dezren39 commented on Nov 17, 2026

    @dezren39
    dezren39
    on Nov 17, 2026
    MemberAuthor
    More actions

    🤖 Agent note · fix landed — PR #10939 merged (task 20013 completed by lane any-j)

    • Agent: repo-worker-code
    • Session / ID: queue task 20013 · lane any-j (fix authored by lane code-a earlier today; this lane re-verified and landed it)
    • Task: Fix the queue: task 11164 claimed by two lanes concurrently (code-a and code-x) — claim atomicity violated #6985 recurrence — same-worker double claim silently overwriting (task 17490).

    What landed: PR #10939 MERGED (merge 2fb14b4), +129/−0 in pkgs/fleet/crates/fleet-queue/src/client.rs and turso_queue.rs:

    1. claim_by_id now emits a claim_refused event naming the holder taken from the row's live lease fields (new live_claim_holder helper) — keyed on the live lease, never on worker identity, which a shared repo-worker-code string cannot distinguish between lanes.
    2. The timeline kind list gains lease_expired, lease_expired_at_cap, and claim_refused, so a lease-expiry displacement is no longer invisible in fleet queue timeline (task 17490's "exactly two events" timeline was partly this blind spot).
    3. Regression tests in the fleet queue claim: a losing claim call returned a live claim held by another lane (task 11895, lanes code-m/code-f race) #7068 style extended to the same-worker two-lane case (the task 17490 fixture).

    Independent re-verification by this lane (2026-11-17): cargo test -p fleet-queue --all-features on the PR head: 389 passed, 0 failed — matching the authoring lane's report. The PR's only status check (CodeRabbit) completed neutral; this repo's CI runs on main.

    Remainder (unchanged from the PR's own statement): this does not prove which production path handed task 17490 to the second lane — but a recurrence is now diagnosable from fleet queue timeline alone, and refused claims are on the record. This issue stays OPEN for that production verification, per the authoring lane's disposition.

    Task 20013 completes as fixed_merged.

  15. dezren39
    added a commit that references this issue on Nov 18, 2026

    Merge pull request #11803 from developing-today/fix/6985-lane-holder-…

    d2417f1
  16. dezren39
    removed their assignment
    on Nov 20, 2026
  17. dezren39 commented on Nov 22, 2026

    @dezren39
    dezren39
    on Nov 22, 2026 – with Claude
    MemberAuthor
    More actions

    Merged work, still open. Every pull request that references this issue has merged (#10939, #11212, #11803) and none is open, but the issue kept status:in-review. Tasks that name it as a blocker have been waiting on it.

    status:in-review is removed. Whoever takes this next: run the issue's done check against main. Close the issue if it passes; if not, list what is left here and carry on with it (AGENTS.md, "Finishing work").

    By: Claude, 2026-11-22 flow review.


    Generated by Claude Code

  18. dezren39
    removed
    status:in-review
    on Nov 22, 2026
  19. dezren39 commented on Nov 23, 2026

    @dezren39
    dezren39
    on Nov 23, 2026
    MemberAuthor
    More actions

    Closed as implemented.

  20. dezren39
    closed this as completedon Nov 23, 2026
  21. developing-today
    added
    status:done
    on Nov 23, 2026
  22. dezren39
    added a commit that references this issue on Nov 26, 2026

    feat(fleet-queue): surface suspect completions — done with no result …

    0cf3a97
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/fleetpkgs/fleet multicall binary + platform crateseffort/mMedium: expected under 1 day of workkind/bugSomething isn't working (prefixed form of the classic bug label)meta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/highImportant and time-sensitivesource/queue-workerFiled or worked by the queue/worker pilotstatus:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.