GeezerVison is showing github.com — fleet-proxy(connect-udp): fleet-connect-udp ignores argv entirely — --help and typo'd flags start the CONNECT-UDP endpoint · Issue #6134 · developing-today/code
fleet-proxy(connect-udp): fleet-connect-udp ignores argv entirely — --help and typo'd flags start the CONNECT-UDP endpoint #6134Descriptionfleet-proxy(connect-udp): fleet-connect-udp ignores argv entirely — --help and typo'd flags start the CONNECT-UDP endpoint
Summary
The standalone CONNECT-UDP endpoint bin fleet-connect-udp
(pkgs/fleet/crates/fleet-proxy/src/bin/fleet-connect-udp.rs, landed in
PR #6122 for #6109) never reads its arguments. main() (line 19) goes
straight to fleet_config::Config::load() (line 20), the
connect_udp_enabled() gate (line 27), and
fleet_proxy::connect_udp::run(&config) (line 35). There is no usage
text, no --help handling, and no rejection of unknown arguments.
This is the #5488 class (a --help that starts a daemon instead of
printing help) combined with the #5568 class (trailing arguments
silently ignored), on a bin that starts a network endpoint.
Evidence (verified this run, laptop, real binary built from HEAD)
Laptop primary ~/git/code @ 7a980eb4cf; binary built with
cargo build -p fleet-proxy --bin fleet-connect-udp --bin fleet-udp-forward
in pkgs/fleet. Probe config /tmp/probe-cudp/fleet.toml:
[proxy] connect_udp = true, connect_udp_listen = "127.0.0.1:39199",
passed via FLEET_CONFIG.
- Bare:
fleet proxy connect-udp on 127.0.0.1:39199 (RFC 9298, spike #6109 …) — serves until killed (timeout exit 124). Expected.
--help: identical output — the endpoint binds and serves until
killed (exit 124). No usage is printed anywhere.
--bogus-junk: identical output — a typo'd flag silently starts
the endpoint (exit 124).
--help with no opt-in config: exit 69 with the "stays dark"
message — still no usage text.
Control, the sibling bin from the same PR: fleet-udp-forward --help
prints its usage line on stdout and exits 0;
fleet-udp-forward --bogus-junk prints unknown argument + usage and
exits 2 (EXIT_USAGE).
Why it matters
- An operator (or a service unit with a typo, or a curious
--help)
cannot discover the bin's interface, and a misspelled flag does not
fail fast — it starts a listening proxy endpoint instead. The bin is
deliberately dark until a host opts in via config, but once the
config opts in, any argument vector — including accidents — turns
the endpoint on.
- The fleet's other entry points all settled this exact question:
fleet: serve <role> --help (and the queue-broker/secrets-broker argv0 aliases) starts the daemon instead of printing help #5488/fleet: serve <role> --help prints domain help instead of starting the daemon #5492 (serve-role help), fleet: serve <broker-role> silently ignores all trailing arguments — a typo'd flag starts the daemon instead of erroring #5568 (serve trailing args), 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 #5619
(proxy connect/init help on stdout, exit 0), fleet: root built-ins (version / capabilities / --version) silently ignore trailing arguments #5572 (root built-ins
reject trailing args). This bin, written after all of them, follows
none of those precedents — it has no argument surface at all.
Acceptance criteria
fleet-connect-udp --help and -h print usage (what the bin is,
that it takes no arguments, and that behaviour is governed by the
loaded fleet config's [proxy] connect_udp opt-in) on stdout and
exit 0, without loading config or binding anything.
- Any other argument is a usage error: message naming the argument +
usage on stderr, exit EXIT_USAGE (2), without loading config or
binding anything.
- Bare
fleet-connect-udp behaviour is unchanged in both config
states (opted-in: endpoint serves; not opted in: stays-dark message,
exit 69).
- A pinning test or scripted probe covers the three shapes above
(help, unknown arg, bare) so the behaviour cannot regress silently;
cargo test -p fleet-proxy stays green.
Activitydeveloping-today commented on Nov 5, 2026 dezren39 commented on Nov 5, 2026 dezren39 commented on Nov 5, 2026
Lane A (code-a) claimed task 9933 for issue #6134 (direct execution lane). Fresh check: issue #6134 is OPEN, no hard-stop labels, no open PR. Working it directly this shift: branch, implement, PR. dezren39 commented on Nov 5, 2026 Sibling filed this run: #6139 covers the other bin from PR #6122 (fleet-udp-forward's duplicate scalar flags). The two fixes are independent — this issue is fleet-connect-udp's missing argument surface only. dezren39 commented on Nov 5, 2026
Done by lane A (code-a), task 9933: PR #6143 merged (merge commit 5be65e7) — fleet-connect-udp now classifies argv before loading config or binding: --help/-h print usage on stdout exit 0, any other argument exits 2 (EXIT_USAGE) naming it, bare behaviour unchanged in both config states. Verified on the laptop: cargo test -p fleet-proxy 46/46 (new pinning test bin_args_help_usage_error_and_bare), cargo fmt clean, real-binary probes for all shapes (help 0, bogus 2, bare-dark 69, bare-opted-in serves). Codex review on PR #6143: completed, no findings. Queue labels removed at this terminal state.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|