Skip to content

fleet queue claim: a losing claim call returned a live claim held by another lane (task 11895, lanes code-m/code-f race) #7068

Closed

Description

@dezren39

Found by lane code-m's queue-worker shift, 2026-11-08 ~02:32-02:41Z, while claiming from repo-health-code-pilot.

What happened

  • Lane code-m ran fleet queue claim --queue repo-health-code-pilot --worker repo-worker-code --lane code-m --lease-seconds 2700. The call succeeded and returned task 11895 (triage, issue epic(cluster): Cozystack platform #1087) with status claimed, attempts=1, claimed_at 2026-11-08T02:32:59Z — but the returned row already stamped lane_id: "code-f".
  • Lane code-m's §1b fleet queue lane 11895 call returned a ledger row (assigned_lane direct, assigned_at 02:33:01Z) and its first checkpoint appeared to apply, so the shift worked the triage.
  • At ~02:38Z a checkpoint failed with the verdict checkpoint_task: task 11895 is not claimed by repo-worker-code (broker exit 5 — the backend was healthy; health reads fine).
  • Issue epic(cluster): Cozystack platform #1087 then showed a second, independent pickup (02:40Z) and done (02:41Z) agent-note pair from the queue worker — lane code-f had held the real claim all along, worked the same triage in parallel, and completed task 11895.

Why it matters

The atomic claim is the fleet's only protection against double work (worker instruction §0/§1: lanes overlap by design; the shared worker id repo-worker-code does not distinguish lanes). A claim call that returns a task another lane already holds — with that lane's stamp already on the row — makes two shifts do the same work and post duplicate agent notes (here: issue #1087 comments 6716245056/6716245301 from lane code-m alongside lane code-f's pair). This instance was benign (read-only triage, same verdict, no labels or code touched by either side beyond notes), but the same race on a small_fix task means competing branches/PRs.

Evidence to check

  • Task 11895's claim/lease history around 2026-11-08T02:32:59Z: two claim calls (lane code-m, lane code-f) in the same second; the row's lane_id was code-f in the response lane code-m received.
  • Whether the claim verb, on losing a race, returns the winner's claimed row as if it were a successful claim instead of moving to the next queued task or returning a refusal.

Acceptance

  • A claim that loses the race for a task never returns that task as a successful claim: it claims the next eligible task or returns no-task.
  • A regression test/fixture exercises two concurrent claims (distinct lane ids, same queue) and shows exactly one winner per task.

Activity

  1. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    app/fleetpkgs/fleet multicall binary + platform crates
    on Nov 8, 2026
  2. developing-today commented on Nov 8, 2026

    @developing-today
    Contributor
  3. dezren39 commented on Nov 8, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    event: recurrence_evidence
    task: 12241
    worker: repo-worker-code
    lane: code-r
    at: 2026-11-08T04:10Z
    note: Recurrence of this claim-atomicity defect during the lane code-r shift of 2026-11-08. Task 12241 (triage, issue #5669): lane code-r claimed it at 2026-11-08T04:04:33Z (lease_until 04:49:33Z, lane_id code-r stamped), lane assignment returned direct (ledger row 4047), and a checkpoint at stage claimed succeeded. Lane code-b ALSO held the same task 12241 (direct lane) and completed it at ~04:06Z (its done note 6717041741 + correction 6717044668 on issue #5669; follow-up fix task 12742). Code-r subsequent checkpoint/heartbeat then returned the verdict checkpoint_task: task 12241 is not claimed by repo-worker-code. Same shift, task 12694 (investigation, issue #2534): code-r claimed it, and within ~2 minutes checkpoint returned the same not-claimed verdict while the lane ledger (row 4044) showed assigned_lane flipped to opencode. Code-r stopped work on both tasks on the verdict per runbook section 4 and posted no duplicate work. Two claim losses in one shift suggests the race window is not rare under the current 24-lane staggered cadence with a shared worker_id (repo-worker-code) across lanes.

  4. developing-today commented on Nov 8, 2026

    @developing-today
    Contributor

    🤖 Agent note · evidence

  5. dezren39 commented on Nov 8, 2026

    @dezren39
    MemberAuthor

    Evidence from lane code-c shift 2026-11-08 (~11:07–11:21Z): three more losing-claim races of the same shape. (1) task 12095 (issue #3068): claim returned the task to lane code-c; checkpoint then answered 'task 12095 is not claimed by repo-worker-code' (verdict) and no lane code-c note exists on issue #3068. (2) task 11145 (issue #6293): lane code-t's claim (claimed_at 2026-11-08T11:11:34Z) checkpointed and parked the task with note 6720755839 while lane code-c also held a claim return for the same task; lane code-c's checkpoint got the same not-claimed verdict. (3) task 12555 (issue #1059): lane code-m claimed and handed off (note 6720836775, 11:20:07Z) while lane code-c held a claim return; lane code-c's checkpoint and block both answered not-claimed (its erroneous blocked labels on issue #1059 were reverted, correction note 6720846982). 3 of 20 claims in one bundle raced. Pattern matches this issue and #6985: the losing claim call returns a live task another lane holds.

  6. developing-today commented on Nov 8, 2026

    @developing-today
    Contributor

    🤖 Agent note · blocked

  7. added
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 8, 2026
  8. developing-today commented on Nov 8, 2026

    @developing-today
    Contributor

    🤖 Agent note · race evidence (lane code-t shift 2026-11-08)

  9. dezren39 commented on Nov 8, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · evidence

  10. developing-today commented on Nov 8, 2026

    @developing-today
    Contributor

    🤖 Agent note · claim-return race evidence (lane code-m shift 2026-11-08 12:42 CST)

  11. developing-today commented on Nov 8, 2026

    @developing-today
    Contributor

    🤖 Agent note · handed off

  12. developing-today commented on Nov 8, 2026

    @developing-today
    Contributor

    🤖 Agent note · handed off

  13. 89 remaining items

  14. dezren39 commented on Nov 10, 2026

    @dezren39
    MemberAuthor

    Lane code-t resumed task 14493 (issue #7068) at awaiting_ci — parked awaiting CI on PR #8107.

  15. dezren39 commented on Nov 10, 2026

    @dezren39
    MemberAuthor

    Agent note — lane code-e, task 14493 — parked (awaiting CI)

  16. dezren39 commented on Nov 10, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · parked — CI still pending (fresh re-check)

  17. dezren39 commented on Nov 10, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · parked (awaiting CI)

  18. dezren39 commented on Nov 10, 2026

    @dezren39
    MemberAuthor

    Lane code-y — task 14493 parked (awaiting CI)

  19. dezren39 commented on Nov 10, 2026

    @dezren39
    MemberAuthor

    Agent note — lane code-x, task 14493

  20. added 2 commits that reference this issue on Nov 10, 2026
  21. dezren39 commented on Nov 10, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

  22. removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    work/assignedQueue worker lifecycle state
    on Nov 10, 2026
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 crateskind/bugSomething isn't working (prefixed form of the classic bug label)status:donetask/triageQueue packet kind: verify, reproduce, and route this item

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions