GeezerVison is showing github.com — fleet(queue): claim that finds nothing names why - surface at-cap / not-due counts in the no-claim diagnostic (follow-on #2937 acceptance 4) · Issue #8154 · developing-today/code
fleet(queue): claim that finds nothing names why - surface at-cap / not-due counts in the no-claim diagnostic (follow-on #2937 acceptance 4) #8154DescriptionProblem
Follow-on from #2937 (acceptance 4, verified open at current main 2026-11-10, HEAD 9d7f54f):
A fleet queue claim that finds nothing returns only {"task": null} with exit 5 (the #5486 contract in pkgs/fleet/crates/fleet-queue/src/client.rs, claim_output / NO_CLAIM_EXIT). That is distinguishable from success, but it names no reason: a worker whose gate saw queued work cannot tell whether the queue is empty, every queued row is at its attempt cap, rows are not yet due (not_before), or rows were quarantined by the claim guard.
Health already computes the discriminating counts (at_cap_queued, #6528), so the data exists - the claim path just does not surface it at the moment it matters.
Scoped fix
- Broker
/claim handler: when the claim returns no row, attach per-queue counts to the response envelope: queued, at_cap_queued, queued_not_yet_due, parked_due.
- Client
claim_output: print those counts to stderr as the no-claim diagnostic, while keeping the stdout contract unchanged ({"task": null}, exit 5) and its existing unit tests green.
- Add a unit test: null row + counts envelope produces the diagnostic naming the at-cap count.
Acceptance
Found by: lane code-m, task 14479, findings on #2937 (2026-11-10). Activitydeveloping-today commented on Nov 10, 2026 dezren39 commented on Nov 11, 2026 Fresh reproduction in this OpenChamber run (2026-11-11): health showed repo-health-openchamber-pilot with queued=1, at_cap_queued=1, claimed=0 (the sole queued task was 12706 for openchamber#1570). Session ses_e5e3396e8efffeyFak0r1hEXmp (repo-worker-openchamber, lane not-code-d) ran repo-queue claim --worker repo-worker-openchamber --lease-seconds 2700 --lane not-code-d --filter 'repo != code'; it returned only repo-queue: no claimable task, {"task":null}, exit 5—no reason/counts. The lane ended without a claim.
Corroborating: repo-health-code-pilot had 6 queued / 5 at-cap / 0 claimed; code-g session ses_e5e3396ead2ffeb72fe30hWH9v also received the same null-task response. This is exactly the claim-null diagnostic gap tracked here, not a duplicate. The health counts already reveal at-cap; claim's no-row response still does not. dezren39 commented on Nov 11, 2026 Additional reproduction (2026-11-11 16:01 CST): repo-queue health showed repo-health-code-pilot at 6 queued / 5 at-cap / 1 claimed. Session ses_e5e335fff7fffeTX0JQLpHkZEx (scheduled lane code-h) ran repo-queue claim --worker repo-worker-code --lease-seconds 2700 --lane code-h --filter 'repo = code'; it returned repo-queue: no claimable task, {'task': null}, exit 5, without stating the at-cap reason. Acceptance remains: the no-claim result explains counts/reasons, including at-cap and not-due. dezren39 commented on Nov 12, 2026 Additional reproduction from the OpenChamber 2026-11-11 21:00 CDT lane wave (fresh queue and session reads): repo-health-code-pilot had 6 queued / 5 at-cap / 2 claimed; repo-queue claim --worker repo-worker-code --lease-seconds 2700 --lane code-f --filter 'repo = code' and equivalent code-g/code-h/code-i claims returned no task. Sessions ses_e5e324d5581ffecyGtHVJP7Q5q (code-f), ses_e5e324d5702ffepV02ekT0HEnd (code-g), ses_e5e324d5732ffehZDv3S6bHnJ9 (code-h), and ses_e5e324d5408ffep80AeMkpj0ES (code-i) all ended with no claim; their claim diagnostics did not say the queued rows were at cap. Separately repo-health-openchamber-pilot showed 1 queued / 1 at-cap / 0 claimed, likewise no eligible claim. This is the existing #8154 diagnostic gap, not a new issue. Acceptance unchanged: a no-claim result exposes counts/reasons (including at-cap/not-due) while preserving stdout/exit contract; the regression and claim contract tests pass. dezren39 commented on Nov 16, 2026 Builder's advocate 24-hour acceptance reminder (2026-11-15 18:00 CST): issue #8154 remains OPEN with no fix PR. No queue task is currently claimed for it. Last reproduction evidence was 2026-11-11 (6 queued / 5 at-cap / 2 claimed in repo-health-code-pilot; claims returned task:null, exit 5 without explaining the at-cap reason; OpenChamber queue 1 queued / 1 at-cap / 0 claimed likewise). Acceptance remains: a no-claim result exposes counts/reasons (including at-cap/not-due) while preserving the stdout/exit contract; the regression and claim-contract tests pass. Please keep the issue open until that proof exists. dezren39 commented on Nov 17, 2026 🤖 Agent note · triaged
- Agent: queue worker (repo-worker-code), lane any-i
- Session / ID: task 18591
- Found via: queue claim (triage, bulk intake 2026-11-16)
- Verdict: work kind
task/small-fix · priority/normal · effort/m · kind/enhancement. A scoped, well-specified fix in one crate (fleet-queue): the claim path gains a counts envelope and the client prints the reason on stderr; the stdout contract ({"task": null}, exit 5) is unchanged.
- Fresh verification (2026-11-17, current main): still unfixed. client.rs prints the bare 'repo-queue: no claimable task' at both the single-claim (~line 3269) and batch-claim (~line 3470) paths; no queued_not_yet_due / parked_due counts exist anywhere in the crate; health's at_cap_queued (turso_queue.rs apply_at_cap_queued) is computed but never reaches the claim response.
- First step: in turso_queue.rs's claim handler, when no row is served, attach {queued, at_cap_queued, queued_not_yet_due, parked_due} to the response envelope; then print them in client claim_output's no-claim diagnostic.
- Acceptance: the issue's checklist — an all-at-cap queue's claim names the attempt cap in its diagnostic; repo-queue claim prints an all-null task row instead of the claimed task (broker /claim works) #5486/repo-queue: claim can hand out a payload-null task, and list views cannot recover a live claim by lane #5444 claim-contract tests still pass; cargo test -p fleet-queue green including a new null-row-plus-counts unit test.
- Fix packet:
repo-health:v1:fix:developing-today/code:issue:8154 → enqueued as task 20074 (queue repo-health-code-pilot, status queued).
dezren39 commented on Nov 17, 2026 🤖 Agent note · verified + parked — fix sites confirmed live; parked for a fresh full-timebox build claim (claiming lane at its shift-budget edge)
- Agent: repo queue worker (repo-worker-code), lane any-m
- Session / ID: task 20074 (small_fix, follow-on from triage task 18591)
- Found via: queue claim · task 20074; fresh verification 2026-11-17
- Verified live: issue fleet(queue): claim that finds nothing names why - surface at-cap / not-due counts in the no-claim diagnostic (follow-on #2937 acceptance 4) #8154 OPEN (task/small-fix, priority/normal, effort/m; no hard-stop labels). Code sites exactly as the packet scopes them: pkgs/fleet/crates/fleet-queue/src/client.rs:3331 and :3532 print
repo-queue: no claimable task with no reason on the empty-claim paths; the counts the diagnostic needs already exist server-side — turso_queue.rs apply_at_cap_queued (~L7214) computes at_cap_queued for health.
- Scoped work (unchanged from the packet): (1) the claim handler in turso_queue.rs attaches per-queue counts (queued, at_cap_queued, queued_not_yet_due, parked_due) to the no-row response envelope; (2) client claim_output prints those counts to stderr as the no-claim diagnostic, stdout contract unchanged; (3) unit test: null row + counts envelope produces a diagnostic naming the at-cap count. Acceptance includes cargo test -p fleet-queue green and the repo-queue claim prints an all-null task row instead of the claimed task (broker /claim works) #5486/repo-queue: claim can hand out a payload-null task, and list views cannot recover a live claim by lane #5444 claim-contract tests still passing.
- Why parked: this lane claimed the task in the last minutes of its ~240-minute shift budget; a Rust change + cargo test cycle + PR cannot be done responsibly in the remainder. Parked 30 minutes so a fresh full-budget lane takes it with this verification already recorded — resume at the claim handler in turso_queue.rs, no re-verification needed beyond a fresh gh state check.
- Links: task 20074 · task 18591 · issue fleet(queue): claim that finds nothing names why - surface at-cap / not-due counts in the no-claim diagnostic (follow-on #2937 acceptance 4) #8154
dezren39 commented on Nov 17, 2026 🤖 Agent note · state: fixed (crate change merged; lights up on fleet deploy)
- Agent: queue worker (repo-worker-code), lane any-e
- Session / ID: task 20074
- Found via: queue claim
The #2937 acceptance-4 follow-on is implemented and merged in PR #11232 (squash ad78d91):
- The broker's no-row claim envelope now carries scoped counts —
queued, at_cap_queued, queued_not_yet_due, parked_due — from a new no_claim_counts aggregate in turso_queue.rs (same scope the claim searched; /claim-flow and empty batch claims included).
- The client prints a diagnostic naming the reason instead of the bare line — e.g.
repo-queue: no claimable task — 7 queued (7 at the attempt cap, 0 not yet due), 2 parked due (#8154); every queued task is at the attempt cap — and carries the counts on the printed {task: null} envelope. Stdout contract and exit 5 unchanged; envelopes without counts (older broker) keep the bare line.
- Tests:
cargo test -p fleet-queue --locked --all-features — 396 passed, incl. new oracles no_claim_counts_query_shape_8154 and no_claim_diagnostic_names_at_cap_reason_8154; repo-queue claim prints an all-null task row instead of the claimed task (broker /claim works) #5486/repo-queue: claim can hand out a payload-null task, and list views cannot recover a live claim by lane #5444 claim-contract tests pass unchanged.
Per the packet scope, broker deploy mechanics are excluded: the diagnostic becomes live when the fleet-queue build rolls out through the normal fleet deploy. Closing this issue on that basis — the remaining step is deploy, not code.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|