feat(coverage): decide the touched-function CRAP verdict
Summary
Gives check:coverage-crap --base <ref> an exit code that means something. It is report-only today: it prints the functions a diff touches and exits 0 whatever it finds.
It now returns 1 when a touched function scores CRAP ≥ 30 — including one that already scored that high — and when the reports cannot be trusted: no coverage map, a malformed map, a map missing a file the same run's coverage/lcov.info enumerated, a touched file the sanitizer dropped or the run never recorded, and a touched function the map predates. Each names the files and the command that clears it. --all stays the advisory main backlog.
Completeness is per path, not a count: two coverage runs mixed into one directory give equal counts over different files. Attribution reuses the rename-aware diff, so a pure move owes nothing.
Part of #3426. Stack: this PR → #3454, which flips CI to blocking. Review follow-ups: the model owns enumeration_missing, so no caller decides it by passing a set; and one relativizer covers map keys, lcov paths and diff paths — three that disagreed meant a foreign map matched nothing.
Validation
- SHA
03a37c7b8, onmainafter #3452 and the G2 stack merged: 40 tests;check:affected --base origin/main --run,check:fallow --base,tsc --strictgreen. - Your three unknowns are answered in my review reply; #3454 asserts two through the entrypoint.
- Risk: blocking is proven by tests until #3454 flips CI.