Skip to content

queue: triage packets false-complete under repo-worker-code (zero history events, no deliverables) #14268

Backlog

Description

@dezren39

Pattern

Triage packets enqueued with a payload.dedupe_override (and revives of such packets) are claimed by worker repo-worker-code and reach terminal done almost immediately, with zero history events, no result, and no deliverables. Terminal done for these tasks did not mean the work was done.

Evidence (2026-11-24, verified by read-back)

Packet: "File the follow-ons of the #5834 design record: 4 implementation slices + physical-erasure design", queue repo-health-code-pilot, dedupe key:

repo-health:v1:triage:developing-today/code:issue:5834:dispatch:9f5834a1b2c3d4e5

  • Task 22913 (lane code-h): created 2026-11-24T09:45:54Z, claimed 09:46:07Z, completed 09:46:08Z — one second after the claim. History: 0 events. Result: none.
  • Task 22927 (lane oc-code-02, a revive of 22913 via enqueue_repo_task_turso): created 2026-11-24T09:47:34Z, claimed 09:47:57Z, then terminal done with 0 history events and no result.

Verified no-output on GitHub (ITEM-WORK-4-FINISH lane, 2026-11-24): none of the five follow-on issues the packet required had been filed, and parent #5677 had received no comment. The packet's work was eventually done by filing directly on GitHub; the five filings are listed in a comment on #5677 and in the closing note on #5834. The honest correction is recorded on #5834 (comment 7127943467); the item verdict is comment 7127841371.

Related sharp edge

The original enqueue refusals that led to the override: payload.dedupe_override must be a non-empty string reason; a boolean true parses as no override (broker source: pkgs/fleet/crates/fleet-queue/src/turso_queue/work_identity.rs; its tests assert this). The override path is therefore easy to reach for — and packets that take it are exactly the ones false-completing.

Why it matters

Any coverage, audit, or completion counting that trusts terminal task states is exposed: the #5834 follow-on filing was counted as handled twice while nothing existed on GitHub. If this pattern is not specific to this packet, other "done" triage/filing work may be silently missing too.

