---
name: nextest-singular-summary-parse
description: "nextest prints \"1 test run\" singular, so a hand-rolled `[0-9]+ tests run` regex reports 0 for every one-test binary — two agents hit it the same day; and an empty enumeration is a broken build, not an empty population."
metadata: 
  node_type: memory
  type: feedback
  originSessionId: afca0d6d-6b47-4604-aff2-c6e8141b5483
  modified: 2026-08-02T21:58:31.758Z
---

nextest's summary line is `Summary [2.586s] 1 test run: 1 passed` for a ONE-test binary and
`… 43 tests run: …` for more. A regex matching `[0-9]+ tests run` silently returns nothing on the
singular form, so every single-test binary reports **tests=0**. On 2026-08-02 this bit twice in one
day, independently: my #124 bisect labelled its two converged terminals VOID (they had each run
their one test and leaked 2 — the descent was sound, the readout was not), and todlando's mutation
driver graded every one-row mutation un-killed until his M0 inert control caught it.

**Why:** two hand-rolled parsers over the same tool is the single-source-discriminant shape — a
phrase matched in three private regexes is three chances to misread it. Worse, the failure is
*silent and directional*: it reports LESS work than happened, which reads as "nothing ran" — the
same surface as a zero-match filter, so it lands in the interpretation slot already reserved for a
real failure mode and gets believed.

Two second-order lessons from the same hunt, both mine:

- **A guard with a wrong predicate is a different bug, not a weaker guard.** I added a
  "zero tests ran ⇒ VOID, never clean" guard to catch un-run rounds; fed by the broken parser it
  condemned VALID rounds and destroyed a converged bisect. A guard is code and needs its own
  positive control — mine never saw a legitimate single-test round before shipping.
- **An empty enumeration is a broken build, never an empty population.** `cargo nextest list`
  runs a build; a leaked daemon holding `spt.exe` fails it, and under `2>/dev/null` the population
  silently becomes zero. Refuse to proceed on a population you could not build, and print the
  stderr tail.

**How to apply:** match `[0-9]+ tests? run` (or parse `--message-format json`), and put a
one-test binary in the instrument's own test set. Prefer ONE shared summary parser over per-script
regexes — doyle is carrying an xtask helper to next-milestone triage for exactly this. Always print
the tests-actually-run count beside any result derived from a run: this bug was only visible
because the count was wrong in a *visible* way, and a silently wrong count is the same class
undetected. Related: [[nextest-zero-match-filter-trap]], [[zero-match-filter-reads-as-absent]],
[[single-source-discriminant-marker]], [[instrument-soundness-guards]],
[[sweep-dispatch-site-counts]].
