docs: record the pipe-masking gate trap in the handoff

Review round 2 found no new defects; this is the one durable item it
asked to be carried further than a commit message.

`cmd | tail -2` returns TAIL's exit status, not `cmd`'s, in fish and
bash alike. So a gate chain of `cargo test ... | tail -2 && ... && echo
"ALL GATES CLEAN"` prints the clean line even when a suite failed, and
that is what happened while gating this lane: a `pmacs-gpu` failure was
summarized as clean. The point worth keeping is that this is not
carelessness a closer read would catch --- the verdict is structurally
absent from the summary the PR then cites. §5 now says to check
`$pipestatus[1]`, or better to redirect each gate to a file and read it
afterwards, which also preserves the full log that section already asks
for. Filed beside the skip-reports-`ok` lesson, which is the same
family: the thing that summarizes a gate must not be able to lose the
gate's verdict.

Also fixes the doc-comment splice in `tests/support/mod.rs`, where the
why-two-directories paragraph landed mid-sentence and left the
include-mechanics explanation stranded inside it. Cosmetic, and review
called it not worth a round on its own --- folded in here because the
file was being touched anyway.
This commit is contained in:
Levi Neuwirth 2026-07-29 12:25:29 -04:00
parent a81ff917d8
commit 0b92d4705f
2 changed files with 24 additions and 8 deletions

View File

@ -1443,6 +1443,22 @@ round-trip cannot detect a discriminant shift.
## 5. Hard-won ops lessons ## 5. Hard-won ops lessons
- **A gate summary assembled through a pipe can report success over a
failure.** `cmd | tail -2` returns **`tail`'s** exit status, not
`cmd`'s — in `fish` and `bash` alike — so a chain of
`cargo test ... | tail -2 && cargo test ... | tail -2 && echo "ALL
GATES CLEAN"` prints the clean line even when a suite failed. This
is not carelessness that closer reading would catch: the failure is
**structurally invisible** in the summary the PR then cites. It
happened while gating the silent-skip lane, and a `pmacs-gpu`
failure was reported as clean.
Either check `$pipestatus[1]` in fish (`${PIPESTATUS[0]}` in bash),
or — better — redirect each gate to a file and read the file
afterwards, which also preserves the full log this section already
asks you to keep. Same family as the skip-reports-`ok` lesson below
and the double-invocation traps: **the thing that summarizes a gate
must not be able to lose the gate's verdict.**
- **A test that skips on a missing precondition reports `ok`, and a gate log - **A test that skips on a missing precondition reports `ok`, and a gate log
cannot tell that apart from a pass.** `vterm_stage3_acceptance::a37` — the cannot tell that apart from a pass.** `vterm_stage3_acceptance::a37` — the
only acceptance driving a real daemon, a real PTY and a real wgpu render only acceptance driving a real daemon, a real PTY and a real wgpu render

View File

@ -1,7 +1,13 @@
//! Shared test-support helpers. //! Shared test-support helpers.
//! //!
//! Included by `#[path = "support/mod.rs"] mod support;` rather than //! Included by `#[path = "support/mod.rs"] mod support;` rather than
//! copied. //! copied. Files under `tests/` subdirectories are not compiled as
//! their own test binaries, so this costs nothing — and
//! `m6_8_multi_repl_acceptance.rs` previously carried a comment saying
//! cross-test-binary sharing "would need a fixture crate", which is not
//! so. A correct helper in one file and a degraded copy in another is
//! this suite's most repeated defect shape; sharing removes the way it
//! happens.
//! //!
//! **Why this is separate from `tests/common/`, which also exists.** //! **Why this is separate from `tests/common/`, which also exists.**
//! `tests/common/mod.rs` re-exports `daemon` and `pty` — real daemon //! `tests/common/mod.rs` re-exports `daemon` and `pty` — real daemon
@ -11,13 +17,7 @@
//! dependency-free half: helpers any test binary can take without //! dependency-free half: helpers any test binary can take without
//! taking a subsystem with them. Two directories is a cost worth //! taking a subsystem with them. Two directories is a cost worth
//! naming rather than leaving to be rediscovered; if a third appears, //! naming rather than leaving to be rediscovered; if a third appears,
//! consolidate instead of continuing the pattern. Files under `tests/` subdirectories are not compiled as //! consolidate instead of continuing the pattern.
//! their own test binaries, so this costs nothing — and
//! `m6_8_multi_repl_acceptance.rs` previously carried a comment saying
//! cross-test-binary sharing "would need a fixture crate", which is not
//! so. A correct helper in one file and a degraded copy in another is
//! this suite's most repeated defect shape; sharing removes the way it
//! happens.
#![allow(dead_code)] #![allow(dead_code)]