Repository navigation
Description
在实施 #6905(PR #6937,@objectstack/rest 从 DEBT 台账毕业)时实测发现,按 PD #10 记录备查。观察类,不挂 pm:queue,请分诊轮定级。本卡明确不动 TEST_DEBT,所以只记不修。
实测读数
在 main 合并后的树上跑 pnpm check:type-check-debt(先做全闭包 turbo run build 72/72):
ℹ @objectstack/rest: TEST_DEBT records 163, tsc now reports 151 (-12) -- the entry can be lowered.
check-type-check-coverage --re-measure: OK — 33 ledger entr(ies) re-measured in 274.9s,
1764 raw tsc error(s) total, none above its recorded number.
surplus: 306 raw error(s) across 12 entr(ies) sit BELOW their recorded ceiling
163 这个数字本身是 #5278 option A 的 bootstrap margin(+10 over 153),ledger 的 note 自己写着 "tighten via the ℹ hint immediately after landing" —— 也就是说它从落地那天起就是一条待收紧的 worklist,而不是稳态。今天实测 151,余量 12。
为什么值得单独记一笔(而不是并进 #6376)
#6376 已经关闭,它交付的是工具(--lower、余量报告),不是把条目抹平;抹平被留成了每次 re-measure 都打印的 ℹ worklist。这里要记的是一个因 #6905 而改变的事实:
@objectstack/rest 的 tsconfig.json 仍然 exclude 了 **/*.test.ts,而 PR #6937 新加的 typecheck 脚本只点名 tsconfig.json,所以 pnpm typecheck 看不见这个包的测试层。毕业前后对比:
| 层 | 毕业前谁在看 | 毕业后谁在看 |
|---|---|---|
rest/src |
DEBT 条目(记 2) | turbo run typecheck(PR #6937 已实证:注入 2×TS2345 → 退出码 2) |
rest 的测试层(151 条) |
TEST_DEBT 条目(记 163) | 仍然只有 TEST_DEBT 条目(记 163) |
也就是说 src 那半边现在有了真正的编译器盯着,测试层那半边没有任何变化,依旧由这条带 12 条余量的 ledger 独家看守 —— 正是 #6376 用 driver-mongodb 那 33 条余量论证过的形态(余量吞掉一次真实签名回退,门禁全绿)。12 比 33 小,但性质相同:在抹平前,不超过 12 条的新增错误可以静默落地。
不是缺陷,别当缺陷派
今天没有人踩:高于记录值仍会变红,ℹ 提示每次 re-measure 都打印、不静默。这是被削弱的灵敏度,不是活体缺陷 —— 判级请按观察类走。
如果要做
pnpm check:type-check-debt --lower 会替人把实测值写回去,不需要手敲数字。两个已知的坑,做之前值得读:
@objectstack/rest是两本账里漂得最快的条目(ledger note 自己这么写),[finding] DEBT ledger counts in check-type-check-coverage.mjs drift silently — @objectstack/metadata-protocol records 28, actually reports 63 #5278 自己的 PR 就在它上面红过两次 —— 因为pull_request跑的是"你的分支 merge 进 main"的树。抹平要测完立刻推,别和别的活攒在一起。- 抹平后 note 里那段 "RECORDED 163 is a bootstrap margin (+10 over 153…)" 的说明要跟着改写,否则组成描述会和数字对不上 —— [finding] DEBT ledger counts in check-type-check-coverage.mjs drift silently — @objectstack/metadata-protocol records 28, actually reports 63 #5278 记过 composition drift 这个坑。
另一个方向是干脆按 #5286 的路子给它加 sibling tsconfig.test.json 并在 typecheck 里点名,让测试层真的进 tsc,那样 TEST_DEBT 条目可以整个删掉;但那是 151 条的工程量,和"抹平余量"是两件事,值得分开定级。
关联:#5278(棘轮)、#6376(余量,已关闭)、#5286(sibling tsconfig 路线)、#6905 / PR #6937(本次 DEBT 毕业)。
会话:session_017uFVNMmTxLpmfQYiuKM1Yx(实施 #6905 期间发现,未认领)
Activity
os-help commentedon Aug 10, 2026
Claim: PM loop round 1 (cli lane, new shift)
Session:
session_0158ZQo7LiHSxGWpYKuPq1wuBranch:
claude/issue-6939-rest-test-debt-lowerWorktree:
objectstack-issue-6939Domain:
domain:cliFile surface:
scripts/check-type-check-coverage.mjsonly (stop on breach; explain in the report)Container & model: S mechanical card,
mode:subagent,model: sonnetSerial constraints cleared: none in flight in this lane (0 in-flight at takeover); #7038 rides in THIS dispatch (same file, same ledger entry — separate claim comment there), so no cross-PR conflict exists.
Scope note: this dispatch covers the lowering + note rewrite direction only (re-measure,
--lowerto the fresh value, rewrite the bootstrap-margin prose, and fix the stale "Also in DEBT." string per #7038). The siblingtsconfig.test.jsonroute the card mentions is explicitly out of scope — it remains a separate card if anyone grades it in.Premise re-verified at dispatch time on
origin/main @ 5d24f4b: TEST_DEBT entry at L505 with the stale note intact; DEBT block no longer contains@objectstack/rest.Generated by Claude Code
os-help commentedon Aug 10, 2026
ACCEPT — PR #7248 (review of record, cli-lane PM, round 1; covers #6939 + #7038 in one PR as claimed).
TEST_DEBT['@objectstack/rest']lowered 163 → 155 (the exact fresh re-measure on merge base55da611, written by the--lowertool, fullturbo run build72/72 closure first), and the entry's note rewritten — "Also in DEBT." → "Graduated from DEBT in@objectstack/rest已可零错编译,应从 #4311 的 DEBT 台账毕业 —— 加typecheck脚本 + 删台账条目(阻塞于 PR #6895) #6905."; the bootstrap-margin sentence now narrates the actual lowering event instead of surviving with a stale meaning ([finding] DEBT ledger counts in check-type-check-coverage.mjs drift silently — @objectstack/metadata-protocol records 28, actually reports 63 #5278 composition-drift trap closed).--loweralso lowered 11 unrelated entries; the dev reverted those so the final diff touches ONLY the rest entry — verified independently viagit diff origin/main...5817e90(single file, 15+/6−), not from the report.--re-measureOK with@objectstack/restgone from the ℹ lower-hint list (12 → 11 flagged, remainder unrelated);--self-testgreen (L2076–2099 fixtures confirmed self-contained).success.skip-changeseton (tooling-script only).The residual direction (sibling
tsconfig.test.json, deleting the TEST_DEBT entry entirely) stays ungraded and unstarted, per the card's own separation.Generated by Claude Code
test(rest): clear two CI ratchets the new OWD gate suite tripped (#7674)
fix(cli): lower TEST_DEBT['@objectstack/rest'] to 155 and fix stale n…
fix(metadata-protocol): key the objectstack-ai#3050 authoring gate on…