docs: mark review #001 findings resolved (M1, M2, L2, L4, L5, N1-N3, N5)

Update the remediation plan with a resolution section and per-finding
status. Nine findings resolved in commit 9944153; L1, L3, L6, N4, N6
remain open.
This commit is contained in:
2026-08-17 12:13:35 +00:00
parent 99441530ab
commit e5330e957b
+64 -33
View File
@@ -1,5 +1,5 @@
--- ---
status: open status: partially-resolved (M1, M2, L2, L4, L5, N1, N2, N3, N5)
last_updated: 2026-08-17 last_updated: 2026-08-17
reviewed_artifacts: reviewed_artifacts:
- src/lib.rs - src/lib.rs
@@ -521,48 +521,79 @@ Highlights:
## Remediation Plan ## Remediation Plan
| ID | Finding | Fix | Effort | Risk | | ID | Finding | Fix | Effort | Risk | Status |
|----|---------|-----|--------|------| |----|---------|-----|--------|------|--------|
| L5 | `cargo fmt` fails | run `cargo fmt`, commit | trivial | none | | L5 | `cargo fmt` fails | run `cargo fmt`, commit | trivial | none | ✅ resolved |
| N1 | 9 rustdoc warnings | fix 9 link sites | trivial | none | | N1 | 9 rustdoc warnings | fix 9 link sites | trivial | none | ✅ resolved |
| N2 | stale doc paths | fix 2 paths | trivial | none | | N2 | stale doc paths | fix 2 paths | trivial | none | ✅ resolved |
| N3 | `unsafe` vs AGENTS.md §14 | amend convention wording | trivial | none | | N3 | `unsafe` vs AGENTS.md §14 | amend convention wording | trivial | none | ✅ resolved |
| L4 | mocks leak into public API | `pub(crate)` on `MockBackend`/`MockControl` | trivial | none | | L4 | mocks leak into public API | `pub(crate)` on `MockBackend`/`MockControl` | trivial | none | ✅ resolved |
| N5 | `rand_seed`/`nanos_seed` ×4 | consolidate | trivial | none | | N5 | `rand_seed`/`nanos_seed` ×4 | consolidate | trivial | none | ✅ resolved |
| M2 | `wait()` swallows `MalformedExitChunk` | propagate the variant | small | low | | M2 | `wait()` swallows `MalformedExitChunk` | propagate the variant | small | low | ✅ resolved |
| L2 | consumer stdout/stderr routing untested | add emitting test backend | small | low | | L2 | consumer stdout/stderr routing untested | add emitting test backend | small | low | ✅ resolved |
| M1 | negotiation-rejection frame unhandled | implement disambiguation read | medium | medium (wire-facing) | | M1 | negotiation-rejection frame unhandled | implement disambiguation read | medium | medium (wire-facing) | ✅ resolved |
| L1 | channels `input` ignored | decide drop-vs-pass-through | small | low | | L1 | channels `input` ignored | decide drop-vs-pass-through | small | low | open |
| L3 | `open_via_channels` 0% covered | end-to-end channels consumer test | medium | low | | L3 | `open_via_channels` 0% covered | end-to-end channels consumer test | medium | low | open |
| L6 | pty bridge error paths untested | targeted error-path tests | medium | low | | L6 | pty bridge error paths untested | targeted error-path tests | medium | low | open |
| N4 | sleep-based timing | readiness signals | small | low | | N4 | sleep-based timing | readiness signals | small | low | open |
| N6 | MSRV unverified | CI MSRV job or bump | small | none | | N6 | MSRV unverified | CI MSRV job or bump | small | none | open |
### Recommended Order ### Resolution (2026-08-17, commit `9944153`)
1. **L5 + N1 + N2 + N3 + L4 + N5** — the trivial hygiene batch. One Nine findings were resolved in a single commit:
commit, no behavior change, makes `cargo fmt`/`cargo doc` clean and
the public API tidy. Do this first so the tree passes its own - **M1** — `TtySession::from_halves` now peeks the first response byte
verification gate. and returns `NegotiationRejected` on a `0x00`-prefixed error frame
2. **M2** — small, low-risk, closes a swallowed-error path in the (ADR-052 §5 disambiguation). `ChunkReader` gained
consumer half. `peek_stream_type`/`read_chunk_after_peek` to support the peek.
3. **L2** — small, high-value: the consumer half's happy path is Test: `connect_direct_returns_negotiation_rejected`.
currently untested. - **M2** — `wait()` now surfaces `MalformedExitChunk` instead of
4. **M1** — the one real protocol gap. Medium effort and wire-facing, collapsing it to `NoExitChunk`. The exit watch channel carries a
so it needs publisher sign-off on the disambiguation approach before cloneable `ExitOutcome` enum (the `TtySessionError` payloads are not
implementation. `Clone`); `MalformedExitChunk` now carries a `String`. Test:
5. **L1 + L3** — the channels consumer path; do together since L3's `wait_returns_malformed_exit_chunk`.
- **L2** — added `EmittingBackend` and
`recv_stdout_and_stderr_route_backend_data`, covering the consumer
read-pump stdout/stderr routing with real data.
- **L4** — `MockBackend`/`MockControl`/`MockStdinSink` are now
`#[cfg(test)] pub(crate)`, removed from the public API.
- **L5** — `cargo fmt` (the BAST drift test was unformatted).
- **N1** — all 9 rustdoc intra-doc links fixed; `cargo doc` is clean.
- **N2** — stale doc paths fixed (`crates/tty/` and `docs/research/`).
- **N3** — AGENTS.md §14 amended to accurately describe the `local`
module's `libc::kill` `unsafe` blocks.
- **N5** — `nanos_seed` consolidated into `tests/common/mod.rs`.
Post-fix coverage: `session.rs` 79.71% → 87.43% lines, total 90.74% →
91.47% lines. All verification gates pass (`cargo test`,
`cargo test --all-features`, clippy native + wasm, fmt, doc, wasm
check).
### Remaining (open)
- **L1** — channels `input` ignored; needs a publisher decision
(drop the parameter vs pass-through to `drive_session`).
- **L3** — `open_via_channels` still 0% covered; needs the channels
harness shared across modules.
- **L6** — pty bridge error paths untested.
- **N4** — sleep-based timing in signal/cancel tests.
- **N6** — MSRV unverified.
### Recommended Order (remaining)
1. **L1 + L3** — the channels consumer path; do together since L3's
test will exercise L1's code. test will exercise L1's code.
6. **L6** — pty bridge error paths; medium effort, lower priority than 2. **L6** — pty bridge error paths; medium effort, lower priority than
the consumer-half work. the consumer-half work.
7. **N4 + N6** — test hardening and MSRV; defer until CI exists. 3. **N4 + N6** — test hardening and MSRV; defer until CI exists.
--- ---
## Notes ## Notes
- All line numbers refer to the tree at commit `18c4924` (the last - All line numbers refer to the tree at commit `18c4924` (the last
commit on `main` at review time). commit on `main` at review time). The resolution section above
reflects the tree at commit `9944153`.
- The coverage numbers are from `cargo llvm-cov --all-features` on the - The coverage numbers are from `cargo llvm-cov --all-features` on the
same tree. The `--show-missing-lines` output was used to attribute same tree. The `--show-missing-lines` output was used to attribute
gaps; the full report is at `target/llvm-cov/html`. gaps; the full report is at `target/llvm-cov/html`.