87c52e5e4d06db0fa2ad007593962d4379a836ea
The stdout drainer started only after the pumps+exit join completed, but the pumps share a bounded (64-slot) channel with it. Once the channel filled, pump_stdout parked on send, the join never completed, and the session hung with the client actively reading (review #003 P1; reproduced empirically at N=62 ok / N=63 hang). Any real session (cat, ls -R) exceeds 64 chunks instantly. pump_session now spawns drain_chunks (owning writer_rx + client_write) before the join; the exit chunk is still enqueued after the join and writer_tx is dropped after it, so the single FIFO preserves the exit-chunk-is-last invariant (ADR-005). Tests (review #003 P13): - backpressure regression: 80 chunks through a real drive_session, in-order delivery + sentinel + exit asserted, 10s per-read timeout so a regression fails instead of hanging (validated against the bug: fails with the old order reinstated) - wire: MAX_CHUNK_LEN exact-boundary round trip (limit is inclusive) - session: stream_type 0/3 from the server ignored mid-stream without desynchronizing framing or losing stdout/exit Verification: cargo test 98 lib (default) / 141 --all-features, clippy all-targets + wasm32 -D warnings, fmt --check, wasm check, doc --no-deps all clean.
Languages
Rust
96.3%
Python
3%
Shell
0.7%