Skip to content

fleet(queue): 279 tasks quarantined at claim — #8973's max_attempts=1000 default conflicts with the #6448 validator cap of 100 #9609

Closed

Description

@dezren39

Fleet-stall: claim path quarantines tasks the fleet itself enqueued

Scale (fresh DB read, 2026-11-13 ~23:10Z): 279 tasks at status=blocked with last_error starting quarantined by claim path: packet failed validation (#5444).

By queue: repo-health-code-pilot 208, repo-health-opencode-pilot 34, repo-health-openchamber-pilot 12, repo-health-dezren39-pilot 6, repo-health-zettel-pilot 6, repo-health-code-pilot 6, code 4, finance 1, ops 1, repo-health-code-shadow 1. Created 2026-10-22 → 2026-11-13; new rows still landing (latest 2026-11-13T22:06:36Z).

Shape split

  • 270 rows: packet.max_attempts: must be an integer between 1 and 100 — every one of these rows carries max_attempts=1000.
  • 9 rows: payload.schema: must be 'repo-task/v1' / missing payload.problem etc. — producer packets omitting required repo-task/v1 fields.

Root conflict

Two standing fleet decisions now contradict each other:

  1. queue: raise default max_attempts for new tasks to 1000 (Drew order 2026-11-12) #8973 (Drew order 2026-11-12): "attempts were reset to 0 and max_attempts raised to 1000 on all 693 non-terminal tasks"; new tasks to default to 1000.
  2. The Validate what you forward — one validation contract for the fleet queue's packets and verb values #6448 validation contract (live in the claim path): packet.max_attempts and payload.max_attempts must be integers 1–100 —
    • pkgs/fleet/crates/fleet-queue/src/validate.rs:744 (packet.max_attempts: must be an integer between 1 and 100),
    • validate.rs:181 (payload.max_attempts: ... between 1 and 100).
    • Enforced at claim by claim_guard_reason (pkgs/fleet/crates/fleet-queue/src/turso_queue.rs:2245,2252), which stamps quarantined by claim path: packet failed validation (#5444) and blocks the row.

So the bulk #8973 update armed ~693 rows that detonate into blocked the first time any lane tries to claim them. 279 have detonated; the rest (including currently-queued rows) detonate on next claim. Related but distinct: #2937 (attempts=max_attempts unclaimable), #6423 (max_attempts<=0, closed), #9028 (one PostgREST producer bypass), #9029 (bounds-table reconcile).

Named casualties

Recommended direction (triage decides; do not contradict the standing order)

Either (a) raise the validator bound to admit the ordered 1000 default (reconcile with #9029's bounds table, keep enqueue/claim oracle agreement), or (b) get Drew's revised word and clamp producers back under 100. Whichever wins, also: repair the 279 quarantined rows (re-validate and release, not mass-delete), fix producer packets that omit repo-task/v1 schema/kind/problem (the 9-row shape), and add a creation-time or enqueue-time rejection so a bad packet can never be born queued again.

Acceptance

  • validate_packet and every producer default agree on max_attempts range; the agreed bound is written in one place with a test.
  • All 279 currently-quarantined rows re-validated: conforming rows released back to queued (attempts preserved), and any row that cannot conform is re-scoped or failed with reason, never silently left blocked.
  • A conforming enqueue through each producer path claims clean on first attempt (prove with a live claim, not a unit test alone).
  • Task 12126 (or its successor) claims without quarantine.

Activity

  1. developing-today commented on Nov 13, 2026

    @developing-today
    Contributor
  2. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/triageQueue packet kind: verify, reproduce, and route this item
    priority/highImportant and time-sensitive
    area/infraInfrastructure, deployment, and operations
    app/fleetpkgs/fleet multicall binary + platform crates
    kind/infrastructureInfrastructure / host-portability work
    on Nov 13, 2026
  3. dezren39 commented on Nov 13, 2026

    @dezren39
    MemberAuthor

    🤖 Conductor dispatch binding — task 16153 claimed by fleet-conductor and launched as triage session ses_e5e28c0720bffe93nQMHwkTeFo on opencode-route/workhorse (served by cline-pass/deepseek-v4.1-flash#high), worktree /home/user/git/fleet/16153-9609-quarantine-triage at origin/main 70430e2. The session will re-verify the conflict live, decide the direction (validator-bound vs producer-clamp), file ONE follow-on fix task, and post the triage note here. Enqueued by the conductor cycle 2026-11-13T23:10Z (session ses_e5e28dc59d7ffeqY50Qip12107).

  4. dezren39 commented on Nov 14, 2026

    @dezren39
    MemberAuthor

    Picked up by repo-worker-code-a — working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live while repo-worker-code-a posts progress markers; after 30 minutes of silence any other worker may pick this up.)

  5. added
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    and removed on Nov 14, 2026
  6. 213 remaining items

  7. dezren39 commented on Nov 16, 2026

    @dezren39
    MemberAuthor

    Fresh evidence for the same conflict, from a lane heartbeat rather than a static scan.

    • Session ses_e5e1bfc7096ffes5Llh5EK2WXF (queue lane code-j, 2026-11-16 05:00) repeats at its 11:04Z heartbeat:
    quarantined by claim path: packet failed validation (#5444): packet.max_attempts: must match payload.max_attempts
    
    • Same shape recorded on the 04:40 lane (task 16879). The claimant never sees the task; it reads as "no work" rather than as a rejected packet.

    The asymmetry is the tell: the #8973 default writes max_attempts=1000 into the packet, the #6448 validator caps payload at 100, and nothing reconciles the two before the claim path validates. Either the enqueuer must emit the validator's cap (or omit the field and let the payload win), or the validator must accept the enqueuer's own default.

  8. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    agent-note:v1 — lane code-b shift 2026-11-16 18:08 CT: new bulk-intake wave hits this defect class with a second missing-field shape; code stream had ZERO claimable tasks all shift.

    Fresh evidence (queue DB read via turso-exec, 2026-11-17T00:55Z, plus claim-path events):

    • The 2026-11-16 17:52 CT bulk intake (Drew order; "restore queue depth from open issues") enqueued ~1,200 triage packets into repo-health-code-pilot. Their payloads carry NO dedupe object at all (verified on task 18754's full payload: schema/kind/repo/issue/problem/evidence/acceptance/context_refs/max_attempts/priority_reason/risk/scope/tests/timebox_minutes — no dedupe).
    • Every claim pick that reaches one quarantines it: events read quarantined by claim path: packet failed validation (#5444): payload.dedupe: must have checked_at and basis as non-empty strings via claim_payload_quarantine (e.g. tasks 18874–18887 at 2026-11-17T00:25:06–19Z, ~1/sec while lanes claim). The claim guard skips 32 per claim call, then returns "no claimable task" — so lanes burn whole shifts quarantining 32 packets per claim and working nothing.
    • Scale at 2026-11-17T00:55Z: repo-health-code-pilot queued 460 = 459 no-dedupe bulk packets (all will quarantine on pick) + task 13224 (valid packet, but not_before 2026-11-19T18:42:48Z from its 2026-11-12 park — the park's not_before survived its 2026-11-16 unblock). Blocked count for the stream rose 334 → 1,078+ during ~40 minutes of lane claims. The only other queued row fleet-wide, task 17413 (queue code), requires pool summit. Net: no lane could claim anything in the code stream this shift (code-b: 4 consecutive claim verdicts of no task, incl. claim-by-id on tasks 13224 and 18754).
    • Same packets also carry max_attempts: 1000 (task 18754 payload), so even with dedupe restored they hit this issue's primary max_attempts-vs-validator-cap conflict next.

    Ask: the bulk-intake producer must emit the full repo-task/v1 packet (dedupe{checked_at,basis} included) — or enqueue-side validation must reject packets the claim guard will quarantine, so a defective wave fails at filing time instead of silently consuming every lane's claims. The ~459 still-queued defective packets need either payload repair or mass disposition; they currently sit ahead of nothing (nothing valid is behind them in this stream), but any future valid packet enqueued behind them still gets picked in priority order — the defective ones just keep quarantining 32-per-claim on the way.

  9. added a commit that references this issue on Nov 17, 2026
  10. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    FIXED — 2026-11-17 ~01:40Z. Drew's order (2026-11-16 18:41 CT): fix.

    What was actually wrong (three separate things)

    1. The bulk intake bypassed the broker. The 2026-11-16 17:52 CT intake ("restore queue depth from open issues", ~1,800 packets across the four pilot queues) wrote tasks directly to the Turso DB. Proof: its enqueued events ({"via": "bulk_intake_2026-11-16", ...}) match no event any broker code writes (verb_enqueue writes no enqueued event for a fresh insert), and both broker enqueue paths (/enqueue in queue_broker.rs, verb_enqueue in turso_queue.rs) have run validate_packet and rejected this shape with exit 2 since 2026-11-06. The packets carried no payload.dedupe object, which validate_packet (validate.rs:195) has required since 2026-11-04 — so every claim pick quarantined them. Producer rule going forward: bulk intakes go through the broker /enqueue; direct DB writes bypass the only validation boundary.
    2. The claim loop's shared 32-cap turned the wave into a stall. claim_pick_once counted guard quarantines against the same 32 budget as race losses; with ~460 defective packets at the queue head, every claim call burned its budget quarantining and returned "no claimable task" while valid rows sat behind the wave.
    3. The quarantine rechecker could not reach the back of the pile. run_quarantine_rechecks (the fleet(queue): max_attempts split-copy quarantine — one source of truth + blocked-row re-validation #10648 release machinery) scans ORDER BY updated_at ASC LIMIT 200 per sweep, but rows left blocked with an unchanged verdict wrote nothing, so their updated_at never moved. Live sweep events showed the same 197 rows rechecked every minute (checked: 197, released: 0) while ~1,490 rows — including the 109 split-max_attempts fossils — never got a verdict.

    The original #9609 defect needed no fix: the #6448 validator cap of 100 was already raised to 1000 and the copy-agreement rule removed (#10648), live in the running broker (g808af41 = main at repair time). Verified per-row against the running broker's /validate oracle.

    Data repair (live, 2026-11-17 00:55–01:10Z)

    All 1,687 quarantined blocked rows classified through the running broker's /validate:

    • 1,556 rows — dedupe was the ONLY defect. Repaired in place: payload.dedupe{checked_at, basis} prepended by string surgery (basis = the check actually performed at repair: validator cross-check passes + no other live task in the queue carries the key; verified 0 live twins, 0 duplicate groups). Every other payload byte preserved — verified by re-reading all 1,556 payloads and comparing byte-for-byte against the originals (0 mismatches). One hygiene_fix event per row (worker fix-9609, detail cites this order).
    • Released through the broker's own /quarantine-recheck: 1,556 unblocked events. Two released rows were promptly dep-blocked by lanes on real gates (id(currency): gateway verification flow + revocation-set check for RateAuthorisation (Phase 2 of #2290) #3801 / id: implement hosted Worker API + per-user DO provisioning and metering (from #2046/#2852 slice 3) #3811) — normal operation.
    • 114 rows — packets validate clean (old-validator fossils), but all carry live blocked_deps; the dep rechecker owns their release. Not force-released.
    • 17 rows — genuinely defective, left blocked with accurate reasons: 2 empty payloads (tasks 1016, 1017), 12 identity/dedupe-key pattern failures (dezren39/dezren39 dispatch + zettel packets), 1 stub payload (task 15282), 2 packets for non-fleet repo dezren39/hatch-personal (tasks 17390, 17399).

    Source fix — PR #10886 (merged, commit 274d79f)

    • Claim pick loop: quarantines get a separate budget, MAX_CLAIM_QUARANTINES_PER_CALL = 512; race-loss cap unchanged.
    • Rechecker: rows evaluated and left blocked without another write get a bare updated_at touch (no event), so the sweep window rotates through the whole population.
    • New oracle tests: claim budget separation, recheck window rotation, enqueue rejection of a no-dedupe packet. cargo test -p fleet-queue --features queue-broker: 347 passed, 0 failed. Main-branch fleet-rust-tests run 43993669627 was queued at merge time.
    • No forced broker switch: claims were already healthy on the current broker once the data was repaired; the hardening lands at the fleet's next routine broker deploy.

    Verification (live reads, 2026-11-17 ~01:35Z)

    • Blocked fleet-wide: 1,922 → 373; quarantined-blocked 1,687 → 131 (the 114 dep-owned + 17 defective rows above).
    • repo-health-code-pilot: queued 1 → 1,283, done 9,807 → 9,836 and rising; other pilot queues restored (nix 79, openchamber 93, opencode 84 queued).
    • Since the release: 50 claims / 33 completions on previously-defective packets and climbing; zero new claim-path quarantines in 40+ minutes (last quarantine event 2026-11-17T00:48:12Z, before the repair).
    • Sweep steady state now: quarantine_recheck {checked: 17, released: 0, still_quarantined: 17} — exactly the genuinely-defective residue.

    Closing as fixed.

  11. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    Timestamp correction to the fix comment above (my elapsed-time estimates ran fast): the fix landed at 2026-11-17 ~01:13Z, not ~01:40Z; the verification reads were taken 01:05–01:12Z; releases ran 00:57–01:06Z (last unblocked event 2026-11-17T01:05:58Z). The zero-new-quarantines window at close was ~25 minutes (last quarantine 2026-11-17T00:48:12Z), re-verified at 01:13Z: still zero. All counts and other facts stand as written.

  12. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    Agent note — already done (lane any-m, task 19056)

    State: done (already_done)

    Fresh verification (2026-11-17): issue #9609 is CLOSED with status:done. The fix of record is on the issue (comments 6934640675 + timestamp correction 6934647769): the #8973/#6448 max_attempts conflict was repaired 2026-11-17 ~01:13Z, the 279 quarantined tasks were released, live verification showed claims/completions flowing on previously-defective packets with zero new claim-path quarantines, and the steady-state residue is 17 genuinely-defective packets still quarantined by the sweep. This bulk-intake triage task was itself created by that repair pass; it completes as already_done with no follow-on.

  13. dezren39 commented on Nov 18, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    transition: picked-up -> done
    worker: repo-worker-code
    lane: any-n
    task: 20443
    summary: Fresh revalidation found #9609 already CLOSED with status:done. The issue records the repair and verification; PR #10886 is merged at 274d79f, with related fixes #9621 and #9903 also merged. No new follow-on is needed for this triage task.
    next: None; already resolved.

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

Metadata

Metadata

Assignees

Labels

app/fleetpkgs/fleet multicall binary + platform cratesarea/infraInfrastructure, deployment, and operationseffort/mMedium: expected under 1 day of workepic/fleet-orchestrationReprioritization program epic (2026-11-12)kind/bugSomething isn't working (prefixed form of the classic bug label)kind/infrastructureInfrastructure / host-portability workpriority/highImportant and time-sensitivestatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions