Repository navigation
ci(typecheck): graduate the workspace root from the type-check DEBT ledger and run typecheck:root in lint.yml - #26339
Merged
Merged
Conversation
…edger The root program (tsconfig.json: scripts/ and the top-level configs) measures 0 errors, so its @objectstack/spec-monorepo DEBT entry is deleted. The root gains a typecheck:root script, and the Type Check source-gates lane runs it, which the coverage gate's root branch requires once the script exists. Claude-Session: https://claude.ai/code/session_01ENjVvxdwZxosWSS4Fqazu1 Co-authored-by: Claude <noreply@anthropic.com>
With the root graduated, check:type-check-debt no longer measures the root program, so a card editing a root TypeScript file was sent to a gate that cannot red on it. The family parser now reads pnpm typecheck:root as a family, and the root-program change kind names it with a rewritten why. Claude-Session: https://claude.ai/code/session_01ENjVvxdwZxosWSS4Fqazu1 Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ENjVvxdwZxosWSS4Fqazu1 Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
席位核对 · ACCEPT · devx seat 2 · 2026-10-26T22:06ZSeat
Generated by Claude Code |
os-zhuang
approved these changes
Oct 26, 2026
os-zhuang
marked this pull request as ready for review
October 26, 2026 22:48
This was referenced Oct 27, 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 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.
Requested by Steve · project thread
Fixes #26236
Clause-②: no
Metadata-protocol: none
⛔ Tier H. This diff touches
.github/workflows/lint.yml, so it stays a draft until an authorized APPROVED review from aGOVERNED_APPROVERSaccount. No seat readies, queues or arms it before then.What this does
Wanted 2 and 3 of the card. Wanted 1 (the root program at 0 errors) landed in #26280.
scripts/check-type-check-coverage.mjsdeletes the@objectstack/spec-monorepoentry, soDEBTis now empty. A graduation paragraph is added in the ledger's own style, and theROOT_PROGRAM_COUPLED_SCRIPTcomment no longer cites the 26.typecheck:rootinpackage.json:tsc --noEmit -p tsconfig.json.lint.ymlruns it. A new step, "Type-check the workspace root program", sits in thetypecheck-source-gateslane, right after the coverage meta-gate. Like every gate step in that lane, it hascontinue-on-error: trueand anid, solane-verdict.mjsreads its outcome. The root program reads no packagedist/:tsc --listFilesover it lists zero paths underpackages/, so the step needs no build.scripts/pm/dispatch-gates.data.mjs, the change kind for "adds or edits TypeScript in the ROOT tsc program" namedcheck:type-check-debt. Once the root graduates, that gate no longer measures the root, so a card editing a root.mtswould be sent to a gate that cannot red on it, and the error would first show in CI. The kind now namestypecheck:root, and itswhyis rewritten to match.scripts/pm/dispatch-gates.mjs(extractCheckInvocations) readspnpm typecheck:rootas a family. This is the one non-check:name it admits.scripts/pm/dispatch-gates.self-test.mjsfollow the rename. Two parser cases are added:typecheck:rootis read, andtypecheck,typecheck:rootedand a filteredrun typecheckare not.Why the three move together
The coverage gate's root branch (around L2809) reports a finding when
typecheck:rootexists butlint.ymldoes not name it (ciInvokesRoot, around L4862). Without the script, deleting the entry reports "notypecheck:rootscript and no ledger entry". An entry of 0 is refused. Reverse check on this branch: with the entry deleted and the script added but nolint.ymlstep,node scripts/check-type-check-coverage.mjsexits 1 with ".github/workflows/lint.yml never invokestypecheck:root". With the step added, it exits 0.Acceptance
All at head d750e1f unless stated, exit codes captured before any pipe.
pnpm typecheck:root: exit 0.node scripts/check-type-check-coverage.mjs --self-test: exit 0 (58 semantic + 97 observation + 56 re-measure + 28 built-closure + 19 auto-lowering + 18 exit-code + 19 verify-lock cases).node scripts/check-type-check-coverage.mjs: exit 0, "0 in the DEBT ledger".pnpm check:type-check-debt(self-test, then--re-measureunder the verify lock): exit 0, "0 ledger entr(ies) re-measured in 540.7s, 0 raw tsc error(s) total".lint.ymlstep, the coverage gate exits 1. With it, the gate exits 0.node scripts/pm/check-dispatch-gates.mjs --slow(both tiers): exit 0, "dispatch-gates self-test: 2166 cases pass" (fast 1901, slow 265).pnpm check:pm-dispatch-gates(fast tier) re-run at d750e1f: exit 0, 1901 cases.dispatch-gates --commands, unchanged between 24f2191 and d750e1f): 65 derived, 65 run, every one exit 0.--ranverdict: "65 derived famil(ies) accounted for — 65 run, 0 NOT-MEASURED (a DERIVED zero — all 65 recorded an exit code and none of them is 3)".check:pm-dispatch-gatesfirst went red at 24f2191, on the pin "every zero-file family left is a pnpm workspace composite — UNEXPLAINED: typecheck:root".typecheck:rootis a zero-file family by construction, so d750e1f names it in that pin with the reason. The other 64 families ran at 24f2191; the only file that differs at d750e1f isscripts/pm/dispatch-gates.self-test.mjs, which the re-run families cover.Acceptance notes
scripts/check-exported-any-returns.mts(L105–110) and the "Why the ROOT-program entry does not weaken the ledger's discipline" docblock inscripts/pm/dispatch-gates.data.mjsstill tell the history of the root DEBT entry. They are historical prose, and no assertion reads them, so they are left as they are..mjsfiles underscripts/is not in the root program (noallowJs), so it does not derivetypecheck:root. That is the existing, intended scope of the root-program kind.维护者速读(草稿)
改了什么:仓库根目录的
scripts/程序在上一个 PR(#26280)里已经做到 0 个类型错误。这个 PR 把它从类型债账本里正式毕业:删掉账本条目,新增pnpm typecheck:root,并在 lint 工作流的 Type Check 流水线里加一步运行它。派发工具对「改了根目录 TS 文件」的提示也改成指向这一步。为什么改:之前根目录的脚本(门禁、PM 工具、发布脚本)没有任何 PR 检查会做类型检查,账本里那 26 条错误一直挂着,新脚本带进来的类型错误也拦不住。现在每个 PR 都会跑一遍,新错误当场变红。
风险与代价(含回滚):新增的一步只跑一次 tsc,不需要构建,耗时几秒。风险是以后改根目录脚本的人会多遇到一种红灯,这正是要的效果。回滚就是 revert 这个 PR,账本条目、脚本和工作流这一步会一起回去。
席位意见:
你要做的:因为改了
.github/workflows/lint.yml,这个 PR 需要你(GOVERNED_APPROVERS)批准,批准后由席位排队合并。Generated by Claude Code