Skip to content

Commit 619395b

Browse files
committed
fix(scripts): SOURCES_COVERED asks every package, ledgered or not
`check:type-check-coverage` evaluated its SOURCES_COVERED clause only for a package that DECLARES a `typecheck` script. The argument written beside that scope was that a DEBT package's answer is already "nothing reads this package", which its ledger owns. It is not: a DEBT row records an ERROR COUNT taken through `tsc -p tsconfig.json`, so a source directory OUTSIDE that program is in neither the count nor any other reading. `packages/core/examples` held 2 non-test source files in no tsc program at all, neither of which had ever compiled, and they surfaced only when an unrelated PR added a `typecheck` script — repairing them moved the package 12 -> 29 errors, all of it drift accumulated while nothing could check the file. The clause now runs over `accountedPrograms()`, the same set TESTS_COVERED is decided against: the configs the `typecheck` script invokes, or `tsconfig.json` for a package with no such script (what `measureDebt` runs). The finding names the claim it falsifies — a `typecheck` script, a DEBT row, an EXEMPT row, or nothing accounting for the package at all — rather than assuming a script the package may not have. Measured on this tree: the gate stays green (75/79 covered, 4 in DEBT, 1 exempt), so no ledger row and no exclusion was widened to keep it green. Two legs: with a source file planted in a DEBT package's unread directory the old gate exits 0 and the new one reports it. Also adds the gate's report on its own scope. Three axes of this gate's blindness have each been found by a person tripping over one, and the shape they share is a clause skipped for a population with the run saying so nowhere. `SCOPED_CLAUSES` declares every such scope beside its predicate and its reason, and every green run prints who was left out of what — today that is GENERATED_COVERED over the 4 packages declaring no `typecheck` script. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk
1 parent 0db2947 commit 619395b

1 file changed

Lines changed: 312 additions & 53 deletions

File tree

0 commit comments

Comments
 (0)