Asks

  1. Find why a claim on a dedupe-override/revived triage packet completes instantly with no history written (claim path? completion path? a worker-side shortcut?).
  2. Add a guard so a task cannot reach terminal done with zero history events and no result — or at minimum surface such completions as suspect.
  3. Audit other terminal-done tasks claimed by repo-worker-code with zero history events for missing deliverables.
{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-24T09:52:33Z",
    "session_id": null,
    "lane": null,
    "host": "amd",
    "worktree": null,
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": null,
    "auth_subject": "oc-code-05",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Activity

  1. developing-today commented on Nov 24, 2026

    @developing-today
    Contributor
  2. developing-today-fleet commented on Nov 24, 2026

    @developing-today-fleet
    Contributor

    Third instance — and the first on a feature_slice packet (2026-11-24)

    Task 22966 (queue repo-health-code-pilot, kind feature_slice, priority 40, dedupe key repo-health:v1:slice:developing-today/code:issue:12428:slice-1 — the #12428 NixOS build-proof handoff) was created 2026-11-24T09:58:26Z and is already in terminal status done, worker repo-worker-code, lane oc-code-03, with zero history events, no timeline records, and empty progress.

    Deliverables verified absent: the packet asked for a PR from branch nixos/openchamber-lock-bump on developing-today/code — no such PR exists, and the branch was never pushed to the remote. Nothing in the packet was performed.

    Differences from instances 1–2 (tasks 22913 / 22927): those were triage packets; this one is a feature_slice with a full payload, so the pattern is not triage-specific. The handoff was not re-enqueued (the 22913 → 22927 precedent); the full packet text is preserved in task 22966's record and the remaining steps are restated on #12428 so the work can be picked up directly from the issue.

  3. developing-today-fleet commented on Nov 24, 2026

    @developing-today-fleet
    Contributor

    Fourth instance — task 22984 (NixOS handoff packet, slice-2).

    The authorised single retry of the #12428 handoff packet was re-enqueued to repo-health-code-pilot on 2026-11-24 (kind feature_slice, priority 40, dedupe key repo-health:v1:slice:developing-today/code:issue:12428:slice-2; packet content identical to task 22966's apart from the slice number, which the enqueue validator requires to match the key). Timeline from the broker record:

    • Created: 2026-11-24T10:03:32Z
    • Claimed: 2026-11-24T10:03:36Z — worker oc-code-01, lane any-occodepggcgoogllnimgleobaeencaoehkjpnn
    • Read back terminal done at 2026-11-24T10:03:38Z, with history: [] (zero history events), progress: {}, and no result recorded.

    Deliverables verified absent: zero PRs exist from branch nixos/openchamber-lock-bump, and #12428's newest comment is still the 2026-11-24T10:00:10Z handoff note — no claim comment, no PR record, nothing posted after the claim.

    The pattern now covers two independent feature_slice packets (22966 and 22984, the #12428 handoff) in addition to the #5834 triage packet (22913, 22927): four tasks, four instant completions, zero work product. Per the stop rule, no further re-enqueue of this packet will be attempted until this defect is fixed; the #12428 remainder stays unworked by the queue route in the meantime.

  4. added a commit that references this issue on Nov 24, 2026
  5. developing-today-fleet commented on Nov 24, 2026

    @developing-today-fleet
    Contributor

    Mechanism found, fix landed — record (DEFECT-14268 lane, 2026-11-24)

    The completing path was the claim-time staleness check (#10626) itself, working exactly as coded. Verified directly in the fleet-queue DB (not through the client): all four tasks carry result {"outcome":"already_done","staleness":{tier 1, …}} and a staleness_autocomplete event (via: claim_staleness_check). One mechanism, four instances, two false-positive shapes:

    Why every verification read "zero history, no result": the broker wrote both — but fleet queue show / history / timeline assemble history from a fixed event-kind list that omitted staleness_autocomplete, the one event a retirement writes, and show never surfaces the result column. The paper trail existed; no client surface could see it. (Same blind-spot shape as #6985.)

    Control sample (ITEM-WORK-25's task 23001, small_fix for dezren39/darwin-nix#2028, queue repo-health-nix-pilot): survived because its linked issue is OPEN — the verdict's probe returns Open and nothing fires, on any queue. The queue was incidental; the landed link is the trigger.

    Fix — PR #14292, merged 099ae6ceeb7c7b7f06902829855dc072b2c9ce72

    In staleness_verdict (shared by the claim-time and filing-time checks), two exemptions, each fail-open:

    1. A packet carrying a non-empty dedupe_override reason is never auto-retired — the override is the filer's recorded assertion that the packet is not the issue's canonical task. (Boolean true still parses as no override, matching work_identity.)
    2. A feature_slice (CompletionClass::Slice) is never retired on an issue link alone — a slice delivers an artifact; its parent issue's state is not its completion. The slice's own linked PR landing still retires it.

    Plus visibility: cmd_show and cmd_timeline now query staleness_autocomplete, guarded by a source-assertion test beside the #6985 precedent.

    Legitimate #10626 behaviour is unchanged — plain triage / second-pass / fix packets for verifiably closed issues or merged PRs still retire at claim with result + event. Oracle: staleness_verdict unit tests with a stubbed landing lookup (eaten shapes claim; boolean-override and merged-PR-slice shapes still retire; pre-existing #10626/#12966 tests untouched). Full suite on the laptop: cargo test -p fleet-queue --features client,queue-broker — 641 passed, 0 failed.

    Audit (ask 3) — census + a bounded remainder

    DB census of all staleness retirements: 2,870 (small_fix 1,748 · triage 922 · pr_shepherd 164 · second_pass 12 · feature_slice 12 · ci_investigation 12) — the mechanism is overwhelmingly legitimate. Retirements matching the two eaten shapes (override present, or kind feature_slice): 16 — the four known, plus 21400, 21436, 21448, 21486, 21511, 21525, 21542, 21576, 21640, 21641, 21667, 22746. Those 12 are candidate false positives of the same classes; each needs its deliverables checked before it is counted as handled. That per-task check is the remaining audit step (not done by this lane).

    Deployment — read before re-enqueueing the NixOS packet

    The merged fix is not live yet: broker and client ship in the fleet-static binary, so the gates take effect at the next fleet-static bootstrap pin + broker generation bump (the gen-9 pattern). Until that lands, the #12428 handoff packet will be eaten again if re-enqueued in slice form — after deployment, the slice route is safe from this failure mode. Two cautions that survive the fix: any triage-kind packet against #12428 still retires (its issue is closed — that is now correct-by-design, and #12428 being closed at all is a separate fact for the NixOS programme to settle), and slice/override packets filed against other closed parents before the deployment are still exposed.

  6. developing-today-fleet commented on Nov 24, 2026

    @developing-today-fleet
    Contributor

    Candidate audit — the 12 remaining eaten-shape tasks (audit lane, 2026-11-24)

    Method: each task read via the queue client; each packet's deliverable verified by direct GitHub reads (issue state/timeline, PR merge state, file contents on main) — never by the task's terminal state. The deployed client hides staleness_autocomplete events and the result column, so mechanism attribution rests on the DB census in the fix record above plus each task's claim pattern; classifications below rest on the deliverable evidence cited per task.

    Summary: 9 legitimate · 3 false completions · 0 unclear. No lost work remains unrouted.

    Legitimate — deliverable verified on GitHub

    False completions — packet work never ran

    Pattern note

    Two distinct sub-shapes appear in the legitimate set: (i) retirement on a re-claim after the claiming session had already done the work and closed the issue itself (21436, 21486, 21511, 21576) — the staleness fire was post-hoc and harmless; and (ii) retirement of a packet whose work a parallel session landed (21400, 21448, 21525). The harmful shape is only the third: a packet retired when nobody had done its work (21640, 21641, 22746) — and in all three of those cases the linked issue was already closed before the packet was first claimed (for 21640/21641, before the packet was even created).

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions