From 0b92d4705ff2442fd139afa280d5d81473662e6b Mon Sep 17 00:00:00 2001 From: Levi Neuwirth Date: Wed, 29 Jul 2026 12:25:29 -0400 Subject: [PATCH] docs: record the pipe-masking gate trap in the handoff MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- docs/agent-handoff.md | 16 ++++++++++++++++ tests/support/mod.rs | 16 ++++++++-------- 2 files changed, 24 insertions(+), 8 deletions(-) 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)]