Skip to content

fleet(help): fleet help <domain> <extra> silently ignores every argument after the domain name #5652

Closed

Description

@dezren39

fleet(help): fleet help <domain> <extra> silently ignores every argument after the domain name

Summary

The root help built-in takes exactly one argument — a domain name — but never
checks for extras. fleet help queue --bogus-junk (or any trailing token)
prints the queue domain help and exits 0, silently discarding the extra
argument. Every sibling root built-in rejects this shape: version,
capabilities, and --version/-V all route through reject_extra_args
and exit 2 naming the unexpected argument (#5572: "Root built-ins take no
arguments: a trailing argument is a usage error naming it, not silently
discarded output"). The help arm is the one root built-in the #5572 sweep
missed, because its first argument is legitimate.

Evidence

pkgs/fleet/crates/fleet/src/main.rs, run_root:

  • Lines 669–672: bare fleet help (one token) prints the full registry help.
  • Lines 673–684: the Some("help") arm resolves args.get(1) as a domain and
    prints its help — args.get(2..) is never inspected.
  • Contrast lines ~686–707: --version/version/capabilities each call
    reject_extra_args(args) first (which names args[1], correct there
    because those built-ins take no argument at all).

Verified this run against the real binary on the laptop
(pkgs/fleet/target/debug/fleet, built 2026-11-04 12:09 CST from this tree;
the run_root help arm at HEAD 9af042edd0 is the code quoted above):

$ fleet help queue --bogus-junk
fleet queue — Repo work queue: enqueue, claim, and complete tasks through the queue broker.
... (full domain help) ...
EXIT:0

$ fleet help queue            # control: identical output
EXIT:0

$ fleet version --bogus-junk  # sibling control (#5572 behavior)
error: unexpected argument '--bogus-junk' for 'fleet version'
EXIT:2

Why it matters

This is the same silent-discard bug class the fleet CLI has been closing leaf
by leaf (#5572, #5575, #5592, #5603, #5607): a user who mistypes
fleet help queue claim — plausibly asking for help on the claim
subcommand — gets the domain help with a success exit and no signal that the
second word was dropped, instead of either subcommand help or a usage error.
Scripts and muscle memory both read exit 0 as "that was a valid invocation."

Acceptance criteria

  • fleet help <domain> <extra> (one or more extras) exits 2 with a usage
    error naming the first unexpected argument, consistent with the
    reject_extra_args message shape (unexpected argument '<extra>' for 'fleet help').
  • fleet help, fleet help <domain>, fleet --help, and the unknown-domain
    error (fleet help nosuchdomain) behave exactly as today.
  • A pinning test covers the extra-argument rejection alongside the existing
    root built-in arity tests in crates/fleet/src/main.rs.

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 job (new-issue-creator-code-b)
    • Session / ID: cron job new-issue-creator-code-b, run 2026-11-04T20:58:45Z
    • Found via: filed this run
    • Task: Filed this issue — the root help built-in in run_root (pkgs/fleet/crates/fleet/src/main.rs) resolves args[1] as a domain and never inspects args[2..], so fleet help queue --bogus-junk prints the queue help and exits 0 while sibling built-ins reject extras at exit 2 (fleet: root built-ins (version / capabilities / --version) silently ignore trailing arguments #5572). Verified this run against the real laptop binary (help-with-extra exit 0, identical to the bare-domain control; fleet version --bogus-junk exit 2 naming the argument). Guarded self-solve this run (lifecycle protocol §4): trivial, clearly scoped, no safety labels.
    • Expectation: effort xs — reject extras after the domain name with a usage error naming the first one, plus a pinning test; PR + merge this run.
    • Links: evidence in the issue body (body file: hidden_files/issue-fleet-help-extra-args.md).
  5. developing-today commented on Nov 4, 2026

    @developing-today
    Contributor

    🤖 Agent note · done

    • Agent: new-issue-creator job (new-issue-creator-code-b)
    • Session / ID: cron job new-issue-creator-code-b, run 2026-11-04T21:02:13Z
    • Found via: filed this run
    • Task: Self-solved under the guarded self-solve rule (lifecycle protocol §4). PR fix(fleet): reject arguments after the domain name in fleet help (#5652) #5653 squash-merged (5e53fd5): run_root's help arm now rejects the first argument after the domain name with the standard usage error (unexpected argument '<extra>' for 'fleet help', exit 2) before printing help; new pinning test root_help_rejects_arguments_after_the_domain_name. cargo test -p fleet 10 passed on the laptop, fmt applied; fixed binary re-probed (extra → exit 2 naming it; help queue → 0; unknown domain → 2; bare help → 0). Work labels stripped; worktree/branch removed.
    • Expectation: closed — no follow-up.
    • Links: PR fix(fleet): reject arguments after the domain name in fleet help (#5652) #5653; body file hidden_files/issue-fleet-help-extra-args.md.
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