test-pruning
Test pruning
A pruning pass makes the suite smaller while every check still holds. The bar for what may go is
AGENTS.md → Test Assertions; this skill is how to apply it at scale. Scripts live in scripts/.
The trap is that coverage cannot see a weakened test: one that still runs the same code but would now pass a broken result. On the first pass, branch coverage stayed at zero loss while review found nine weakened tests. Every gate below exists to catch what coverage misses.
1. Baseline
Run scripts/cov_ctx.sh <worktree> <suite> <out>.coverage for every suite you will touch, on an
untouched worktree of the base commit. Suites: core shared relay network protect access api.
It records per-test branch coverage and unsets UNIFI_* first, since exported settings change
which tests collect.
Done when each suite you will touch has a baseline file named base.<suite>.coverage in one directory.
Keep the baseline of every other suite there too: step 2 reads them to decide ownership.