docs(scripts): name the rootDir widening in TESTS_COVERED's remedy - #15129
Merged
Conversation
…14943) `check:type-check-coverage`'s TESTS_COVERED failure text names the sibling `tsconfig.test.json` route but not the `rootDir` widening that route can require, so the remedy is incomplete for exactly the packages that need it. Measured on #14835: with `rootDir` inherited the honest program reported 116 x TS6059, and `"."` still left 3. PR #14833 resolved it with `rootDir: "../.."`, the shape `packages/client`'s test config already used — a precedent no author could reach from the gate's message. Remedy prose only: the predicate is untouched, and what the gate accepts does not move. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk
baozhoutao
marked this pull request as ready for review
September 4, 2026 02:40
baozhoutao
enabled auto-merge
September 4, 2026 02:40
baozhoutao
deleted the
claude/issue-14943-tests-covered-rootdir-remedy
branch
September 4, 2026 03:21
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 free
to 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 #14943
The defect
check:type-check-coverage'sTESTS_COVEREDfailure text tells an author how to fix a hidden-tests package by naming the siblingtsconfig.test.jsonroute — but never names therootDirwidening that route can require. The remedy was therefore incomplete for exactly the packages that need it most.Measured on #14835: the
include-narrowing shape puts tests outside the build config'srootDir, and onboarding one that way cost 116 x TS6059 withrootDirinherited; evenrootDir: "."still cost 3 (threepackages/clitests read fixtures fromexamples/app-showcase/src/**). PR #14833 resolved it withrootDir: "../.."— the shapepackages/client/tsconfig.test.jsonalready used — and no author could reach that precedent from the gate's message.What this changes — remedy PROSE only
TESTS_COVEREDmessage gains a sentence naming therootDirconsideration beside the sibling-config route, the two measured costs (116, and 3 at"."), the"../.."shape, and why the widening is safe (these programs emit nothing, so it widens the ROOT and never the strictness).TEST_ROOTDIR_PRECEDENT, names the two in-tree precedents (packages/client/tsconfig.test.json,packages/cli/tsconfig.test.json) — the shapeSPEC_SCRIPTS_PRECEDENTbeside it already uses forSOURCES_COVERED's remedy.The predicate is UNCHANGED — shown two ways
Structurally: the diff touches one string literal inside the existing
if (!inTestDebt)branch, plus a newconst. Not one condition, threshold, ledger entry or observation function is edited — 13 insertions, 1 deletion, and the deleted line is the previous last segment of that same template string.Behaviourally: a throwaway workspace package reproducing this card's own subject — the
include-narrowing shape (include: ["src"],rootDir: "src", one test in a siblingtest/tree, noexcludeat all) — was run through the gate before the edit and again after it, the second time in a separate worktree at this branch's head. Identical classification both times: the same package flagged underTESTS_COVERED, the same1 of its test file(s), the same1 problem(s), the same exit 1. Strip the appended sentence from the "after" output anddiffagainst the "before" output exits 0 — the two runs differ in that sentence and in nothing else.The gate's own
--self-testreports the same case counts before and after (48 semantic + 68 observation + 45 re-measure + 28 built-closure + 19 auto-lowering + 18 exit-code), and the live run's verdict line is byte-identical.check:ratchet-remedy-authorityreports the same census before and after (12 mark / 6 refuse / 168 none, 27 hand-classified control), so this file'smarkedclassification did not move either.Verification
Every command's exit code was captured before any pipe; the verdict lines are quoted in the report comment on #14943. Run here: the gate's
--self-testand live run (before and after),check:ratchet-remedy-authority(self-test + run),check:pm-dispatch-gates(1338 cases),check:nul-bytes, andcheck:type-check-debtover a freshly built closure.skip-changeset: this PR publishes nothing from any package — it edits one gate script's author-facing text.🤖 Generated with Claude Code
https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk
Generated by Claude Code