Repository navigation
Description
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
Summary
fleet proxy connect's hand-rolled parser (ConnectArgs::parse,
pkgs/fleet/crates/fleet-proxy/src/client.rs) silently discards user
input in two ways. This is the #5713 bug class (fleet-dispatch) on the
proxy-connect leaf; #5713's scope is the dispatch crate only, and the
earlier proxy-leaf filings (#5575 proxy serve, #5619 connect/init
--help) do not cover the connect parser's duplicate/mode handling.
Evidence (verified this run)
Code at developing-today/code@2c2219b2a1 (laptop primary):
src/client.rs:276-291—--host/--portassign with
out.host = Some(...)/out.port = Some(...): a repeat overwrites
with no error.src/client.rs:293-311—--requestassigns a fresh
RequestArgs { service_port: None, token_file: None, body: None }:
a second--requestsilently discards the first request and every
modifier (--service-port,--token-file,--body) already
attached to it.src/client.rs:335-348—--bodylikewise overwrites silently.src/client.rs:366-373(run_connect) — thestdiobranch returns
first:--stdio --request GET /xrelays stdio and the request is
never sent, with no error.src/client.rs:387-391— without--stdio, theprint_pathbranch
returns before the request branch:--print-path --request GET /x
prints the shims path, exits 0, and the request is never sent.--host/--portare only read on the stdio branch
(src/client.rs:367-371); off it they are parsed, stored, and never
used —fleet proxy connect --host other.example --port 2222
connects to the broker exactly as if they were absent.
Probe (real crate, laptop ~/git/fleet/probe-proxy-connect-args,
fleet-proxy with default-features = false, against
2c2219b2a1):
dup-host-port: host=Some("second.example") port=Some(2202) stdio=true
dup-request: method=POST path=/second service_port=None token_file=None body=None
dup-body: body=Some(Object {"b": Number(2)})
mode-mix: stdio=true print_path=true request=Some(("GET", "/x"))
host-port-no-stdio: host=Some("other.example") port=Some(2222) stdio=false
control: method=GET path=/ok service_port=Some(4800)
The control parses exactly; every duplicate/mixed case succeeds
silently with input lost.
Why it matters
proxy connect --request is the scripted one-shot request path over
the session broker, and --stdio --host/--port is the SSH
ProxyCommand path. A duplicated or mistyped flag in a script or an
SSH config currently sends a different request than written (the
second one, stripped of its service port / token file / body), or no
request at all at exit 0 — the exact silent-success failure shape the
fleet CLI has been eliminating leaf by leaf (#5572, #5592, #5603,
#5652, #5713). The --request case is the worst: losing
--token-file/--service-port changes which service is called and
with what credential, invisibly.
Acceptance criteria
- Repeating a value flag (
--host,--port,--request,
--service-port,--token-file,--body) is a usage error
(exit 2) naming the repeated flag, matching the fleet CLI's
established direction; or, if a repeat is deliberately meaningful,
it is documented inCONNECT_USAGEand pinned by a test. - Mutually exclusive modes are rejected or given a documented,
tested precedence:--stdiowith--request, and--print-path
with--request, must not silently drop the request. --host/--portwithout--stdioare a usage error naming the
requirement (or are honored some other documented way).- Pinning tests in
fleet-proxycover each rejected shape plus the
well-formed control shapes (single--requestwith modifiers,
--stdio --host --port, bare--print-path). CONNECT_USAGEstates the rules the parser enforces.
Activity
developing-today commentedon Nov 5, 2026
CODE-1606
dezren39 commentedon Nov 5, 2026
🤖 Agent note · filed
fleet proxy connect's ConnectArgs::parse (pkgs/fleet/crates/fleet-proxy/src/client.rs) silently overwrites duplicate value flags (a second--requestalso discards the first request's --service-port/--token-file/--body) and silently drops modes (run_connect: --stdio eats --request, --print-path eats --request at exit 0, --host/--port without --stdio are no-ops). Verified: laptop probe ~/git/fleet/probe-proxy-connect-args against the real fleet-proxy crate @2c2219b2a1 (all duplicate/mixed cases parse with input lost; control exact). Deduped vs fleet(dispatch): duplicate and contradictory flags silently resolved — repeated values overwrite, --no-* always beats --* #5713 (dispatch crate only), fleet:proxy serve --help(and any trailing argument) silently starts the session-proxy daemon #5575, fleet(proxy):proxy connect --helpandinit --helpanswer help through the error channel — exit 2 on stderr instead of usage on stdout at exit 0 #5619.dezren39 commentedon Nov 5, 2026
🤖 Agent note · handed off
proxy connectsilently overwrites duplicate flags and silently drops modes — repeated--host/--port/--request/--bodylast-wins,--stdioeats--request,--print-patheats--request,--host/--portwithout--stdioare no-ops #5929 (fleet proxy connect duplicate flags + mode precedence) — assigned to the opencode execution lane; handed off to the opencode claimant. Issue verified OPEN this shift, no hard-stop labels; claim labels applied.proxy connectsilently overwrites duplicate flags and silently drops modes — repeated--host/--port/--request/--bodylast-wins,--stdioeats--request,--print-patheats--request,--host/--portwithout--stdioare no-ops #5929.proxy connectsilently overwrites duplicate flags and silently drops modes — repeated--host/--port/--request/--bodylast-wins,--stdioeats--request,--print-patheats--request,--host/--portwithout--stdioare no-ops #5929210 remaining items
dezren39 commentedon Nov 6, 2026
🤖 Agent note · done
repo-worker-code, laneaea12c82-c5af-4e5a-9b66-f8e360f87177)Fixes #5929),cargo test -p fleet-proxypasses locally.Merge pull request #6537 from developing-today/queue/10942-5929-proxy…
dezren39 commentedon Nov 11, 2026
🤖 Agent note · done (already_done) — task 10942, lane code-c
proxy connectsilently overwrites duplicate flags and silently drops modes — repeated--host/--port/--request/--bodylast-wins,--stdioeats--request,--print-patheats--request,--host/--portwithout--stdioare no-ops #5929 is CLOSED, and PR fleet(proxy): reject duplicate and conflicting proxy connect flags (#5929) #6537 (branch queue/10942-5929-proxy-connect-flags — this task's branch; title matches the task exactly) is MERGED at 2026-11-08T16:04:25Z, merge commit 4af4ee8.already_done. Issue labels are already in their terminal shape (status:done present; no queue/claimed, status/in-progress, or work/assigned remain).