ci(coverage): fail a PR whose touched functions score CRAP 30 or more

Merged
TH
2mo ago
+535-24

Summary

Flips the PR coverage-CRAP step from advisory to blocking, and documents what a failure means.

Report coverage-based CRAP ran with continue-on-error: true, so a function at or above the threshold only annotated the diff. It is now Check coverage-based CRAP of touched functions without that flag: the score, or a report that cannot answer the question, fails the job. The main step keeps continue-on-error — that report is the backlog main carries on purpose. Both still require run-coverage to have succeeded.

CONTRIBUTING.md gains how to read a failure, naming what does not block: a touched function in a file coverage.exclude drops, or one a stale local coverage/ never enumerated, is listed as unmeasured, and either kind of estimate reaches the report only at 30 or above. docs/agents/testing.md points there.

Closes #3426. Stack: #3460 → this PR. The activation blockers (#3452, #3455→#3458) are merged, so main's backlog is 3 named functions and this flip asks a PR to fix debt only when it edits one. Stays draft until #3460 merges, then retargets to main.

Validation

  • SHA 0f16d034d: 58 tests, 19 driving the real entrypoint against a real git repo and real fallow, including the blocking exit — a stand-in fallow reporting one touched finding at CRAP 42 exits 1, the same finding under --all exits 0, --diff-file reaches fallow in PR scope only, and a finding cannot outvote the missing enumeration behind it.
  • check:affected --base crap/3426-verdict-model --run, check:agent-guidance, check:fallow --base green on this head.