Skip to content

Commit cc5c69f

Browse files
committed
ci(dx): 第三个合并窗口的再校准 —— @objectstack/mcp 转记档余量(#5278 option A 第五条)
合并队列在 03:25:18Z 把本 PR 踢出,唯一红线是 `@objectstack/mcp`: TEST_DEBT 记 52,`tsc --noEmit` 实测 53(+1)。这 +1 不是队列里排在 前面的 #6077 引入的(该 PR 自己那一代队列构建是绿的),而是一条此前 无人可见的既有漂移 —— ratchet 第一次对着移动的 base 重测,就把它照了 出来。换句话说,这个不变量在自己的引入 PR 上先抓到了一条真实漂移, 这本身就是它有效的证据。 +1 已完全归因:src/skill-prompts.test.ts(185,23),一处把 `SkillPrompt | null` 断言成 `Record< string, unknown >` 的 TS2352 —— 正是 #3905 / PR #6077 投影 skill `instructions` 为 MCP prompt 原语时 新增的文件,测试文件数也因此 8 -> 9。 按裁决走 option A(记实测 +10)而不是再跑一轮精确校准:packages/mcp 今天刚落一个 feature,属于活跃变动包,精确数字大概率会再输一次已经 被裁决判死的那场竞速(option D 连输五次)。RECORDED 63 = 实测 53 @ 34558c2 + 10,note 按顶栏要求重写了成分 —— 旧 note 写的 "`error` is of type unknown, one catch-block idiom" 是错的,51 条 TS18046 全部是响应体 `json` 绑定,与 catch 块无关。 顶栏 BOOTSTRAP MARGINS 段同步从"四条"改为"五条"。 验证:`pnpm check:type-check-debt` 退出 0,34 条台账全部重测、无一条 高于记录值,五条余量各自打印 `ℹ can be lowered`;同一棵树上连测两次 数字逐字一致(mcp 53 / objectql 346 / rest 153 / lint 32 / service-storage 42),故这是校准问题而非 tsc 不确定性。
1 parent 34558c2 commit cc5c69f

1 file changed

Lines changed: 48 additions & 9 deletions

File tree

‎scripts/check-type-check-coverage.mjs‎

Lines changed: 48 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -160,20 +160,22 @@
160160
// The maintainer's ruling was to land the invariant with a
161161
// DOCUMENTED margin on the packages that proved hottest rather
162162
// than run a sixth lap: `@objectstack/objectql`,
163-
// `@objectstack/lint`, `@objectstack/rest` and
164-
// `@objectstack/service-storage` are recorded at their
165-
// measurement PLUS TEN, and each says so in its own note, naming
166-
// the measured number and the sha. This is the ledger's ONLY
163+
// `@objectstack/lint`, `@objectstack/rest`,
164+
// `@objectstack/service-storage` and `@objectstack/mcp` are
165+
// recorded at their measurement PLUS TEN, and each says so in its
166+
// own note, naming the measured number and the sha. This is the
167+
// ledger's ONLY
167168
// slack and it is deliberately loud: nothing else here may sit
168169
// above its measurement, and a margin is not a place to hide a
169170
// real increase. Because shrinkage is informational, each of the
170-
// four prints its own `ℹ ... can be lowered` line on every run --
171+
// five prints its own `ℹ ... can be lowered` line on every run --
171172
// that line IS the tightening worklist, and closing it is a
172173
// follow-up PR, not a thing to leave running for months.
173174
//
174-
// The margins were not a precaution; two of the four were paid
175-
// out inside a single hour of the landing flight. objectql moved
176-
// 339 -> 345 (#5749 / PR #6013 extending summary-rollup.test.ts)
175+
// The margins were not a precaution; two of the first four were
176+
// paid out inside a single hour of the landing flight. objectql
177+
// moved 339 -> 345 (#5749 / PR #6013 extending
178+
// summary-rollup.test.ts)
177179
// and service-storage 42 -> 41 -> 42 (the two halves of the
178180
// `IStorageService.list(prefix)` retirement, #5540 / PR #5983 then
179181
// #5541 / PR #6061, landing hours apart). Recorded exactly, both
@@ -182,6 +184,23 @@
182184
// across two PRs moves a count DOWN and then back UP, so an exact
183185
// number recorded between the halves is stale before it is pushed.
184186
//
187+
// The FIFTH margin, `@objectstack/mcp`, is the one the gate found
188+
// by itself, and it is the cleanest evidence that this invariant
189+
// does what it was built for. #5278's own PR reached the merge
190+
// queue and was kicked at 03:25:18Z on a single red line: mcp
191+
// TEST_DEBT recorded 52, tsc reported 53. The +1 was NOT
192+
// introduced by the PR ahead of it in the queue (#6077's own
193+
// queue generation was green) -- it is a pre-existing drift that
194+
// nothing in this repo had ever been able to see, surfaced the
195+
// first time the ledger was re-measured against a moving base.
196+
// A ratchet whose introducing PR is the first thing it catches is
197+
// a ratchet that works. It takes a margin rather than an exact
198+
// number for the same reason the other four do: packages/mcp took
199+
// a feature landing the same day (#6077 projecting skill
200+
// `instructions` as MCP prompts), so it is an actively-moving
201+
// package, and an exact number on an actively-moving package is
202+
// precisely the bet option D lost five times running.
203+
//
185204
// The root is the one asymmetry: its `typecheck` script is the workspace
186205
// aggregator, so its OWN top-level TypeScript is covered by a `typecheck:root`
187206
// script (tsc, invoked from lint.yml) or by a ledger entry like anyone else.
@@ -470,7 +489,27 @@ const TEST_DEBT = {
470489
+ 'attributed further. 64 of the 131 sit in src/auth-manager.test.ts, 22 in '
471490
+ 'src/admin-import-users.test.ts and 18 in src/admin-user-endpoints.test.ts.',
472491
},
473-
'@objectstack/mcp': { tests: 8, errors: 52, note: 'TS18046 x51 -- `error` is of type unknown, one catch-block idiom repeated. Re-measured 52 at 5ab08428, exact.' },
492+
'@objectstack/mcp': {
493+
tests: 9,
494+
errors: 63,
495+
note: 'TS18046 x51 -- `json` is of type unknown, one `await res.json()` idiom repeated across four '
496+
+ 'files (23 in mcp-server-runtime.http.test.ts, 14 in mcp-action-tools.test.ts, 8 in '
497+
+ 'mcp-http-tools.scopes.test.ts, 6 in mcp-validate-expression.test.ts); TS6133 x1; TS2352 x1. '
498+
+ 'Measured 52 at 5ab08428 -> 53 at 34558c2cc. This entry is the fifth bootstrap margin and the '
499+
+ 'one the ratchet found on its OWN introducing PR: #5278 reached the merge queue and was kicked '
500+
+ 'at 03:25:18Z on this single +1, which is not #6077\'s doing (that PR\'s own queue generation '
501+
+ 'was green) but a pre-existing drift no gate in this repo could see until the ledger was '
502+
+ 're-measured against a moving base. The +1 is fully attributed: '
503+
+ 'src/skill-prompts.test.ts(185,23), a TS2352 casting `SkillPrompt | null` to `Record< string, '
504+
+ 'unknown >` -- the file #3905 / PR #6077 added when it projected skill `instructions` as MCP '
505+
+ 'prompt primitives, which is also why the file count moved 8 -> 9. The old note\'s composition '
506+
+ 'was misleading in the way the top of this ledger warns about: it read "`error` is of type '
507+
+ 'unknown, one catch-block idiom", while all 51 are the response-body `json` binding, not a '
508+
+ 'catch block. packages/mcp took a feature landing the same day, so it is an actively-moving '
509+
+ 'package and an exact number here would very likely lose the same race that killed option D '
510+
+ 'five times over. RECORDED 63 is a bootstrap margin (+10 over 53 measured at 34558c2cc) -- '
511+
+ 'tighten via the ℹ hint immediately after landing (#5278 option A).',
512+
},
474513
'@objectstack/driver-mongodb': {
475514
tests: 15,
476515
errors: 43,

0 commit comments

Comments
 (0)