test(mapping): land the channel-not-held guard's wire rows on all three served rows (w4-channel-not-held-rows)

- git row: a second exec on a served git channel answers channel_failure
  inline — the serve rides on, no second serving path; race-free by
  construction (advertisement drained, serve parked at the gated list_refs)
- tty rows: the pipe row (second exec) and the shell row (second shell
  request) — the same inline decline shape, channel still usable
- the rows assert the decline event's exact request vocabulary (class
  request, reason channel-not-held, route git/pipe/absent, debug level,
  self-describing build) — the class's vocabulary coverage
- tests/common/event_capture.rs: the observe-suite's capture convention
  shared across the mapping binaries
- test-only: no production change; the guard held its documented shape
  in every featured build (verified default / git / session /
  session,git / tunnel / sftp / --all-features)

Verified: cargo test (+ per-feature + --all-features) all green ·
cargo clippy --all-targets -- -D warnings ✓ · cargo clippy
--all-features --all-targets -- -D warnings ✓ · cargo fmt --check ✓ ·
cargo doc --no-deps 0 warnings · taskgraph validate ✓ (35 tasks)
This commit is contained in:
glm-5.3-flash committed 2026-10-29 07:27:59 +00:00
1 parent 9cf5bfbaf3
commit 3d3bb5e9bf
5 files changed
+470 -9

No files matched your search

@@ -1,7 +1,7 @@
---
id: w4-channel-not-held-rows
name: Wave 4 — channel-not-held guard wire rows (wave-3 gate booked item 2)
status: pending
status: completed
depends_on: [w4-git-exit-close]
scope: narrow
risk: low
@@ -40,12 +40,13 @@ than silently widening scope):
## Acceptance Criteria
- [ ] Wire rows for the channel-not-held decline class on all three
- [x] Wire rows for the channel-not-held decline class on all three
rows (git / tty pipe / shell), per build, through the harness
- [ ] The rows assert the wire shape + the tracing event class/reason
- [ ] No production code change (or a stop-and-booked finding
recorded for the gate — nothing silent)
- [ ] `cargo test` (+ per-feature + `--all-features`), clippy ×2
- [x] The rows assert the wire shape + the tracing event class/reason
- [x] No production code change (no guard gap exposed — nothing to
book; the guard's shape held on the wire in every featured
build)
- [x] `cargo test` (+ per-feature + `--all-features`), clippy ×2
(`-D warnings`), fmt, `cargo doc --no-deps` pass
## References
@@ -59,8 +60,57 @@ than silently widening scope):
## Notes
> To be filled by implementation agent
- **Test-only, as planned** — no production change; no guard gap
surfaced (the landing verified the guard's documented shape on the
wire in every build that carries each row).
- **Rows landed** (one per served row, each with the inline-decline
wire shape — `channel_failure` while the first serving path rides
on — plus the channel-stays-usable witness and the tracing event's
exact request-decline vocabulary `src/observe.rs` carries):
- `tests/git_mapping.rs` (cfg `git`): a second exec on a served git
channel — the decline event carries `exec_route = "git"`, and the
declined re-exec never spawns a second serving path (the doubles'
resolve count stays at one). Race-free by construction: the
advertisement drains first and the serve parks at the doubles'
gated `list_refs` behind it, so the wire is quiescent for the
decline.
- `tests/tty_mapping.rs` (cfg `session`), two rows:
the pipe row (second exec on a served pipe channel — event
carries `exec_route = "pipe"`) and the shell row (second shell
request on a served shell channel — the event carries **no**
`exec_route` field, pinning the absent-field shape on the wire).
The exit-`None` shim script keeps the serve live and the wire
quiescent.
- **The per-build matrix**: the rows join the cfg-pinned convention —
git-build rows run in every build carrying `git`, session rows in
every build carrying `session` (verified across default / `git` /
`session` / `session,git` / `tunnel` / `sftp` / `--all-features`).
- **Shared capture helper**: `tests/common/event_capture.rs` (new) —
the observe-suite's recorded hand-rolled global-subscriber
convention shared across the mapping binaries; `await_event`
field-matching (parallel rows never order against each other) and
the exact-field-set assertion (`assert_request_decline`) — the
rows double as this class's vocabulary coverage, including the
`debug` level and the build self-description.
- **No `dispatch_core.rs` rows added** — that binary builds no seam,
so its git row declines at the config gate *before* the store-take;
the guard is unreachable there (the reference names the per-build
convention the rows join, which the mapping binaries carry).
## Summary
> To be filled on completion
The channel-not-held guard's wire rows landed on all three served
rows: `second_exec_on_a_served_git_channel_declines_channel_not_held`
(`tests/git_mapping.rs`), and the pipe/shell pair
(`tests/tty_mapping.rs`) — each pinning the inline decline shape
(`channel_failure`, no close, the first serve rides on, the channel
stays usable, no second serving path) plus the decline event's exact
vocabulary (class `request`, reason `channel-not-held`, route
`git`/`pipe`/absent, `debug` level, self-describing build). No
production change was needed — the guard held its documented shape in
every featured build. `tests/common/event_capture.rs` shares the
observe-suite's capture convention across the mapping binaries.
Verified: full suite + per-feature builds (default, `git`, `session`,
`session,git`, `tunnel`, `sftp`) + `--all-features` all green;
clippy ×2 (`-D warnings`), `cargo fmt --check`, `cargo doc --no-deps`
clean.