Skip to content

fleet queue: add a repair verb for quarantined/malformed task packets (in-place payload fix) #13191

Open

Description

@dezren39

Problem

Queue task 18533 (for #7709) was quarantined by the claim path: its payload.dedupe lacks checked_at/basis (validation #5444), so every claim re-quarantines it. quarantine-recheck diagnoses it (still_quarantined, with that last_error) but cannot fix it, and no verb repairs a task payload in place. The only disposition available was cancel-with-disposition (done 2026-11-23; full record on #13091). The blocked pool likely contains more rows in this class — rows that read as "blocked" but are actually quarantined malformed packets.

What exists today (verified against the b8bbcc0 binary's fleet queue --help): unblock (incl. --drop-dep), quarantine-recheck (diagnose only), revive, cancel, verify-disposition, dep-recheck. None of them mutates a payload to fix a validation defect.

Ask: fleet queue repair <task-id> [--dry-run]

A broker-side verb, sibling to unblock:

  • Loads the task by id in whatever non-terminal state it sits in (blocked/quarantined; cancelled stays revive's job — repair composes with revive, it does not replace it).
  • Runs the packet validators and lists every defect it finds.
  • Applies deterministic, semantics-preserving repairs for known defect classes. First class, the feat(atlas): ingest gate record + state machine (follow-on 1 of #6057) #7709 shape: a dedupe payload missing checked_at/basis is repaired by re-performing the dedupe check live — verify no other live task carries the same (repo, issue, kind) work identity — and stamping checked_at/basis recording that the repair verb performed that check at that time. If a duplicate live task exists, stamping would be a false attestation: refuse and say so.
  • Repairs never invent content: an unrepairable defect (a missing issue reference, a malformed prompt body, anything whose correct value cannot be re-derived by performing the check the field attests to) fails with a non-zero exit, lists the defects, and mutates nothing.
  • --dry-run reports defects + planned repairs and writes nothing.
  • On success: re-run validation; when clean, clear the quarantine and restore the task to claimable state — queued, or blocked with its recorded deps intact — and append a timeline entry naming the verb, the operator, the defects found, and the repairs applied.

Also in scope

Audit unblock against a quarantined row: before repair it should refuse with a message naming the quarantine and pointing at repair, not silently no-op or misreport state. Fix in the same PR if it doesn't.

Tests (fleet-queue crate, named oracles)

  • The feat(atlas): ingest gate record + state machine (follow-on 1 of #6057) #7709 shape (dedupe payload missing checked_at/basis, no duplicate live task) repairs, re-validates clean, and becomes claimable.
  • --dry-run on the same shape writes nothing (row byte-identical).
  • A duplicate-identity dedupe defect is refused; the row is unchanged.
  • An unrepairable defect fails non-zero; the row is unchanged.
  • A repaired task's timeline carries the repair entry (verb, operator, defects, repairs).

Acceptance

  • The tests above green in CI on main.
  • A live repair --dry-run against one currently-quarantined production row, reported on this issue (read-only — no production row is mutated by the acceptance check).
  • Do not change task 18533's cancelled state; it stands as the worked example, revivable later by an operator decision.
{
  "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-23T10:30:52Z",
    "session_id": null,
    "lane": null,
    "host": "htch-runtime",
    "worktree": null,
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": null,
    "auth_subject": "archer",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Activity

  1. added
    kind/featureNew feature or capability request
    app/fleetpkgs/fleet multicall binary + platform crates
    on Nov 23, 2026
  2. developing-today commented on Nov 23, 2026

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

    @dezren39
    MemberAuthor

    Claim — Archer lane (repair-verb implementation), 2026-11-23.

    Taking #13191: implementing fleet queue repair <task-id> [--dry-run] in pkgs/fleet (fleet-queue crate + CLI wiring), the unblock-on-quarantined audit, the named-oracle tests from the issue, and the live read-only --dry-run acceptance against a currently-quarantined production row. Worktree on the laptop off main; PR + merge once verified. Task 18533's cancelled state will not be touched.

  4. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Stall record (archer, 2026-11-23 ~07:17 CST): the dedicated implementation agent for the repair verb (PR #13218, merged) has had no new output across two hourly work-loop check-ins (~96 min) after its merge. One continuation nudge sent per the standing detached-job rule. No work is lost: the verb is on main, and the deployment-side acceptance remainder (read-only --dry-run against a quarantined row, plus the #13146 cross-seat proof) is owned by the separate rollout agent now in flight. If the nudge produces no report, the agent will be replaced/closed and this note stands as the record.

  5. added a commit that references this issue on Nov 23, 2026
  6. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Live acceptance: fleet queue repair --dry-run against a quarantined production row

    Acceptance remainder from the rollout completion (2026-11-23), run against the generation-6 broker (bcc8043 build, activated 2026-11-23T14:05:46Z) with the bcc8043 seat binary. Task 18533 was not touched; its cancelled state stands.

    Row: task 18141, queue repo-health-code-pilot, status blocked — "Triage #1826: P3.7 test access: #1831 Android phone peer + laptop VM NAT emulation".

    Command: fleet queue repair 18141 --dry-run (2026-11-23T14:24:02Z, exit 0)

    Result: outcome: dry_run, dry_run: true

    • Defects found: payload.dedupe: must have checked_at and basis as non-empty strings — the feat(atlas): ingest gate record + state machine (follow-on 1 of #6057) #7709/18533 class exactly.
    • Planned repair: re-perform the dedupe check live and stamp checked_at/basis. The live check passed: no other live task holds the work identity developing-today/code#1826:triage or the dedupe key repo-health:v1:triage:developing-today/code:issue:1826, so the stamp would not be a false attestation.
    • Nothing was written: the row remains blocked with its payload unchanged (the run is read-only by construction; the verb's own tests pin the byte-identical property).

    How the row was found: a read-only repair --dry-run census over the blocked+parked rows of repo-health-code-pilot (414 rows listed). Exactly one repairable row exists in that pool today: 18141. Three further rows carry defects repair correctly refuses as unrepairable (it never invents content): task 15282 (payload.schema not repo-task/v1, missing problem/priority_reason), tasks 17390 and 17399 (payload.repo names dezren39/hatch-personal, not a fleet repo, plus missing fields). Every other probed row reported no_defects. The repairable repair itself (non-dry-run) is an operator action and was not performed here.

  7. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Packet-defect census — fresh repair --dry-run sweep (2026-11-23 ~14:56Z)

    Read-only census by Lane ZP, following on from the live-acceptance record above. Method: listed every blocked+parked row in every queue (449 rows: repo-health-code-pilot 408, repo-health-nix-pilot 18, repo-health-opencode-pilot 10, repo-health-openchamber-pilot 7, code 3, code-pilot 3) and ran fleet queue show plus fleet queue repair <id> --dry-run on every row, sandbox seat binary bcc8043 against the generation-6 broker. Dry-run only — nothing was written, no task state was changed, no non-dry-run repair was performed. Task 18533 is cancelled, was not in the pool, and was not touched; task 18141 received dry-run reads only.

    Repair-verb verdicts (449 rows)

    Verdict Rows
    Repairable (dry-run plans a repair) 37
    Unrepairable (defects repair correctly refuses) 6
    Refused on state (row left blocked/parked mid-census) 2
    no_defects 404

    Repairable: 37 rows, one defect class — and a correction to the acceptance count

    All 37 carry the identical defect payload.dedupe: must have checked_at and basis as non-empty strings, with the planned repair "re-perform the dedupe check live and stamp checked_at/basis" (live check passed for all 37; each would move blocked → queued on a real repair). All are repo-health-code-pilot triage rows from the 2026-11-17 bulk intake, quarantined by the claim path on 2026-11-18:

    18141 → #1826 · 18211 → #2232 · 18212 → #2249 · 18228 → #2381 · 18257 → #3399 · 18258 → #3400 · 18259 → #3401 · 18275 → #3898 · 18276 → #3899 · 18296 → #5007 · 18424 → #6025 · 18445 → #6077 · 18460 → #6285 · 18461 → #6286 · 18497 → #6583 · 18523 → #7572 · 18524 → #7573 · 18525 → #7574 · 18526 → #7585 · 18555 → #7938 · 18629 → #8300 · 18630 → #8301 · 18631 → #8302 · 18632 → #8303 · 18814 → #9060 · 18827 → #9077 · 19016 → #9506 · 19021 → #9511 · 19055 → #9608 · 19090 → #10040 · 19095 → #10050 · 19096 → #10051 · 19097 → #10052 · 19100 → #10070 · 19339 → #10663 · 19340 → #10664 · 19341 → #10665

    This does not reproduce the acceptance census above, which found exactly one repairable row (18141) at 14:24Z. The other 36 rows were already blocked in this state before that run — their claimed_at is 2026-11-18T00:08:39Z, the moment the claim path quarantined them — and fresh dry-runs today return the repairable verdict for all 37. On the evidence available, the acceptance count undercounted the dedupe-stamp class; the per-row dry-run outputs from this sweep are the current record. The non-dry-run repair of these 37 rows remains an operator action and was not performed here.

    Two further surprises against the previously known packet-defect picture:

    • None of the 37 repairable rows is in the known ~30-issue packet-defect list, and none carries a lane packet_defect record — they were quarantined automatically by the claim path and never lane-reviewed, so no issue-side list ever counted them.
    • The repairable set and the lane-recorded packet_defect set (below) are disjoint except for one row (20592), which is lane-recorded and verb-unrepairable.

    Unrepairable: 6 rows

    State-refused (2): 17092 (#10252) had completed and 17107 (#10268) had been claimed by repo-worker-code by the time their dry-runs ran — the pool is churning under active lanes; both were blocked when listed minutes earlier.

    The lane-recorded packet_defect class: 64 rows / 61 issues — the verb cannot see it

    64 blocked/parked rows carry reason_class: "packet_defect" in their lane block records, covering 61 distinct issues. The repair verb's verdict on them: 63 no_defects, 1 unrepairable (20592, above). The verb validates payload schema only; the lane-recorded class is overwhelmingly semantic — kind/timebox/scope contradictions (e.g. small_fix/45-minute packets wrapped around multi-day design work), stale premises, duplicate packets — which needs packet re-issue by a lane, not in-place repair. Task 15956 (#9439) is the type example: its 2026-11-19 block record cites validator #5444 (packet.max_attempts mismatch), but the row and payload both read max_attempts: 1000 today and the verb reports no_defects; its implementation gates #9438/#9501 have also since closed, so that row's remaining block is the stale lane record, not a verb-visible defect.

    Cross-reference against the known ~30-issue list

    Bottom line

    The repair verb's live population is 37 dedupe-stamp rows (plus 6 correctly-refused rows) — a different, larger, and previously unlisted set than the acceptance record suggested. The ~61-issue lane-recorded packet-defect class is real but is a re-issue problem, not a repair-verb problem. No repairs were performed by this census.

  8. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Census follow-up — task 15956 resolved (Lane ZR, 2026-11-23).

    The census above used task 15956 (#9439) as the type example of the lane-recorded packet_defect class that the repair verb cannot see. Worked end-to-end today:

    Full evidence: #9439 (comment)

    No other task's state was touched in this pass; task 18533 was not touched. #9439's implementation itself was not attempted — task 15956 now waits in the queue for an implementation lane.

  9. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Queue repair run — the 37 census-repairable rows (operator action, approved by Drew in chat 2026-11-23 09:15 CST)

    Follow-up to the census above (comment 7104845806). Each of the 37 rows was processed one at a time with the bcc8043 seat binary against the gen-6 broker: fleet queue show → non-dry-run fleet queue repair → fleet queue show. Every row was still blocked at its turn, every repair performed the live dedupe re-check and stamped payload.dedupe.checked_at/basis, and every row is now queued. 37 repaired → queued, 0 skipped, 0 refused.

    Defect on all 37: payload.dedupe: must have checked_at and basis as non-empty strings. Repair action on all 37: stamped checked_at/basis by re-performing the dedupe check live; no live duplicate was found for any row.

    task issue before repair after dedupe stamped at
    18141 #1826 blocked repaired queued 2026-11-23T15:16:16Z
    18211 #2232 blocked repaired queued 2026-11-23T15:17:09Z
    18212 #2249 blocked repaired queued 2026-11-23T15:17:28Z
    18228 #2381 blocked repaired queued 2026-11-23T15:17:44Z
    18257 #3399 blocked repaired queued 2026-11-23T15:17:58Z
    18258 #3400 blocked repaired queued 2026-11-23T15:18:09Z
    18259 #3401 blocked repaired queued 2026-11-23T15:18:19Z
    18275 #3898 blocked repaired queued 2026-11-23T15:18:29Z
    18276 #3899 blocked repaired queued 2026-11-23T15:18:40Z
    18296 #5007 blocked repaired queued 2026-11-23T15:18:50Z
    18424 #6025 blocked repaired queued 2026-11-23T15:19:02Z
    18445 #6077 blocked repaired queued 2026-11-23T15:19:11Z
    18460 #6285 blocked repaired queued 2026-11-23T15:19:21Z
    18461 #6286 blocked repaired queued 2026-11-23T15:19:31Z
    18497 #6583 blocked repaired queued 2026-11-23T15:19:40Z
    18523 #7572 blocked repaired queued 2026-11-23T15:19:49Z
    18524 #7573 blocked repaired queued 2026-11-23T15:20:04Z
    18525 #7574 blocked repaired queued 2026-11-23T15:20:21Z
    18526 #7585 blocked repaired queued 2026-11-23T15:20:32Z
    18555 #7938 blocked repaired queued 2026-11-23T15:20:54Z
    18629 #8300 blocked repaired queued 2026-11-23T15:21:17Z
    18630 #8301 blocked repaired queued 2026-11-23T15:21:28Z
    18631 #8302 blocked repaired queued 2026-11-23T15:21:40Z
    18632 #8303 blocked repaired queued 2026-11-23T15:21:52Z
    18814 #9060 blocked repaired queued 2026-11-23T15:22:14Z
    18827 #9077 blocked repaired queued 2026-11-23T15:22:32Z
    19016 #9506 blocked repaired queued 2026-11-23T15:22:50Z
    19021 #9511 blocked repaired queued 2026-11-23T15:22:59Z
    19055 #9608 blocked repaired queued 2026-11-23T15:23:13Z
    19090 #10040 blocked repaired queued 2026-11-23T15:23:31Z
    19095 #10050 blocked repaired queued 2026-11-23T15:23:47Z
    19096 #10051 blocked repaired queued 2026-11-23T15:24:09Z
    19097 #10052 blocked repaired queued 2026-11-23T15:24:20Z
    19100 #10070 blocked repaired queued 2026-11-23T15:24:33Z
    19339 #10663 blocked repaired queued 2026-11-23T15:24:48Z
    19340 #10664 blocked repaired queued 2026-11-23T15:25:01Z
    19341 #10665 blocked repaired queued 2026-11-23T15:25:15Z

    Exclusions honored: task 18533 was never touched; the unrepairable rows (15282, 17390, 17399, 18462, 20592, 21092) were never touched; no task outside the 37 was repaired. Per-task repair JSON is preserved on the sandbox under /tmp/repair-run/.

    Note: these rows are now ordinary queued work — lanes may claim them (several map to issues with their own blockers, e.g. the #3399/#3400/#3401 chain, which the claiming lane must honor as usual).

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/featureNew feature or capability requeststatus:in-review

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions