Skip to content

fix(cli): lower TEST_DEBT['@objectstack/rest'] to 155 and fix stale "Also in DEBT" note - #7248

Merged
os-help merged 1 commit into
mainfrom
claude/issue-6939-rest-test-debt-lower
Aug 10, 2026
Merged

fix(cli): lower TEST_DEBT['@objectstack/rest'] to 155 and fix stale "Also in DEBT" note#7248
os-help merged 1 commit into
mainfrom
claude/issue-6939-rest-test-debt-lower

Conversation

@os-help

@os-help os-help commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Fixes #6939
Fixes #7038

What

scripts/check-type-check-coverage.mjs's TEST_DEBT['@objectstack/rest'] entry carried two problems, both surfaced during #6905 (the DEBT-ledger graduation of this package):

  1. [finding][devx] @objectstack/rest 的 DEBT 毕业后,TEST_DEBT 仍带 12 条余量 —— 且它现在是该包测试层唯一的看门人 #6939 — the recorded ceiling (163) sat 12 above the actual tsc count. 163 was itself a deliberate bootstrap margin (+10 over 153, per [finding] DEBT ledger counts in check-type-check-coverage.mjs drift silently — @objectstack/metadata-protocol records 28, actually reports 63 #5278 option A) meant to be tightened via the ℹ … can be lowered hint right after landing, but it never was. Since @objectstack/rest 已可零错编译,应从 #4311 的 DEBT 台账毕业 —— 加 typecheck 脚本 + 删台账条目(阻塞于 PR #6895) #6905 moved the package's src half to a real turbo run typecheck gate, this TEST_DEBT entry became the sole guard on the package's hidden test layer — the same "surplus absorbs a regression silently" shape [finding][devx] check:type-check-debt 的 ledger 余量会让新写的 pin 变哑:mongodb 曾有 33 条余量吞掉一次真实回退,另有 5 条目前带 4–19 余量 #6376 documented for driver-mongodb's 33-error margin, just smaller (12).
  2. finding: TEST_DEBT['@objectstack/rest'] 的 note 仍写着 "Also in DEBT",但 #6905 已把 DEBT 条目删了 #7038 — the entry's note still read "Also in DEBT." after @objectstack/rest 已可零错编译,应从 #4311 的 DEBT 台账毕业 —— 加 typecheck 脚本 + 删台账条目(阻塞于 PR #6895) #6905 removed the corresponding DEBT block entry. That sentence became false the moment @objectstack/rest 已可零错编译,应从 #4311 的 DEBT 台账毕业 —— 加 typecheck 脚本 + 删台账条目(阻塞于 PR #6895) #6905 landed, and it misleads the next person reading the note into looking for a DEBT row that no longer exists.

What changed

pnpm check:type-check-debt --lower itself is not scoped to a single package — running it also lowered 11 unrelated DEBT/TEST_DEBT entries in other packages (@objectstack/metadata, service-automation, service-storage, plugin-approvals, objectql, runtime, plugin-auth, mcp, lint, plugin-security, http-conformance). Those are out of this card's scope, so they were reverted; only the @objectstack/rest entry's numbers changed in the final diff.

Out of scope (per dispatch): the sibling tsconfig.test.json route (#5286-style) that would let the test layer itself be typechecked and let this TEST_DEBT entry be deleted entirely. That is a ~151-file engineering effort, not a ledger-surplus fix, and #6939 explicitly calls it out as a separate, unstarted card.

Tests / verification

Full workspace build closure first (required — the gate refuses to measure without it):

flock -w 7200 /tmp/os-heavy-verify.lock -c 'turbo run build --concurrency=2'
 Tasks:    72 successful, 72 total

Self-test (independent of the real ledger — verified the fixtures at L2076-2099 are self-contained, per the dispatch's own assumption):

node scripts/check-type-check-coverage.mjs --self-test
✓ check:type-check-coverage --self-test — 23 semantic case(s) + 16 observation case(s) + 15 re-measure case(s) + 12 built-closure case(s) + 9 auto-lowering case(s) hold.

Full re-measure after the fix — @objectstack/rest no longer appears in the ℹ … can be lowered list (dropped from 12 flagged entries to 11, all unrelated to this package):

node scripts/check-type-check-coverage.mjs --re-measure
check-type-check-coverage --re-measure: OK — 33 ledger entr(ies) re-measured in 183.9s, 1771 raw tsc error(s) total, none above its recorded number.
  surplus: 291 raw error(s) across 11 entr(ies) sit BELOW their recorded ceiling ...

node scripts/check-nul-bytes.mjs — clean.

Tooling-script-only change (scripts/check-type-check-coverage.mjs), no user-visible behavior — no changeset; requesting skip-changeset.


Generated by Claude Code

pnpm check:type-check-debt --re-measure showed the entry (163) sitting
12 above the actual tsc count (151 at dispatch time; 155 re-verified on
this merge base, 55da611), a surplus that could absorb regressions
silently since #6905 graduated the package's src half to a real
compiler gate but left this TEST_DEBT entry as the sole guard on its
test layer (#6939).

The note also still read "Also in DEBT." after #6905 removed the
package's DEBT entry -- a residual pointer to a ledger row that no
longer exists (#7038). Rewrote it to "Graduated from DEBT in #6905."
and updated the composition/bootstrap-margin prose so it describes the
new exact-measurement state (no more +10 margin) instead of a stale
reading of 163.

--lower is not scoped to a single package, so it also touched 11
unrelated DEBT/TEST_DEBT entries across other packages; those were
reverted to keep this PR to the @objectstack/rest entry only, per this
card's scope.

Fixes #6939
Fixes #7038

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0158ZQo7LiHSxGWpYKuPq1wu
@vercel

vercel Bot commented Aug 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
objectstack Ignored Ignored Aug 10, 2026 3:53am

Request Review

@os-help os-help added skip-changeset PR has no user-facing published change; bypasses the changeset gate and removed size/s labels Aug 10, 2026 — with Claude
@os-help
os-help marked this pull request as ready for review August 10, 2026 04:19
@os-help
os-help added this pull request to the merge queue Aug 10, 2026
Merged via the queue into main with commit a768f81 Aug 10, 2026
27 checks passed
@os-help
os-help deleted the claude/issue-6939-rest-test-debt-lower branch August 10, 2026 04:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

2 participants