---
name: spt-crate-is-binary-only-no-lib
description: "The `spt` crate has no lib target — gate with `--bins`, because `--lib` exits 101 and reads like a red"
metadata: 
  node_type: memory
  type: project
  originSessionId: f438335b-fb84-458b-874d-de4b67400c4b
  modified: 2026-07-29T11:33:33.558Z
---

The `spt` crate is **binary-only**. `cargo nextest run -p spt --lib <filter>` fails with:

```
error: no library targets found in package `spt`
... exited with code 101
```

**Why:** that 101 is a *rig* error, not a test failure — and it lands in a gate log looking exactly like a defect. Same class as the known `spt-daemon --lib` gotcha. A per-crate gate script that assumes every crate has a lib target will produce a red that costs someone an investigation.

**How to apply:** use `-p spt --bins` for the `spt` crate's unit tests (they live in the binary target — `spt::bin/spt api::tests::...`). When a leg exits 101, read the leg's output before reporting it: distinguish "no targets matched" from a real failure. Report rig errors *as* rig errors when handing a gate summary over, so they don't get mis-filed later.

Related: [[verdict-from-exit-not-from-silence]], [[gate-int-tests-with-nextest-not-bare-cargo-test]], [[w2-two-key-subnet-progress]].
