GeezerVison is showing github.com — fleet(queue): repo-queue list --limit accepts 0, negative, and unbounded values — 0 silently reports '(no tasks)', and the broker forwards the value verbatim to PostgREST · Issue #6419 · developing-today/code
fleet(queue): repo-queue list --limit accepts 0, negative, and unbounded values — 0 silently reports '(no tasks)', and the broker forwards the value verbatim to PostgREST #6419Descriptionfleet(queue): repo-queue list --limit accepts 0, negative, and unbounded values — 0 silently reports "(no tasks)", and the broker forwards the value verbatim to PostgREST
Evidence (verified this run, origin/main 669788ab0344)
Neither end of the list path validates the limit's range:
Verified on the laptop with the real repo-queue binary (built this run from the laptop primary; client.rs/queue_broker.rs limit paths are identical HEAD..origin/main) against a recording stub broker (probe ~/git/fleet/probe-queue-limit, REPO_QUEUE_BROKER_URL direct transport):
| invocation |
recorded /list body |
exit |
list --limit 0 |
"limit":0 |
0 |
list --limit -5 |
"limit":-5 |
0 |
list --limit 999999999 |
"limit":999999999 |
0 |
list --limit 20 (control) |
"limit":20 |
0 |
list --limit abc (control, #5939) |
— rejected: argument --limit: invalid int value "abc" |
2 |
Consequences, by value:
Why it matters
repo-queue list is the fleet's own visibility surface — lanes and monitors use it to decide whether work exists. A limit that can silently mean "show nothing, successfully" undermines exactly the checks that rely on it (a Step-0 gate or a human checking a queue with --limit 0 in a script sees an empty queue that is not empty). The fix layer is a triage call: client-side range validation (consistent with #5939's loud-error pattern), a broker-side clamp/reject (the broker is the trust boundary for non-CLI callers, e.g. the claimant's rich list reads), or both.
Acceptance criteria
-
repo-queue list --limit 0 and negative values are rejected with a usage error naming --limit (exit 2), consistent with the fleet(queue): repo-queue client parser silently overwrites duplicate flags, accepts --dry-run=false as true, and silently defaults a non-numeric --limit #5939 non-numeric error — or, if a clamp is chosen instead, the chosen semantics are documented in the --help/command docs and pinned by tests. Silent (no tasks) for a configured 0 is not an acceptable outcome.
- The broker's
/list handler validates or clamps the limit it interpolates into the PostgREST query, so a non-CLI caller cannot drive a negative or unbounded select through it.
- A sane maximum exists (value is triage's call) and is enforced on the client and/or broker;
--limit 20 and the default (absent flag → 20) behave exactly as before.
- Tests pin the boundary: 0, -1, the maximum, maximum+1, and the default; the existing fleet(queue): repo-queue client parser silently overwrites duplicate flags, accepts --dry-run=false as true, and silently defaults a non-numeric --limit #5939 non-numeric rejection test still passes.
- Same-pass audit note: the sibling
get_i64 flags (--lease-seconds at claim, --extend-seconds at heartbeat, --delay-seconds) share the range-unchecked parse — triage records whether each is already validated downstream (SQL/broker) or needs the same treatment; this issue's fix is not blocked on that audit.
Activitydeveloping-today commented on Nov 6, 2026 added kind/bugSomething isn't working (prefixed form of the classic bug label) task/triageQueue packet kind: verify, reproduce, and route this item app/fleetpkgs/fleet multicall binary + platform crates on Nov 6, 2026dezren39 commented on Nov 6, 2026 🤖 Agent note · filed
- Agent: new-issue-creator (new-issue-creator-code-a)
- Session / ID: cron new-issue-creator-code-a, run 2026-11-05 19:35 CST
- Found via: filed this run
- Task: Filed after verifying this run on the laptop: the real repo-queue binary (probe ~/git/fleet/probe-queue-limit, recording stub broker) sends --limit 0 / -5 / 999999999 verbatim to the broker with exit 0, and queue_broker.rs /list interpolates the value unchecked into the PostgREST query; --limit abc correctly rejected (control, fleet(queue): repo-queue client parser silently overwrites duplicate flags, accepts --dry-run=false as true, and silently defaults a non-numeric --limit #5939).
- Expectation: effort s — triage decides the validation layer (client, broker, or both) and the maximum; fix then validates range on both ends with boundary tests.
- Links: queue packet enqueued to repo-health-code-pilot this run (task id in the backlog entry)
dezren39 commented on Nov 6, 2026 🤖 Agent note · handed off
- Agent: queue worker (repo-worker-code), lane code-h
- Session / ID: task 10850
- Found via: queue claim
- Task: task 10850 (triage, issue fleet(queue): repo-queue list --limit accepts 0, negative, and unbounded values — 0 silently reports '(no tasks)', and the broker forwards the value verbatim to PostgREST #6419) assigned to execution lane opencode; handing off to the opencode claimant for a bound session. Issue revalidated OPEN, no hard-stop labels (held / user/owned / do-not-merge / do-not-auto-edit).
- Expectation: claimant launches the bound opencode session; done = work per task 10850 packet on issue fleet(queue): repo-queue list --limit accepts 0, negative, and unbounded values — 0 silently reports '(no tasks)', and the broker forwards the value verbatim to PostgREST #6419.
- Links: task 10850 · issue fleet(queue): repo-queue list --limit accepts 0, negative, and unbounded values — 0 silently reports '(no tasks)', and the broker forwards the value verbatim to PostgREST #6419
dezren39 commented on Nov 6, 2026 dezren39 commented on Nov 6, 2026 🤖 Agent note · parked
- Agent: queue worker (repo-worker-code), lane code-v
- Session / ID: task 11209
- Found via: queue claim (resume — PR already existed for task 11209)
- Task: Verified PR fleet(queue): validate list --limit range on client and broker (#6419) #6556 implements issue fleet(queue): repo-queue list --limit accepts 0, negative, and unbounded values — 0 silently reports '(no tasks)', and the broker forwards the value verbatim to PostgREST #6419 (client + broker
list --limit range validation, 1..=500, reject-not-clamp, tests pin 0/-1/max/max+1/default; Codex review completed with no findings). CI (scripts-test) is still pending, so task 11209 parks instead of waiting.
- Expectation: on resume, recheck PR fleet(queue): validate list --limit range on client and broker (#6419) #6556 checks fresh and merge under the standing criteria when green.
- Links: issue fleet(queue): repo-queue list --limit accepts 0, negative, and unbounded values — 0 silently reports '(no tasks)', and the broker forwards the value verbatim to PostgREST #6419, PR fleet(queue): validate list --limit range on client and broker (#6419) #6556, branch queue/11209-6419-limit-validation
dezren39 commented on Nov 6, 2026 🤖 Agent note · done
- Agent: queue worker (repo-worker-code), lane code-t
- Session / ID: cron repo-queue-worker-shift-t, run 2026-11-06 10:59 CST; task 11209
- Task: task 11209 (small_fix, issue fleet(queue): repo-queue list --limit accepts 0, negative, and unbounded values — 0 silently reports '(no tasks)', and the broker forwards the value verbatim to PostgREST #6419) resumed at stage awaiting_ci — PR fleet(queue): validate list --limit range on client and broker (#6419) #6556 verified fresh (head 62c8230 matches the Codex-reviewed commit; Codex review completed, no findings; diff is exactly the packet scope: client.rs + queue_broker.rs) and merged: merge commit b0c472d. Issue fleet(queue): repo-queue list --limit accepts 0, negative, and unbounded values — 0 silently reports '(no tasks)', and the broker forwards the value verbatim to PostgREST #6419 closed by the merge.
- Tests: cargo test -p fleet-queue --features client,queue-broker — 35 passed incl. new list-limit boundary tests (prior lane, recorded in task checkpoint; branch untouched since).
- CI note: scripts-test (3.12/3.14) sat QUEUED with no runner (known infra issue, also seen on PR fleet-queue(uds_http): validate Content-Length in read_request (#6527) #6529 earlier today); this PR is Rust-only, so the queued Python suite is unrelated. Merged under the standing merge criteria with the change itself verified.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|