Found while verifying a packages/cli change (out of that card's scope; filing rather than fixing there).
What was measured
Two gates were run in the foreground while pnpm --filter @objectstack/cli exec vitest run was running concurrently in the background. Both failed, identically:
check-type-check-coverage: 1 problem(s)
- packages/cli/tmp: 1 non-test source file(s) here sit outside every tsc program that
`@objectstack/cli`'s `typecheck` script runs, while that script is what makes the package
count as COVERED -- so the gate reports green over a directory nothing type-checks.
Add a sibling `tsconfig.scripts.json` and NAME it in the `typecheck` script ...
UNCHECKED_SOURCE_DEBT in scripts/check-type-check-coverage.mjs is closed to new entries.
packages/cli/tmp is gitignored (.gitignore:53:tmp/) and holds no tracked file. By the time the suite finished the directory was empty again, and both gates were green on the identical tree:
ls -A packages/cli/tmp | wc -l -> 0
pnpm check:type-check-coverage -> exit 0
pnpm check:type-check-debt -> exit 0 (12 ledger entries re-measured, none above its number)
So the file the gate reported on was a scratch artefact one of the CLI tests writes there and removes again.
Why it is worth filing
The failure text is the same one a real ratchet break produces, and it names a repair (add a tsconfig.scripts.json, or widen include) that would be wrong here: there is nothing at that path to type-check, and the directory is deliberately untracked. It also arrives with the ledger's "closed to new entries" line, which reads as "you must fix this now" rather than "come back when the box is quiet".
Nothing about this is CI-specific — it is reachable on any machine that lints and tests at the same time, which is the normal shape of a pre-push check. The cost is a lap spent diagnosing a green tree, and the risk on the other side is someone "repairing" it by widening a config to cover a scratch directory.
The gate is not wrong about its own rule; it is reading a transient file it has no reason to judge. Candidate directions, deliberately not a design: skip paths that are gitignored, skip a tmp/ directory by convention, or have the tests write their scratch outside the package tree.
Reproduce
pnpm --filter @objectstack/cli exec vitest run in one shell.
- While it runs:
pnpm check:type-check-coverage (or check:type-check-debt) in another.
- Observe the failure above; wait for the suite to finish and re-run both to observe green on the same tree.
Generated by Claude Code
Found while verifying a
packages/clichange (out of that card's scope; filing rather than fixing there).What was measured
Two gates were run in the foreground while
pnpm --filter @objectstack/cli exec vitest runwas running concurrently in the background. Both failed, identically:packages/cli/tmpis gitignored (.gitignore:53:tmp/) and holds no tracked file. By the time the suite finished the directory was empty again, and both gates were green on the identical tree:So the file the gate reported on was a scratch artefact one of the CLI tests writes there and removes again.
Why it is worth filing
The failure text is the same one a real ratchet break produces, and it names a repair (add a
tsconfig.scripts.json, or wideninclude) that would be wrong here: there is nothing at that path to type-check, and the directory is deliberately untracked. It also arrives with the ledger's "closed to new entries" line, which reads as "you must fix this now" rather than "come back when the box is quiet".Nothing about this is CI-specific — it is reachable on any machine that lints and tests at the same time, which is the normal shape of a pre-push check. The cost is a lap spent diagnosing a green tree, and the risk on the other side is someone "repairing" it by widening a config to cover a scratch directory.
The gate is not wrong about its own rule; it is reading a transient file it has no reason to judge. Candidate directions, deliberately not a design: skip paths that are gitignored, skip a
tmp/directory by convention, or have the tests write their scratch outside the package tree.Reproduce
pnpm --filter @objectstack/cli exec vitest runin one shell.pnpm check:type-check-coverage(orcheck:type-check-debt) in another.Generated by Claude Code