Eighteen new tests, zero production-code changes; every line the
review attributed in §N-8 is now covered (verified by a
`cargo llvm-cov --show-missing-lines` before/after diff).
- producer: the datagram stage's failure exits pinned as direct unit
tests on `run_datagram_stage` (the serve layer discards StageExit,
so the unit shape is the only place the exact matrix is assertable)
— `ReplyFrameRejected` (a joint-bound-violating reply), `EgressEnded`
via `next_reply`'s Err, `Io` via a failing write and a failing read;
the `send`-failure arm got the serve-layer drop-witness treatment
(full ASSOCIATE conversation, EOF after the refusal, the drop flag
flips — teardown-at-birth on the failure path)
- producer: the quiet wait's `Err(_)` arm (a read *error* ends the
wait `Ok(())`, the accept future drops with its owned state — the
client-gone contract's error-shaped twin; driven directly on
`bind_quiet_wait_and_serve`) and the BIND reply#2 Domain-peer
fallback (`TargetAddr::Domain(_, port)` → `0.0.0.0:port`, the data
plane live end to end)
- producer: the establisher's `None`-witness arm (the registration's
optional witness seam) added to the existing unit test
- consumer: the two front-door-bridge `split`s tested on live
`Socks5Stream<BiStream>` streams via `build_skip_auth_bi_stream`
(two duplexes joined the `open_and_negotiate` shape) — raw framed
bytes through both halves; the BIND split leaves the take-guard
untouched (`await_inbound` still reads the reply#2 phase)
- consumer: the single-arm residue — spent `send_datagram`'s `Io` arm
(+ the spent-`recv` `Ok(None)` shape asserted alongside), the
mid-batch later-frame `Err` dropping the pending `Ok`s (the
fail-loud-drops-pending semantics), ASSOCIATE `into_inner`'s `Ok`
pairing, `BindDataPlane`'s `poll_flush`/`poll_shutdown`
passthroughs (the BIND door's half-close), `read_reply2`'s
version pin (a foreign producer's non-5 reply#2), the
ASSOCIATE/BIND session `Debug` bodies, the spent-`close` no-op
- egress/error: the three seam-handle `Debug` renders
(TargetHandle / BindTargetHandle / BindAccept) and
`SocksEstablishmentReason`'s `Display` (each variant renders as
its canonical wire code)
Coverage: 96.31% regions / 97.22% lines; no new accepted-uncovered
entries (the residual uncovered lines are the pre-existing
out-of-scope set + producer.rs 188-189's untestable `accept_bi`
substrate-failure log arm). One test-only select-shape discovery
recorded in the task Notes: `tokio::select!`'s random branch order
can drop a not-yet-polled accept future before its owned state
exists — the quiet-wait test parks once before erroring so both
branches are guaranteed started.
Verification: `cargo test` + `--all-features` green (375 tests),
clippy `-D warnings` clean (native + wasm), fmt clean, `cargo doc`
clean, both wasm checks clean.