Skip to content

v0.15.0 — collection errors fail closed

Choose a tag to compare

@prostomarkeloff prostomarkeloff released this 17 Jul 16:10
· 14 commits to main since this release

Collection errors fail closed

A test module that fails to import (ImportError, syntax error, broken module-scope fixture) is silently dropped from pytest's collected items. Before 0.15 the daemon served the shortened suite as if nothing happened: green summary, n quietly smaller, rc=0 — a silently shortened suite looking green is the worst failure mode a test runner can have (observed in the wild: two files with ImportError ran a «green» suite with zero trace).

Now:

  • collect-time failures are captured in the forkserver preload (CollectReport recorder) and shipped to the daemon with the workers' one-time ready frame;
  • the summary grows a loud COLLECT ERRORS (N) block (with per-file tracebacks) right under results :;
  • every run served by that boot forces rc=1 — single-run, persist-pool and bench paths alike;
  • the successfully collected tests still run: you get the full remaining suite AND a red, attributed verdict (semantics of --continue-on-collection-errors, but loud);
  • daemon-plugin run_info gains an additive collect_errors key (list of (nodeid, longrepr)), and the block contract gains conditional collect-errors.

Also: the fuzz-tier noise strategy no longer generates KNOWN outcome strings (hypothesis falsified the categorize-noise property with noise=['failed'] — significance ordering working as designed; the property's domain is genuinely-unknown strings), with the surfaced edge pinned as a deterministic test.

Full matrix green: 3 OS × py3.11–3.14, stress+parity tiers, 125-test dogfood suite.