GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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 #6419

New issue
Copy link
New issue
Copy link
Closed
#6556
Closed
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
#6556
Copy link
Labels
app/fleetpkgs/fleet multicall binary + platform crateskind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobsource/design-architectFiled by the repo design architect jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

Description

@dezren39
dezren39
opened on Nov 6, 2026
Issue body actions

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

Evidence (verified this run, origin/main 669788ab0344)

Neither end of the list path validates the limit's range:

  • Client — pkgs/fleet/crates/fleet-queue/src/client.rs: parse_i64_flag (:579-582) accepts any i64 (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 fix made non-numeric values a loud error, but range was never checked), and cmd_list (:875, :883) sends the parsed value verbatim as "limit".
  • Broker — pkgs/fleet/crates/fleet-queue/src/queue_broker.rs: the /list handler (:492) takes req.get("limit").and_then(|l| l.as_i64()).unwrap_or(20) and interpolates it unchecked into the PostgREST query (:502-505): tasks?select=…&limit={limit}.

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:

  • --limit 0 → PostgREST limit=0 returns zero rows → the client prints (no tasks) and exits 0, even when the queue is non-empty. A typo'd or scripted 0 reads as an empty queue — the false-empty misreport class (cf. fleet(queue): repo-queue client accepts empty REPO_QUEUE_DEFAULT_QUEUE / REPO_QUEUE_SIGNAL_PATH — silently uses queue "" and fails signal writes with a blank path #6314, where an empty queue name also reported "(no tasks)").
  • Negative → forwarded verbatim; PostgREST rejects a negative limit, so the operator gets a downstream database-API error instead of a usage error naming the flag.
  • Huge → no cap on either side: the broker issues an unbounded select and streams/prints the whole result set.

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.

Activity

Next
  1. developing-today commented on Nov 6, 2026

    @developing-today
    developing-todayBot
    on Nov 6, 2026 – with developing.today
    Contributor
    More actions

    CODE-1921

  2. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    queue/queuedHas a queued queue task
    source/creatorFiled by the new-issue-creator job
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/needs-triageNot yet triaged; needs a first look
    priority/normalOrdinary priority (the default)
    app/fleetpkgs/fleet multicall binary + platform crates
    on Nov 6, 2026
  3. dezren39 commented on Nov 6, 2026

    @dezren39
    dezren39
    on Nov 6, 2026
    MemberAuthor
    More actions

    🤖 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)
  4. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Nov 6, 2026
  5. dezren39 commented on Nov 6, 2026

    @dezren39
    dezren39
    on Nov 6, 2026
    MemberAuthor
    More actions

    🤖 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
  6. 50 remaining items

  7. dezren39
    added
    status/in-progressQueue worker lifecycle state
    on Nov 6, 2026
  8. dezren39 commented on Nov 6, 2026

    @dezren39
    dezren39
    on Nov 6, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), lane code-v
    • Session / ID: task 11209
    • Found via: queue claim
    • Task: Working task 11209 for 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 directly (execution lane direct).
    • Expectation: work to a verified terminal state in this shift.
    • 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
  9. dezren39 commented on Nov 6, 2026

    @dezren39
    dezren39
    on Nov 6, 2026
    MemberAuthor
    More actions

    🤖 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
  10. dezren39
    added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    on Nov 6, 2026
  11. dezren39
    added a commit that references this issue on Nov 6, 2026

    Merge pull request #6556 from developing-today/queue/11209-6419-limit…

    b0c472d
  12. dezren39
    closed this as completedin #6556on Nov 6, 2026
  13. dezren39 commented on Nov 6, 2026

    @dezren39
    dezren39
    on Nov 6, 2026
    MemberAuthor
    More actions

    🤖 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.
  14. dezren39
    removed
    status:in-review
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    work/assignedQueue worker lifecycle state
    on Nov 6, 2026
  15. developing-today
    added
    status:done
    on Nov 6, 2026
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/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobsource/design-architectFiled by the repo design architect jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.