Skip to content

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

Description

@dezren39

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:

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

Activity

  1. developing-today commented on Nov 6, 2026

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

    @dezren39
    MemberAuthor

    🤖 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. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 6, 2026
  5. dezren39 commented on Nov 6, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  6. 50 remaining items

  7. dezren39 commented on Nov 6, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  8. dezren39 commented on Nov 6, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · parked

  9. added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    queue/claimedQueue worker lifecycle state
    on Nov 6, 2026
  10. added a commit that references this issue on Nov 6, 2026
  11. dezren39 commented on Nov 6, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

  12. removed
    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
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