diff --git a/docs/agent-handoff.md b/docs/agent-handoff.md index 5307799..2c5ca22 100644 --- a/docs/agent-handoff.md +++ b/docs/agent-handoff.md @@ -1443,6 +1443,22 @@ round-trip cannot detect a discriminant shift. ## 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 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 diff --git a/tests/support/mod.rs b/tests/support/mod.rs index f661b3d..14fbeec 100644 --- a/tests/support/mod.rs +++ b/tests/support/mod.rs @@ -1,7 +1,13 @@ //! Shared test-support helpers. //! //! 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.** //! `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 //! taking a subsystem with them. Two directories is a cost worth //! 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 -//! 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. +//! consolidate instead of continuing the pattern. #![allow(dead_code)]