GeezerVison is showing github.com — fleet-proxy(udp-forward): fleet-udp-forward silently overwrites duplicate scalar flags — last --target/--proxy/--bind/--ports wins · Issue #6139 · developing-today/code
fleet-proxy(udp-forward): fleet-udp-forward silently overwrites duplicate scalar flags — last --target/--proxy/--bind/--ports wins #6139Descriptionfleet-proxy(udp-forward): fleet-udp-forward silently overwrites duplicate scalar flags — last --target/--proxy/--bind/--ports wins
Summary
The CONNECT-UDP client shim bin fleet-udp-forward
(pkgs/fleet/crates/fleet-proxy/src/bin/fleet-udp-forward.rs, landed
in PR #6122 for #6109) parses its flags in a hand-rolled loop
(lines 52–75) where every scalar flag assigns unconditionally:
proxy = v (line 53), bind = ip (line 58), target = Some(v)
(line 64), ports = Some(v) (line 68). Repeating any of them silently
discards the first value — no error, no warning. Only --map is
repeatable by design (it pushes onto a Vec, line 71–75).
This is the silent-flag-loss class already filed per-parser for the
fleet's other hand-rolled parsers — #5939 (repo-queue client),
#5929 (proxy connect), #5713 (fleet-dispatch) — on the one parser
those filings could not cover: this bin was written after them.
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-udp-forward in pkgs/fleet.
fleet-udp-forward --target first.example --target second.example --ports 47998
binds and serves with the second target, printing
fleet udp-forward: udp:127.0.0.1:47998 -> second.example:47998 via 127.0.0.1:3131
(ran until timeout, exit 124). first.example is discarded with no
mention anywhere.
fleet-udp-forward --proxy 127.0.0.1:1111 --proxy 127.0.0.1:2222 --map 47998=127.0.0.1:47999
serves via 127.0.0.1:2222 — the first proxy address is silently
dropped the same way.
A script that concatenates a default flag set with an override set
(the usual way these duplicates happen) gets a forwarder pointed at
whichever value came last, with the run looking entirely successful.
Why it matters
Acceptance criteria
- Repeating any scalar flag (
--proxy, --bind, --target,
--ports) in one invocation is a usage error naming the flag
(stderr + usage, exit EXIT_USAGE = 2), before anything binds.
--map remains repeatable and accumulates, as documented.
- Single-occurrence invocations behave byte-identically to today,
including the --help surface.
- Pinning tests cover each rejected duplicate shape plus the
repeatable---map and single-value controls; cargo test -p fleet-proxy stays green.
Activitydeveloping-today commented on Nov 5, 2026 dezren39 commented on Nov 5, 2026 🤖 Agent note · filed
- Agent: new-issue-creator job (lane A, slug
new-issue-creator-code-a)
- Session / ID: cron job
new-issue-creator-code-a, run 2026-11-05 01:35 CST
- Found via: filed this run
- Task: fleet-udp-forward silently overwrites duplicate scalar flags (last --target/--proxy/--bind/--ports wins; verified with the real binary on the laptop @7a980eb4cf). Sibling of fleet-proxy(connect-udp): fleet-connect-udp ignores argv entirely — --help and typo'd flags start the CONNECT-UDP endpoint #6134 (same PR fleet-proxy: CONNECT-UDP client shim + standalone endpoint bins (#6109) #6122, the endpoint bin's missing argument surface); same silent-flag-loss class as fleet(queue): repo-queue client parser silently overwrites duplicate flags, accepts --dry-run=false as true, and silently defaults a non-numeric --limit #5939/fleet(proxy):
proxy connect silently overwrites duplicate flags and silently drops modes — repeated --host/--port/--request/--body last-wins, --stdio eats --request, --print-path eats --request, --host/--port without --stdio are no-ops #5929/fleet(dispatch): duplicate and contradictory flags silently resolved — repeated values overwrite, --no-* always beats --* #5713 on their parsers. Packet enqueued for a small fix.
- Expectation: effort s — done when repeated scalar flags are usage errors naming the flag, --map stays repeatable, and single-value invocations are unchanged.
- Links: packet
packet-6139-fix.json (queue repo-health-code-pilot); body file hidden_files/issue-fleet-udp-forward-dup-flags.md
dezren39 commented on Nov 5, 2026 dezren39 commented on Nov 5, 2026 🤖 Agent note · done — fixed + merged
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|