---
name: assert-gates-exit-status-but-prints-stderr
description: "An assert that gates on out.status.success() but prints out.stderr can never show WHY — the exit code, the one discriminating number, is discarded by construction."
metadata: 
  node_type: memory
  type: project
  originSessionId: 12a8ef0e-7168-4db4-9cc0-751034b831c8
  modified: 2026-08-04T18:00:34.326Z
---

`crates/spt/tests/live_resolve_e2e.rs:103-107` (golden 30928816784 @ `fc7fad1`, 2026-08-04):

    assert!(
        out.status.success(),
        "no-adapter listen resolves + binds: {}",
        String::from_utf8_lossy(&out.stderr)
    );

It GATES on the exit status and PRINTS stderr. The failure log therefore reads:

    no-adapter listen resolves + binds: BOUND:agent-a token=d32059b778f1b546efc112ff6f81bf40
    READY:agent-a

The pre-authored prefix names resolve+bind, and the payload proves resolve+bind SUCCEEDED —
`BOUND` then `READY` are the child's own success markers. The child exited nonzero AFTER them.

**Why:** three separate blindnesses stack. (1) `out.status.code()` never reaches the message,
so 101 (child PANICKED) vs 1 (child returned Err and exited cleanly) — the fork the whole RCA
turns on — is unrecoverable from CI. (2) Anything the child wrote to STDOUT is invisible: only
stderr is printed. (3) The prefix is [[panic-message-is-preauthored-not-a-finding]] — it names
one mechanism whatever actually fired.

**How to apply:** when an assert's CONDITION and its MESSAGE read different channels, the
message cannot explain the condition — treat the log as mute on cause and instrument before
theorising. A repro of such a red must capture `status.code()` AND stdout or it reproduces the
failure without discriminating it. When reviewing a rig, check that what is asserted and what is
printed are the same object. Also: a warning printed immediately above such a panic is not
thereby causal — here two `MANIFEST_DEAD_KEY` lines sat directly above it and were warn-only by
source (`spt-runtime/src/manifest.rs:1283-1301`, `eprintln!` then `continue`), emitted by the
test's OWN fixture (`register_harness`, same file :62-72), so they print on green runs too.

Kin: [[test-name-asserts-what-fixture-never-creates]], [[non-vacuity-check-can-fail-for-the-defects-reason]],
[[breadcrumb-pid-tree-kill-hazard]] (the 101-vs-1 reading), [[instrument-soundness-guards]].
