---
name: cargo-test-bins-never-emits-fixture-exes
description: "cargo test -p spt --bins compiles [[bin]] fixtures as test harnesses into deps/ and never emits target/debug/<fixture>.exe — cold pool reds adapter_translate_proof; prebuild the fixture bins first"
metadata: 
  node_type: memory
  type: project
  originSessionId: 33101a3c-6fd0-4805-9dcd-ed3ab015d699
  modified: 2026-08-21T12:00:20.806Z
---

`cargo test -p spt --bins` compiles every `[[bin]]` target as a TEST HARNESS into
`deps/` and never emits `target/debug/translate_proof_fixture.exe` (or
`post_step_fixture.exe`). A cell that shells out to the fixture exe
(`adapter_translate_proof_gates_on_commit`) therefore REDS in a FRESH pool and is
GREEN in any pool that ever ran a normal build — same command, different pool
history, so it masquerades as a flake or a lane red.

**Why:** the green/red split keys on POOL HISTORY, not the tree — the falsest kind
of signal at a gate. Measured by todlando 2026-08-21 (#172 lane: green in his #196
pool, red in the fresh one). The e2e `mock-session.exe` precondition red at my #199
gate (panic prints the exact pre-build command) is the same class.

**How to apply:** before any filtered/bins test leg in a cold or unknown-history
pool, prebuild the fixture bins first:
`cargo build -p spt --bin translate_proof_fixture --bin post_step_fixture`
(and `cargo build -p mock-adapter --bin mock-session` for the ER e2e). The panic
text names the invocation when it fires. Related: [[cargo-builds-pkg-bins-for-int-tests]]
(cross-package + unit tests are the gap; same-package int tests are guaranteed).

**⚠ RECURRED 2026-08-29, on me, WITH THIS ENTRY ALREADY WRITTEN — and doyle held the mirror up.**
Running the emission lane's 15 consumer batteries I prebuilt `-p spt --bins` (this entry's own
advice, applied from MEMORY) and hit three fixture reds in a row — `mock-session`, then
`capture-player`, then `mock-shell` — each tripping in ~0.01s with a panic that reads exactly like
a test failure. **Having the rule is not the same as applying it completely**, and the banked form
after the previous recurrence was already the stronger one: prebuild `--workspace --bins`, or read
the build_hint. Neither of us lacked the census; we prebuilt from recall.

**TWO NEW FACES, both structural rather than careless:**

1. **THE FIXTURE MAY LIVE IN ANOTHER PACKAGE.** `mock-session`, `capture-player`, `mock-shell` and
   `console-mode-probe` are all `adapters/mock` (`-p mock-adapter`), so no amount of `-p spt --bins`
   ever produces them. Build the FIXTURE PACKAGE, not a subset: `cargo build -p mock-adapter --bins`.

2. **ENUMERATING FIXTURES BY GREPPING THEIR PRE-BUILD STRINGS IS STRUCTURALLY INCOMPLETE.** I did
   exactly that and it looked thorough — it found `mock-session` and `capture-player` because those
   call sites embed a literal `pre-build: cargo build …` string. It could NOT find `mock-shell`,
   whose helper COMPOSES the command at runtime (`sibling_bin(name)` → `fixture_package(name)`), so
   there is no literal to match. **A predicate over source text cannot see a string the program
   builds at runtime** — the same blindness class as the census's `TOKEN:`-vs-`TOKEN<space>`
   predicate, met twice in one session.

**How to apply, sharpened:** never hand-list fixtures. Build the whole fixture package (or
`--workspace --bins`) before any `--test`/`--bins`/filtered leg. Chasing named fixtures one red at
a time only ever finds them one at a time, and each one costs a full battery run.

**THIRD RECURRENCE — the GATER, one day later, with the entry already re-read that morning (doyle,
W1 #235 gate, 2026-08-29).** A fresh gate worktree + `cargo nextest run -p spt-daemon` (the FULL
suite — not a `--bins` or filtered leg) hit the same class: nextest builds spt-daemon's OWN test
binaries but nothing builds `-p mock-adapter` bins, so all three Windows-only `attach_resize_capture`
cells panicked at 0.17s with the pre-build hint. Cost: one fail-fast battery (373 tests withheld),
a 3x/3x delta run against main, and a --no-fail-fast resweep before the panic text was believed.
Two sharpenings: (a) the trigger is ANY daemon-suite leg in a cold pool, not just bins/filtered
legs; (b) reading the entry does not apply the entry — the prebuild line must live IN the driver
template, because the driver is authored under time pressure from recall. Both gate driver
templates now carry `cargo build -p mock-adapter --bins` as a fixed leg before any nextest.
