Uh oh!
There was an error while loading. Please reload this page.
fix(scripts): check-type-check-coverage sees a chain entry whose project is missing (#4347) - #4449
Merged
Merged
Conversation
…ect is missing (#4347) Sections 5 and 5½ asked two independent questions about each chained tsconfig project — does the file exist, does `type-check` run it — and reported three of the four combinations. The fourth, CHAINED BUT MISSING, was skipped by each section's entry guard (`!pkg.hasTypeTestsConfig`, and the test-file guard), so a `type-check` reading `tsc -p tsconfig.typetests.json` with no such file on disk passed this gate at exit 0 while the chained `tsc` failed with TS5058. Both kinds are now reported before those guards, with one shared message so the two spellings cannot drift apart. The self-test pins each shape against throwaway package trees, plus a repo-state ratchet asserting no package here chains a project that is not on disk.
The latest updates on your projects. Learn more about Vercel for GitHub. |
yinlianghui
commented
Aug 12, 2026
CollaboratorAuthor
ACCEPT — step-7 复核 by PM session
Flipping ready + arming auto-merge. Risks noted in the report (text-derived chain detection, message-pin granularity) are recorded as known scope, not defects. Generated by Claude Code Generated by Claude Code |
yinlianghui
marked this pull request as ready for review
August 12, 2026 09:04
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Aug 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes#4347
scripts/check-type-check-coverage.mjsasks two independent questions about each chained tsconfig project — does the file exist (has*Config, areadFileSyncincollect()) and doestype-checkrun it (chains*Config, a regex over the script string) — and reported three of the four combinations. The fourth, chained but missing, was skipped by each section's entry guard: section 5½ opens withif (!pkg.hasTypeTestsConfig) continue;, and section 5 opened on!pkg.hasScript || pkg.testFiles === 0. Atype-checkreadingtsc --noEmit && tsc -p tsconfig.typetests.jsonwith no such file on disk passed this gate at exit 0.The change
Both project kinds are now reported before those guards, through one shared message builder so the two spellings cannot drift apart:
if (!pkg.hasTypeTestsConfig) continue;, exactly as the card specifies.tsconfig.test.jsoncase is asked between the halves, i.e. after!pkg.hasScriptand beforepkg.testFiles === 0. A dangling chain entry is broken whether or not the package still has test files, and deleting a package's tests together with their project while leaving the chain entry behind is one of the two ways to reach this state — the one the test-file guard hid completely.tscinvocation reads" message rather than stacking on it: there is one defect here, and 5c sends the reader to write a test project that the script already declares.The blind spot, demonstrated (#4118: pre-fix green, post-fix red)
The card's own observed repro, reproduced as a scratch mutation of real package state inside the worktree and reverted after capture:
packages/authchaining thetsconfig.typetests.jsonthat #4291 retired, andpackages/plugin-dashboard— the single remainingTEST_DEBTentry, asauthwas at the time — chaining both projects, neither on disk.Same tree state, both gates:
That the state really is broken, not merely undeclared:
Real-repository verdict: clean
The fixed gate is green against the real repository — no package here chains a project that is not on disk, which is the expected result, and the new repo-state case in the self-test is what keeps it that way (it names the offender and its script rather than counting).
Tests
scripts/__tests__/check-type-check-coverage.test.tsgains one describe block of five fixture cases plus one repo-state ratchet, following the suite's conventions (throwaway package trees, and the pre-fix entry guards reproduced verbatim as executable blind-spot predicates, the way the #3968 predicates are). The #4291 terminal assertions and the retired-list handling are untouched.Also green:
pnpm exec tsc -p tsconfig.scripts.json(the program this test file belongs to),eslinton both touched files,node scripts/check-control-bytes.mjs,node scripts/check-phantom-dependencies.mjs, andnode scripts/check-changeset-presence.mjs— the last reportingNo source of a released package changed in this range, so no changeset is owed(scripts-only change), so no changeset and noskip-changesetlabel.Reverse verification
Direction predicted before running, and it is not uniform — two of the six new cases assert a direction that must NOT change, so they stay green by design:
origin/main, new self-test cases kept →Tests 4 failed | 29 passed (33). The four cases asserting the new error go red;says nothing when every chained project is really therestays green (chained AND present was always quiet), and so does the repo-state ratchet (it judges repository state, not gate code — reverting the gate cannot move it).["@object-ui/auth: tsc --noEmit && tsc -p tsconfig.test.json && tsc -p tsconfig.typetests.json", "@object-ui/plugin-dashboard: ..."]. The pre-existing Retire the narrow per-file tsconfig.typetests.json projects in packages that have graduated out of TEST_DEBT #4291 retirement pin also fires onauth, which is the half of this combination the suite could already see — for the ten named retired packages only, and only for the narrow project.Working tree verified clean after every capture; all mutations were made with
git checkoutrestores, nevergit stash.Generated by Claude Code