---
name: spt-bin-test-run-recipe
description: The `spt` crate has no lib target — cli.rs unit tests run via `--bin spt`, and running that alone produces one spurious failure unless the tests/-homed fixture bins are built first.
metadata:
  type: project
---

`cargo test -p spt --lib` errors with "no library targets found in package `spt`". The CLI's
unit tests live in `crates/spt/src/cli.rs` and run under `cargo test -p spt --bin spt`.

**Why:** `spt` is a binary-only crate. It also declares several test-only `[[bin]]` fixtures
whose sources live under `tests/` (translate_proof_fixture, post_step_fixture, gh_fixture,
git_fixture). `cargo test -p spt --bin spt` compiles only the `spt` bin, so
`cli::tests::adapter_translate_proof_gates_on_commit` panics with "translate_proof_fixture must
be built" — a **rig artifact, not a real failure**. Mistaking it for a regression wastes a
bisect.

**How to apply:** when a lane asks for "cargo test -p spt --lib", run
`cargo build -p spt --bins` first, then `cargo test -p spt --bin spt`. Plain `cargo test -p spt`
also works but drags in the slow integration suites. Baseline count at v0.47.0-era lane work:
475 unit tests in the `spt` bin.

Related: [[daemon-lib-suite-scoping]] — `cargo test -p spt-daemon --lib` must stay filtered
(`pump::`, `nethost::`) on the live host; the unfiltered daemon lib suite deadlocks.
