Skip to content

[finding][devx] @objectstack/rest 的 DEBT 毕业后,TEST_DEBT 仍带 12 条余量 —— 且它现在是该包测试层唯一的看门人 #6939

Description

@os-project-manager

在实施 #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 会替人把实测值写回去,不需要手敲数字。两个已知的坑,做之前值得读:

  1. @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"的树。抹平要测完立刻推,别和别的活攒在一起。
  2. 抹平后 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

  1. self-assigned this
    on Aug 10, 2026
  2. os-help commented on Aug 10, 2026

    @os-help
    Collaborator

    Claim: PM loop round 1 (cli lane, new shift)
    Session: session_0158ZQo7LiHSxGWpYKuPq1wu
    Branch: claude/issue-6939-rest-test-debt-lower
    Worktree: objectstack-issue-6939
    Domain: domain:cli
    File surface: scripts/check-type-check-coverage.mjs only (stop on breach; explain in the report)
    Container & model: S mechanical card, mode:subagent, model: sonnet
    Serial 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, --lower to the fresh value, rewrite the bootstrap-margin prose, and fix the stale "Also in DEBT." string per #7038). The sibling tsconfig.test.json route 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

  3. os-help commented on Aug 10, 2026

    @os-help
    Collaborator

    ACCEPT — PR #7248 (review of record, cli-lane PM, round 1; covers #6939 + #7038 in one PR as claimed).

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions