You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(queue): broker re-serves parked and completed tasks (double-serve) #13091
Expected: a task that is parked with a recorded stand-down, or completed with a verified disposition, is never served again. The anti-double-serve window that exists for shortlist adds does not cover broker re-serves of parked/completed tasks.
Acceptance: reproduce with a parked and a completed task; after the fix, neither is re-served, and a regression test pins both cases.
xaltha picking this up: reproducing the double-serve with a parked and a completed task, then fixing the broker serve path with a regression test pinning both cases.
New occurrence (Lane NU, 2026-11-23 ~08:37-08:38Z): queue task 21302 ("Scheduled Bolt — developing-today/code", tracking issue #13121) was served by fleet agent next (rung: queue) and shown as claimed by archer, in the same window in which the dispatcher recorded "Dispatch launch FAILED and queue task #21302 was cancelled" on #13121 (2026-11-23T08:38:07Z; issue closed not_planned 08:38:08Z). The lane's claim comment raced the cancellation by ~11 seconds. When the lane tried to park the task, the broker answered "task 21302 is not claimed by archer: it is cancelled" — so the broker's stored state was cancelled while agent next was still handing the task out. Same expected behaviour as the parked/completed cases already on this issue: a task in a terminal state (here: cancelled) must never be served. No work was started under the task.
Occurrence — Lane OV (archer), 2026-11-23 ~08:56Z.fleet agent next served queue task 20671 (#10639) again while the issue carries queue/parked + status/parked and the task was already parked with its remainder named (the coordinated live-acceptance cutover, a primary-seat window). Lane OV re-parked it under archer with the stand-down reason recorded. Same family as the parked/completed/cancelled re-serves already recorded here: a parked task with a recorded stand-down was served to a fresh lane.
verb_park stamps a not_before on every park (default +1200s) and the default pick released every park on that timer — including parks whose recorded term is a broker-owned condition (task_terminal/task_status/event_seen, owned by the park-revalidation sweeper) or a person's answer (person_answer, owned by /wake). Task 21123's ~23-minute re-serve cycle matches the default park timer. Genuine waits keep timer release (it is their designed release path, FDR-0008; no automated /wake caller exists).
Fix:PARKED_TERM_EXCLUSION ANDed into the pick predicate's parked branch (mirrored in the budget-skip / no-claim-count diagnostics); enqueue treats a completed predecessor (same key) and a completed work-identity holder (any key) as dedupe hits. Failed/cancelled still revive; dedupe_override still files a deliberate parallel; expired-claim re-serve untouched.
Evidence: 5 new regression tests in turso_queue.rs, fail-before verified (the same-key test reproduced the incident: broker returned a fresh task with revived_from: {task_id: 4242, status: "done"}; the pick test showed a task_terminal park servable). Full crate suite 540 passed / 0 failed in the sandbox (run before the remote-only build directive landed). Remote dispatch was attempted per the new directive and is blocked by tooling, not this change: fleet queue dispatch fails from this sandbox on the installed build's internal GitHub client (TLS UnknownIssuer direct; hosts-yml token bug without RAW), and gh workflow run fleet-command.yml --repo developing-today/fleet hit a GitHub API rate limit for the dispatching identity (403, 2026-11-23 09:08–09:09 UTC, request IDs 42DC:13763:46EC899:E22BC8C:6B040294 and 2A18:13763:46F799E:E24F2F1:6B0402AE). PR #13143's CI is the remote run of record until the dispatch path clears; the dispatch command is recorded verbatim in the PR body.
Stale-task cleanup after the generation-5 binary rollout — 2026-11-23 (archer).
The new broker build (gen 5, rev b8bbcc0) carries the unblock / evidence-gated complete verbs, so the stale blocked rows the blocker sweep held for report are now dispositioned. Every linked issue was re-verified fresh on GitHub first (all closed with reason completed); every disposition below was read back from the queue after the action.
could not complete via the gate — see packet defect below; cancelled with the verified disposition recorded in the cancel reason (issue closed/completed, PR #11995 merged, readback verdict merged_verified)
unblock → claim → complete via evidence gate (closed_verified)
done
Packet defect found (task 18533): the row is quarantined by the claim path — payload.dedupe lacks checked_at/basis, failing validation (#5444) — so every claim re-quarantines it (it presents as an instant re-block after any unblock; dep-recheck reports not_dep_blocked, quarantine-recheck reports still_quarantined with that last_error). No verb repairs a payload in place, so an evidence-gated completion is impossible for this row as it stands. It was cancelled with the full verified disposition in the cancel reason rather than left blocked forever; if a packet-repair path lands, the row can be revived and completed properly. This is the same packet-defect class the sweep catalogued — worth checking how many other blocked rows are quarantined for this reason rather than genuinely dep-blocked.
Task 16081 (#9455): released with the new verb instead of the shepherd workaround — unblock --drop-dep issue:developing-today/code#9200, per the gate correction already recorded on #9455 (the #9200 dep is inverted; the issue's own gate, PR #9225, merged 2026-11-13). Read back: status queued, blocked_deps empty. The cancel/re-queue workaround noted on the issue is obsolete now that the verb exists.
Task 21143 (#10270): no action needed — found already done (completed 2026-11-23T09:18:21Z under oc-code-04's claim, after the earlier rate-limited attempts). Noted for the record: #10270 itself currently stands reopened on GitHub (bot-reopened after PR #13110 merged); the issue's own re-verification is a separate item and was not touched here.
Channel note: the laptop/session-proxy leg was down for a stretch mid-pass (heal cycling the broker stack, ~09:35–09:52Z); all read-backs above were taken after it recovered. The dep_blocked pool was not touched (that is #13068's scope, another seat's in-flight work).
Correction to the 16081 line of the cleanup record above (comment 7097593160): the release did land and was read back (queued, deps empty, ~10:09Z), but at 10:10:36Z a fleet lane claimed the task and by 10:11:21Z had re-recorded the #9200 dep, re-asserting the packet's original gate text ("Parent integration #9200 remains OPEN; #9455 implementation gate requires #9200 closed + granular contracts revalidated"). Current read-back: task 16081 blocked on issue #9200 again, dep recorded by the claiming lane.
So the queue-store release is done, but it does not stick while the packet text contradicts the gate correction recorded on #9455 — each claiming lane re-blocks on the packet's wording. The durable fix is on the packet/issue side (align the packet's gate text with the recorded correction), not another queue-store release. A pointer has been left on #9455 for the lane holding the task. All other dispositions in the batch record stand as read back in the final sweep (15977, 16048, 17396, 17397, 19158, 19174, 19207, 20502, 21101, 21143 done; 18533 cancelled with its disposition on record).
Activity
developing-today commentedon Nov 23, 2026
CODE-4778
dezren39 commentedon Nov 23, 2026
xaltha picking this up: reproducing the double-serve with a parked and a completed task, then fixing the broker serve path with a regression test pinning both cases.
dezren39 commentedon Nov 23, 2026
New occurrence (Lane NU, 2026-11-23 ~08:37-08:38Z): queue task 21302 ("Scheduled Bolt — developing-today/code", tracking issue #13121) was served by
fleet agent next(rung: queue) and shown as claimed by archer, in the same window in which the dispatcher recorded "Dispatch launch FAILED and queue task #21302 was cancelled" on #13121 (2026-11-23T08:38:07Z; issue closed not_planned 08:38:08Z). The lane's claim comment raced the cancellation by ~11 seconds. When the lane tried to park the task, the broker answered "task 21302 is not claimed by archer: it is cancelled" — so the broker's stored state was cancelled whileagent nextwas still handing the task out. Same expected behaviour as the parked/completed cases already on this issue: a task in a terminal state (here: cancelled) must never be served. No work was started under the task.dezren39 commentedon Nov 23, 2026
Occurrence — Lane OV (archer), 2026-11-23 ~08:56Z.
fleet agent nextserved queue task 20671 (#10639) again while the issue carriesqueue/parked+status/parkedand the task was already parked with its remainder named (the coordinated live-acceptance cutover, a primary-seat window). Lane OV re-parked it under archer with the stand-down reason recorded. Same family as the parked/completed/cancelled re-serves already recorded here: a parked task with a recorded stand-down was served to a fresh lane.fix(queue): broker never re-serves condition parks or completed work (#…
dezren39 commentedon Nov 23, 2026
Progress (xaltha): fix landed as PR #13143 — #13143 (branch
xaltha/13091-broker-double-serve, commit f7f45d6).Root cause (two broker-local holes):
verb_parkstamps anot_beforeon every park (default +1200s) and the default pick released every park on that timer — including parks whose recorded term is a broker-owned condition (task_terminal/task_status/event_seen, owned by the park-revalidation sweeper) or a person's answer (person_answer, owned by/wake). Task 21123's ~23-minute re-serve cycle matches the default park timer. Genuine waits keep timer release (it is their designed release path, FDR-0008; no automated/wakecaller exists).donerow is unservable, but a re-filing manufactured a fresh servable row: revive-on-enqueue fired for any terminal predecessor, and the fleet queue: duplicate-task suppression at filing time on the (repo, issue, kind) work identity #10627 identity rule ignores terminal holders, leaving detection to the fail-open claim-time staleness probe. Task 21296 (duplicate of completed 17123) is this shape.Fix:
PARKED_TERM_EXCLUSIONANDed into the pick predicate's parked branch (mirrored in the budget-skip / no-claim-count diagnostics); enqueue treats a completed predecessor (same key) and a completed work-identity holder (any key) as dedupe hits. Failed/cancelled still revive;dedupe_overridestill files a deliberate parallel; expired-claim re-serve untouched.Evidence: 5 new regression tests in
turso_queue.rs, fail-before verified (the same-key test reproduced the incident: broker returned a fresh task withrevived_from: {task_id: 4242, status: "done"}; the pick test showed atask_terminalpark servable). Full crate suite 540 passed / 0 failed in the sandbox (run before the remote-only build directive landed). Remote dispatch was attempted per the new directive and is blocked by tooling, not this change:fleet queue dispatchfails from this sandbox on the installed build's internal GitHub client (TLS UnknownIssuer direct; hosts-yml token bug without RAW), andgh workflow run fleet-command.yml --repo developing-today/fleethit a GitHub API rate limit for the dispatching identity (403, 2026-11-23 09:08–09:09 UTC, request IDs 42DC:13763:46EC899:E22BC8C:6B040294 and 2A18:13763:46F799E:E24F2F1:6B0402AE). PR #13143's CI is the remote run of record until the dispatch path clears; the dispatch command is recorded verbatim in the PR body.dezren39 commentedon Nov 23, 2026
Stale-task cleanup after the generation-5 binary rollout — 2026-11-23 (archer).
The new broker build (gen 5, rev b8bbcc0) carries the
unblock/ evidence-gatedcompleteverbs, so the stale blocked rows the blocker sweep held for report are now dispositioned. Every linked issue was re-verified fresh on GitHub first (all closed with reasoncompleted); every disposition below was read back from the queue after the action.The ten stale blocked tasks:
closed_verified; closing work merged via PR #12886)merged_verified, PR #12883)already_solved(closed_verified)already_solved(closed_verified)merged_verified)already_solved(merged_verified, PR #12862)already_solved(merged_verified)already_solved(merged_verified, PR #12893)closed_verified)Packet defect found (task 18533): the row is quarantined by the claim path —
payload.dedupelackschecked_at/basis, failing validation (#5444) — so every claim re-quarantines it (it presents as an instant re-block after any unblock;dep-recheckreportsnot_dep_blocked,quarantine-recheckreportsstill_quarantinedwith thatlast_error). No verb repairs a payload in place, so an evidence-gated completion is impossible for this row as it stands. It was cancelled with the full verified disposition in the cancel reason rather than left blocked forever; if a packet-repair path lands, the row can be revived and completed properly. This is the same packet-defect class the sweep catalogued — worth checking how many other blocked rows are quarantined for this reason rather than genuinely dep-blocked.Task 16081 (#9455): released with the new verb instead of the shepherd workaround —
unblock --drop-dep issue:developing-today/code#9200, per the gate correction already recorded on #9455 (the #9200 dep is inverted; the issue's own gate, PR #9225, merged 2026-11-13). Read back: statusqueued,blocked_depsempty. The cancel/re-queue workaround noted on the issue is obsolete now that the verb exists.Task 21143 (#10270): no action needed — found already
done(completed 2026-11-23T09:18:21Z under oc-code-04's claim, after the earlier rate-limited attempts). Noted for the record: #10270 itself currently stands reopened on GitHub (bot-reopened after PR #13110 merged); the issue's own re-verification is a separate item and was not touched here.Channel note: the laptop/session-proxy leg was down for a stretch mid-pass (heal cycling the broker stack, ~09:35–09:52Z); all read-backs above were taken after it recovered. The dep_blocked pool was not touched (that is #13068's scope, another seat's in-flight work).
dezren39 commentedon Nov 23, 2026
Correction to the 16081 line of the cleanup record above (comment 7097593160): the release did land and was read back (
queued, deps empty, ~10:09Z), but at 10:10:36Z a fleet lane claimed the task and by 10:11:21Z had re-recorded the #9200 dep, re-asserting the packet's original gate text ("Parent integration #9200 remains OPEN; #9455 implementation gate requires #9200 closed + granular contracts revalidated"). Current read-back: task 16081blockedon issue #9200 again, dep recorded by the claiming lane.So the queue-store release is done, but it does not stick while the packet text contradicts the gate correction recorded on #9455 — each claiming lane re-blocks on the packet's wording. The durable fix is on the packet/issue side (align the packet's gate text with the recorded correction), not another queue-store release. A pointer has been left on #9455 for the lane holding the task. All other dispositions in the batch record stand as read back in the final sweep (15977, 16048, 17396, 17397, 19158, 19174, 19207, 20502, 21101, 21143
done; 18533cancelledwith its disposition on record).