Skip to content

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

Closed

Description

@dezren39

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 / --port assign with
    out.host = Some(...) / out.port = Some(...): a repeat overwrites
    with no error.
  • src/client.rs:293-311 — --request assigns a fresh
    RequestArgs { service_port: None, token_file: None, body: None }:
    a second --request silently discards the first request and every
    modifier (--service-port, --token-file, --body) already
    attached to it.
  • src/client.rs:335-348 — --body likewise overwrites silently.
  • src/client.rs:366-373 (run_connect) — the stdio branch returns
    first: --stdio --request GET /x relays stdio and the request is
    never sent, with no error.
  • src/client.rs:387-391 — without --stdio, the print_path branch
    returns before the request branch: --print-path --request GET /x
    prints the shims path, exits 0, and the request is never sent.
  • --host / --port are 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 in CONNECT_USAGE and pinned by a test.
  • Mutually exclusive modes are rejected or given a documented,
    tested precedence: --stdio with --request, and --print-path
    with --request, must not silently drop the request.
  • --host / --port without --stdio are a usage error naming the
    requirement (or are honored some other documented way).
  • Pinning tests in fleet-proxy cover each rejected shape plus the
    well-formed control shapes (single --request with modifiers,
    --stdio --host --port, bare --print-path).
  • CONNECT_USAGE states the rules the parser enforces.

Activity

  1. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/triageQueue packet kind: verify, reproduce, and route this item
    source/creatorFiled by the new-issue-creator job
    priority/normalOrdinary priority (the default)
    app/fleetpkgs/fleet multicall binary + platform crates
    on Nov 5, 2026
  2. developing-today commented on Nov 5, 2026

    @developing-today
    Contributor
  3. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · filed

  4. added
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    and removed on Nov 5, 2026
  5. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  6. 210 remaining items

  7. dezren39 commented on Nov 6, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

  8. added
    work/assignedQueue worker lifecycle state
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    on Nov 8, 2026
  9. added a commit that references this issue on Nov 8, 2026
  10. added
    priority/lowNice to have; do when convenient
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    work/assignedQueue worker lifecycle state
    priority/normalOrdinary priority (the default)
    on Nov 8, 2026
  11. dezren39 commented on Nov 11, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done (already_done) — task 10942, lane code-c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

app/fleetpkgs/fleet multicall binary + platform crateskind/bugSomething isn't working (prefixed form of the classic bug label)priority/lowNice to have; do when convenientsource/creatorFiled by the new-issue-creator jobstatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions