Skip to content

Commit 384a573

Browse files
claude[bot]claude
andauthored
fix(devx): the type-check coverage and debt gates skip paths git ignores (#15841)
`check:type-check-coverage` and `check:type-check-debt` (the same script, with and without `--re-measure`) walked every package for non-test source and test files without asking whether the repo checks any of them in. Run while a `packages/cli` suite was in flight, that walk found the scratch file a test writes into the gitignored `packages/cli/tmp`, and both gates went red with the text a real ratchet break produces -- naming a repair (add a `tsconfig.scripts.json`, or widen `include`) that would have widened a config to cover a scratch directory, beside UNCHECKED_SOURCE_DEBT's "closed to new entries". The rule is unchanged; its population is not. A path `.gitignore` excludes is by the repo's own declaration not a source of the package -- never committed, never published, and absent from the clean checkout CI type-checks -- so the gate has no claim on it. The verdict comes from git, in ONE `ls-files --others --ignored --directory -z` per run memoised across both walk sites, never a hand list and never a spawn per package. `--exclude-per-directory=.gitignore` rather than `--exclude-standard` is deliberate: a rule living only in `.git/info/exclude` covers one clone, and letting it shrink this gate's subject would make a developer's box and CI conclude different things -- the same line `exposedScratchDirs` draws in scripts/pm/dispatch-gates.mjs. No ledger row moves: on a clean tree the gate's output is byte-identical, and `UNCHECKED_SOURCE_DEBT`, every other ledger and every `tsconfig` are untouched. Pinned by 22 new `--self-test` cases in four batteries: how git's listing is read, the predicate the walk applies, the walk's own output (the same fixture walked with an empty index yields the scratch file -- the card's finding -- and with the real index does not), and what git is asked of a real fixture repository, including the tracked-`.gitignore`-versus-`.git/info/exclude` distinction and a force-added file that re-opens an ignored directory. Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk Co-authored-by: Claude <noreply@anthropic.com>
1 parent 5a21d73 commit 384a573

1 file changed

Lines changed: 390 additions & 34 deletions

File tree

0 commit comments

Comments
 (0)