GeezerVison is showing github.com — fleet(proxy): `proxy connect --help` and `init --help` answer help through the error channel — exit 2 on stderr instead of usage on stdout at exit 0 · Issue #5619 · developing-today/code
fleet(proxy): proxy connect --help and init --help answer help through the error channel — exit 2 on stderr instead of usage on stdout at exit 0 #5619Descriptionfleet(proxy): proxy connect --help and init --help report help through the error channel — exit 2 on stderr instead of usage on stdout at exit 0
Summary
Two fleet proxy leaves answer a help request as if it were a usage
error. Every other leaf in the binary prints its usage to stdout and
exits 0 when asked (proxy serve --help since #5575, dispatch status/launch/enqueue --help since #5560, search --help, the root
and domain help). These two are the remaining outliers:
fleet proxy connect --help / -h — exit 2, usage text on
stderr prefixed fleet:, nothing on stdout.
fleet init --help / -h and fleet proxy init --help — exit
2, stderr fleet: fleet init takes no arguments (got "--help"):
the help flag is reported as an illegal argument.
Scripts and agents that probe a leaf with --help (the standard
"how do I call this" check, and the smoke-harness pattern) read a
failure where the binary was simply asked for its own usage.
Evidence (verified this run, real binary built from laptop primary @4733d598f, temp HOME)
$ fleet proxy connect --help → exit 2, stdout empty, stderr: fleet: usage: fleet proxy connect [--print-path] [--stdio [--host H] [--port N]] [--request METHOD PATH [--service-port N] [--token-file F] [--body JSON]]
$ fleet proxy connect -h → exit 2 (same)
$ fleet init --help → exit 2, stderr: fleet: fleet init takes no arguments (got "--help")
$ fleet init -h → exit 2 (same)
$ fleet proxy init --help → exit 2 (same)
controls:
$ fleet proxy serve --help → exit 0, usage on stdout
$ fleet dispatch status --help → exit 0, usage on stdout
$ fleet search --help → exit 0, usage on stdout
$ fleet --help → exit 0
Root cause (file:line at 4733d59)
pkgs/fleet/crates/fleet-proxy/src/client.rs:335-343 —
ConnectArgs::parse handles --help/-h by returning
Err(ClientError::Usage(<usage text>)); ClientError::Usage
maps to exit 2 (client.rs exit_code()), and the caller in
pkgs/fleet/crates/fleet/src/main.rs:589-595 prints it with
eprintln!("fleet: {e}"). The usage text exists — it is only
reachable through the error channel.
pkgs/fleet/crates/fleet-proxy/src/client.rs:435-446 —
run_init rejects any non-empty argv with the usage error
before checking for a help flag, so --help/-h hit the
"takes no arguments" rejection. Both entry points land here:
root fleet init (main.rs:692 → cmd_init → run_init_call,
main.rs:610) and fleet proxy init (main.rs:605).
No pinning test covers either leaf's help behavior (client.rs
has no test module).
Why it matters
Acceptance criteria
fleet proxy connect --help and -h print the connect usage to
stdout and exit 0, with no broker connection or spawn attempted.
fleet init --help / -h and fleet proxy init --help / -h
print the init usage to stdout and exit 0, with no probe, spawn,
or shim sync attempted.
- Non-help argument handling is unchanged:
fleet init <bogus>
still exits 2 naming the argument; proxy connect unknown
arguments still exit 2.
- New pinning tests cover both leaves' help forms (and the init
non-help rejection), in the style of the existing
proxy_serve_args_classify_help_and_reject_strays /
status_help_and_rejection_need_no_service tests.
cargo test -p fleet -p fleet-proxy green on the laptop or CI;
cargo fmt clean.
Activitydeveloping-today commented on Nov 4, 2026 dezren39 commented on Nov 4, 2026 dezren39 commented on Nov 4, 2026 🤖 Agent note · done
- Agent: new-issue-creator job (new-issue-creator-code-a)
- Session / ID: cron job new-issue-creator-code-a, run 2026-11-04 12:05 CST
- Found via: filed this run
- Task: Guarded self-solve complete —
proxy connect --help/-h and init --help/-h (root + proxy init) now print usage to stdout at exit 0; non-help rejection unchanged.
- Expectation: done — PR fix(fleet-proxy): proxy connect/init --help prints usage at exit 0 #5620 squash-merged (45be075);
cargo test -p fleet -p fleet-proxy green on the laptop (new pins proxy_connect_and_init_help_exit_ok, init_help_succeeds_without_touching_the_broker); fixed binary re-probed (all help forms exit 0 on stdout, --bogus forms still exit 2).
- Links: PR fix(fleet-proxy): proxy connect/init --help prints usage at exit 0 #5620 (merged)
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|