Repository navigation
Description
Bug: fleet dispatch status silently ignores all arguments — --help performs a live GET /health instead of printing help, and typos are swallowed
pkgs/fleet/crates/fleet-dispatch/src/lib.rs (new in step 4, #5432):
run()routes the verb and discards the rest of argv forstatus:
Some("status") => verb_status(config),verb_status(config)takes no argument list at all — it unconditionally
picks a transport and exchangesGET /health.- Its sibling verbs behave differently:
verb_launch/verb_enqueueboth
scan for--help/-hfirst and print their usage with no network
call, and their arguments go throughparse_args, which rejects
unknown options with a usage error (exit 2).
So fleet dispatch status --help does a real network request (possibly a
CONNECT tunnel through the proxy egress on the sandbox seat) and prints the
service's health JSON; fleet dispatch status --bogus-junk (or any stray
positional/typo) is silently accepted and does the same. There is no way to
ask what status accepts, and a mistyped invocation looks like a
successful health check.
Verified this run (laptop probe, real crate @ main 7cd293e)
Probe crate ~/git/fleet/probe-dispatch-status (path-dep on the real
fleet-dispatch) calling fleet_dispatch::run with
[dispatch] url = http://127.0.0.1:48931 pointed at a fake pm-dispatch
server that logs requests and returns {"ok":true,"build":"probe"}:
- Case 1 —
status --help: printed the health JSON + transport line,
exit 0; server log showsGET /health. No help text. - Case 2 —
status --bogus-junk: identical output, exit 0; server log
showsGET /health. The unknown argument was never rejected. - Case 3 — control,
status: same output, exit 0,GET /health
(correct behavior). - Case 4 — control,
launch --help: printedUsage: fleet dispatch launch …, exit 0, no server hit.
Server log after all four cases: exactly three GET /health lines
(cases 1–3).
Why it matters
- Same bug class as fleet: serve <role> --help (and the queue-broker/secrets-broker argv0 aliases) starts the daemon instead of printing help #5488 (
serve <role> --helpstarting the daemon):
a help flag that triggers real work instead of printing help erodes the
CLI contract the fleet multicall is built around (§3: help is always
available, never has side effects). - Silently ignored arguments hide operator typos — e.g. an intended
filter/limit flag on a status check appears to succeed, so scripts and
humans trust output for a different invocation than the one they typed.
Acceptance criteria
-
fleet dispatch status --help(and-h) prints a status usage
text and performs no network request, mirroring
launch/enqueue. -
fleet dispatch status <anything-else>fails with a usage error
(exit 2) naming the unexpected argument, before any transport is
opened. - Bare
fleet dispatch statusis unchanged:GET /health, health
JSON +transportline, exit 0. - Unit tests pin all three behaviors (help returns without touching
the network; unknown args are usage errors; the help/rejection
paths need no live service). -
cargo test -p fleet-dispatchgreen.
Activity
dezren39 commentedon Nov 4, 2026
🤖 Agent note · filed
fleet dispatch statusignoring all arguments —--help/-hprints status usage with no network call; any other argument is a usage error (exit 2) before transport; barestatusunchanged. Verified pre-filing with a laptop probe (real fleet-dispatch crate @ 7cd293e) against a fake pm-dispatch server:status --helpandstatus --bogus-junkboth issuedGET /healthand printed health JSON, whilelaunch --helpprinted usage with no server hit.cargo test -p fleet-dispatchgreen on the laptop, probe re-run shows help/rejection make no server request. Guarded self-solve this run (trivial, small, low-risk).~/git/fleet/probe-dispatch-status(laptop); body evidence in the issue.fix(fleet-dispatch): status honors --help and rejects stray arguments (…
dezren39 commentedon Nov 4, 2026
🤖 Agent note · done
verb_statusnow takes the verb's args:--help/-hprintsSTATUS_USAGEand returns before any transport is opened; any other argument is a usage error (exit 2) naming it; barestatusunchanged. New pinning teststatus_help_and_rejection_need_no_service.cargo test -p fleet-dispatchgreen on the laptop (7 passed, fmt applied); behavioral re-probe against the fixed crate (fake pm-dispatch server):status --help→ usage, exit 0, no request;status --bogus-junk→ usage error, exit 2, no request; barestatus→ health JSON, exit 0; server log shows exactly oneGET /health(the control). Worktree/branch removed; laptop primary fast-forwarded to merged main.~/git/fleet/probe-dispatch-status(pre-fix) and~/git/fleet/probe-dispatch-fixed(post-fix) on the laptop.