Skip to content

fleet(queue): repo-queue silently ignores extra positional arguments on every verb #5592

Closed

Description

@dezren39

fleet(queue): repo-queue silently ignores extra positional arguments on every verb

Evidence

pkgs/fleet/crates/fleet-queue/src/client.rs:

  • parse_args (line 471) collects positional arguments into Args.pos, and rejects unknown --flags with exit 2 — but no verb ever checks how many positionals it received.
  • cmd_validate (line 669) and cmd_enqueue (line 687) use only args.pos.first() — a second packet path is silently dropped, so repo-queue validate a.json b.json validates (and enqueue enqueues) only a.json while the caller believes both were processed.
  • cmd_health (line 1137), cmd_list (line 768), and cmd_signal (line 1174) never read pos at all — any stray positional is silently ignored.
  • The task verbs (lane, bind, heartbeat, checkpoint, park, block, cancel, fail, complete) read only pos_i64(0, "task_id") — a second positional (a typo'd extra id, a stray word) is silently dropped, so repo-queue complete <task> <something-else> completes the task and reports success.

Verified this run with the shipped binary on the laptop (~/.local/bin/repo-queue, probe ~/git/fleet/probe-rq-posargs):

  • repo-queue health junkpositional → exit 0, full health table printed (positional ignored).
  • repo-queue list junkpositional --limit 1 → exit 0, task list printed (positional ignored).
  • Control: repo-queue health --bogus-flag → exit 2, unrecognized argument — flags are validated, positionals are not.

Why it matters

repo-queue is the fleet's own control-plane client: creator/monitor/worker automation and humans drive queue state through it. A silently ignored positional means a mistyped command does something other than what the caller asked — validating/enqueueing the wrong (first) packet, or completing/parking the intended task while an extra argument the caller meant as a guard vanishes — and exits 0, so scripts cannot detect the mistake. This is the same silent-arg-discard class fixed for the fleet multicall leaves in #5560/#5575, on the one client those fixes did not cover.

Acceptance criteria

  • Every repo-queue verb rejects an unexpected positional argument count with a usage error (exit 2) naming the verb and the offending argument, before any broker call: exactly 1 positional for validate/enqueue (packet path) and the task verbs (task_id); exactly 0 for list/health/signal.
  • A unit test pins the arity check (extra positional rejected; correct counts accepted).
  • Existing behavior is otherwise unchanged: unknown --flags still exit 2, valid invocations of every verb behave as before.
  • cargo test -p fleet-queue passes.

Activity

  1. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    source/creatorFiled by the new-issue-creator job
    on Nov 4, 2026
  2. developing-today commented on Nov 4, 2026

    @developing-today
    Contributor
  3. added
    priority/normalOrdinary priority (the default)
    work/self-assignedAn agent grabbed this item directly, outside the queue
    app/fleetpkgs/fleet multicall binary + platform crates
    on Nov 4, 2026
  4. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · filed

    • Agent: new-issue-creator-code-a (issue creator, lane A)
    • Session / ID: cron new-issue-creator-code-a, run 2026-11-04 11:05 CST
    • Found via: filed this run
    • Task: repo-queue client silently ignores extra positional arguments on every verb; verified with the shipped binary on the laptop (probe ~/git/fleet/probe-rq-posargs: health junkpositional and list junkpositional exit 0 doing the real operation; --bogus-flag control correctly exits 2). Guarded self-solve this run under lifecycle protocol §4 (trivial, clearly scoped).
    • Expectation: effort/xs — per-verb positional arity check (exit 2 before any broker call) + pinning test; PR merged this run.
    • Links: probe ~/git/fleet/probe-rq-posargs (laptop)
  5. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

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 jobstatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions