Skip to content

Commit c0f6a25

Browse files
hotlongclaude
andauthored
chore(devx): lower nine type-check DEBT ledger entries to their measurement (#7888) (#8225)
* chore(devx): lower nine type-check DEBT ledger entries to their measurement (#7888) `pnpm check:type-check-debt --lower` on the DEBT / TEST_DEBT ledger in `scripts/check-type-check-coverage.mjs`. Nine entries recorded more raw tsc errors than the tree has; each is rewritten to what the compiler reports. 271 raw errors of regression headroom closed. No package source changes — this records where the numbers already are, it does not move them. Measured on b5e09b2 with the full build closure built first (70/70 turbo tasks successful), and `--re-measure` run twice in separate invocations with identical results entry for entry. DEBT metadata 92 -> 89 DEBT service-automation 5 -> 3 DEBT service-storage 52 -> 51 TEST_DEBT plugin-approvals 547 -> 348 TEST_DEBT plugin-auth 131 -> 108 TEST_DEBT lint 42 -> 20 TEST_DEBT mcp 63 -> 53 TEST_DEBT plugin-security 21 -> 11 TEST_DEBT http-conformance 4 -> 3 Nothing raised: the run reports `none above its recorded number` before it writes, and `plannedLowerings` skips any entry whose measurement is at or above its ceiling. plugin-approvals' -199 is a genuine floor, not a shrunken surface. Its composition moved in exactly one class (TS2345 213 -> 16) while TS2339 x296, TS2550 x20 and TS18048 x10 held to the unit; all 21 test files remain in the program; and src/approval-service.test.ts is byte-identical (blob 3fc272f) between the commit 547 was measured at and this base, with 170 fewer errors. Its note is rewritten to that attributed composition, as `--lower` asks; the other eight notes are left alone rather than inventing a composition. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N9ARHddV6frm9fXNHxA7Ee * fix(devx): re-measure plugin-auth on the queue base (#7888) The merge queue built this PR onto b16dcb4 and `check:type-check-debt` went red on one entry: @objectstack/plugin-auth: TEST_DEBT records 108 raw tsc error(s), `tsc --noEmit` now reports 111 (+3). That is the ledger working, not breaking. The 108 was measured at b5e09b2 and the package took +3 inside the hour, so an exactly-recorded ceiling with no margin went red the moment the queue rebuilt it — the same moving-base race that kicked #5278 three times, and the reason this PR's body says the repair is a re-measure on the new head rather than a raise. This is still a lowering, not a raise: `main` records 131, and this PR now records 111. The 108 is an intermediate that never existed on main. 111 is the merge-queue run's own re-measure, taken with the full build closure by the same command on the exact ref this PR lands on — a stricter provenance than a second reading from a container whose base has already moved again. The other eight entries need no change: that same run printed no `can be lowered` note for any of them, so all eight measured exactly at their new ceilings on the queue base. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N9ARHddV6frm9fXNHxA7Ee --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 29488cc commit c0f6a25

1 file changed

Lines changed: 30 additions & 13 deletions

File tree

scripts/check-type-check-coverage.mjs

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ const DEBT = {
344344
note: 'code-tier 3 (TS2353) + 1 config-tier (TS2550 lib).',
345345
},
346346
'@objectstack/metadata': {
347-
errors: 92,
347+
errors: 89,
348348
note: 'code-tier 34 (TS2345 x30, TS2322 x4); config-tier 24 (TS2835); noise 34 (TS7006 x33, TS6133). '
349349
+ 'Re-measured 92 at 5ab08428, up from 87. Composition moved as well as the count: the note used to '
350350
+ 'name TS2353, which is gone, and TS2322 has taken its place. Two thirds of the pile sits in '
@@ -374,7 +374,7 @@ const DEBT = {
374374
+ 'unremarked (#5278).',
375375
},
376376
'@objectstack/service-automation': {
377-
errors: 5,
377+
errors: 3,
378378
note: 'code-tier 5. Two are the TS2741 this note used to describe as the whole debt: '
379379
+ 'engine.test.ts:2547/2577 build a descriptor literal missing a required field, the #4198 discovery '
380380
+ 'that opened #4311 (the missing field TS names moved from resumeAuthority to handlerContract in '
@@ -396,7 +396,7 @@ const DEBT = {
396396
+ 'in __tests__/knowledge-service.test.ts.',
397397
},
398398
'@objectstack/service-storage': {
399-
errors: 52,
399+
errors: 51,
400400
note: 'code-tier 8 (TS2339 x4, TS2347 x4); config-tier 21 (TS2835); noise 13 (TS7006 x11, TS6196, '
401401
+ 'TS6133). This entry is the fourth bootstrap margin, and it earned the label the hard way inside '
402402
+ 'one flight: 42 -> 41 at e8db1a230 (the spec half of the `IStorageService.list(prefix)` '
@@ -504,10 +504,23 @@ const EXEMPT = {
504504
// graduation -- it is a programme rather than a sitting, and its entry stands.
505505
const TEST_DEBT = {
506506
'@objectstack/plugin-approvals': {
507-
errors: 547,
508-
note: 'TS2339 x296, TS2345 x213, TS2550 x20, TS18048 x10. Re-measured 547 at 5ab08428, up from 467. '
509-
+ 'Still larger than driver-sql ever was, and still entirely test-only (src is clean), so nothing '
510-
+ 'but this ledger has ever seen it. 443 of the 547 are in one file, src/approval-service.test.ts.',
507+
errors: 348,
508+
note: 'TS2339 x296, TS2550 x20, TS2345 x16, TS18048 x10, plus 6 singletons (TS2554 x2, TS1470, '
509+
+ 'TS2352, TS2353, TS6133). Was 547 (re-measured at 5ab08428, up from 467; TS2345 x213 then). '
510+
+ 'Lowered 547 -> 348 at b5e09b21 (#7888), and the -199 is ONE CLASS COLLAPSING rather than a '
511+
+ 'measured surface shrinking -- the distinction the surplus finding asked to be settled before a '
512+
+ 'gap this size was written in as a floor. Three readings say collapse: (a) TS2339 x296, TS2550 '
513+
+ 'x20 and TS18048 x10 are unchanged TO THE UNIT against the 547 composition and only TS2345 moved, '
514+
+ '213 -> 16 -- a program that had DEGRADED instead (an unresolved import turning a type into any) '
515+
+ 'would have wiped the 296 property errors first, since property access on any is legal; (b) all '
516+
+ '21 test files are on disk and all 21 are in the program (tsc --listFiles), none deleted, and the '
517+
+ 'package\'s other test files gained 406 lines and lost 204 over the window -- the set grew; (c) '
518+
+ 'src/approval-service.test.ts, which holds 273 of the 348 as it held 443 of the 547, is '
519+
+ 'BYTE-IDENTICAL between 5ab08428 and b5e09b21 (blob 3fc272f, 3335 lines both ends). Same bytes, '
520+
+ '170 fewer errors, so the repair landed in a producer\'s types and no assertion was deleted to '
521+
+ 'get it. The 16 TS2345 that survive are still reported against a fully-resolved approver-config '
522+
+ 'union, so that parameter type is still strict -- the 197 that went were repaired, not loosened '
523+
+ 'away. Still entirely test-only (src is clean), so nothing but this ledger has ever seen it.',
511524
},
512525
'@objectstack/objectql': {
513526
errors: 355,
@@ -589,17 +602,21 @@ const TEST_DEBT = {
589602
+ '(#5278 option A).',
590603
},
591604
'@objectstack/plugin-auth': {
592-
errors: 131,
605+
errors: 111,
593606
note: 'TS2493 x42 (tuple index out of range), TS18048 x24, TS2740 x19, TS2322 x11, TS2532 x9, '
594-
+ 'TS2339 x8, TS2741 x8. '
607+
+ 'TS2339 x8, TS2741 x8. Lowered 131 -> 111 at b16dcb45 (#7888); the intermediate 108 in this PR\'s '
608+
+ 'first commit was measured at b5e09b21 and was already stale when the merge queue built it -- the '
609+
+ 'package took +3 inside the hour, which is the same "a ledger number is a number about a moment" '
610+
+ 'race that kicked #5278 three times, and 111 is the merge-queue run\'s own re-measure on the ref '
611+
+ 'this PR actually lands on. Composition below predates both and is NOT re-tallied at 111. '
595612
+ 'Measured 124 -> 129 (5ab08428, composition unchanged in shape) -> 131 (e8db1a230). Half of the '
596613
+ 'latest +2 is a TS2554 in src/last-admin-guard.test.ts, a file added by #5941 / PR #5993 '
597614
+ '(the break-glass delete guard); the other 1 landed in a file that already existed and is not '
598615
+ 'attributed further. 64 of the 131 sit in src/auth-manager.test.ts, 22 in '
599616
+ 'src/admin-import-users.test.ts and 18 in src/admin-user-endpoints.test.ts.',
600617
},
601618
'@objectstack/mcp': {
602-
errors: 63,
619+
errors: 53,
603620
note: 'TS18046 x51 -- `json` is of type unknown, one `await res.json()` idiom repeated across four '
604621
+ 'files (23 in mcp-server-runtime.http.test.ts, 14 in mcp-action-tools.test.ts, 8 in '
605622
+ 'mcp-http-tools.scopes.test.ts, 6 in mcp-validate-expression.test.ts); TS6133 x1; TS2352 x1. '
@@ -635,7 +652,7 @@ const TEST_DEBT = {
635652
+ "so none of the -33 is this PR's doing.",
636653
},
637654
'@objectstack/lint': {
638-
errors: 42,
655+
errors: 20,
639656
note: 'TS7006 x22, TS2835 x6, TS6059 x4. Measured 26 -> 30 (5ab08428, the +4 being TS6059, a file '
640657
+ 'outside rootDir, a class the pre-#5278 note did not list) -> 32 (e8db1a230). The latest +2 are '
641658
+ 'both TS7006 and both in files that already existed; three lint test files changed in this window '
@@ -645,14 +662,14 @@ const TEST_DEBT = {
645662
+ 'measured at e8db1a230 and re-confirmed at 32 an hour later at 77c7c884b) -- tighten via the ℹ '
646663
+ 'hint immediately after landing (#5278 option A).',
647664
},
648-
'@objectstack/plugin-security': { errors: 21, note: 'TS2739 x8, TS2740 x5, TS2345/TS2322/TS2741 x2 each -- incomplete literals. Re-measured 21 at 5ab08428, up from 20, and still 21 at e8db1a230 after the package gained a test file -- the file count moved, the error count did not (which is why the file count is derived here rather than written down, #5826).' },
665+
'@objectstack/plugin-security': { errors: 11, note: 'TS2739 x8, TS2740 x5, TS2345/TS2322/TS2741 x2 each -- incomplete literals. Re-measured 21 at 5ab08428, up from 20, and still 21 at e8db1a230 after the package gained a test file -- the file count moved, the error count did not (which is why the file count is derived here rather than written down, #5826).' },
649666
'@objectstack/formula': { errors: 17, note: 'TS2591 x6 (`process`), TS2345 x3, TS2352 x3, TS1470 x2, TS2339 x2. Re-measured 17 at 5ab08428, up from 12; the TS2591 half doubled, which is the missing `types:["node"]` again rather than five new defects.' },
650667
'@objectstack/trigger-record-change': { errors: 9, note: 'TS2353 x9 -- still the one unknown-property shape repeated, now in four files. Re-measured 9 at 5ab08428, up from 8.' },
651668
'@objectstack/verify': { errors: 8, note: 'TS2835 x4, TS7006 x4. Re-measured 8 at 5ab08428, up from 6; both classes are the NodeNext pair from the top-of-ledger note.' },
652669
'@objectstack/connector-mcp': { errors: 5, note: 'TS2339 x5. Re-measured 5 at 5ab08428, exact.' },
653670
'@objectstack/connector-openapi': { errors: 5, note: 'TS2339 x5. Re-measured 5 at 5ab08428, exact.' },
654671
'@objectstack/http-conformance': {
655-
errors: 4,
672+
errors: 3,
656673
note: 'TS2307 x2, TS2304 x1, TS2740 x1. Re-measured 4 at 5ab08428, up from 1. Worth knowing before '
657674
+ 'anyone tries to graduate it: 2 of the 4 are reported inside node_modules `.d.ts` files '
658675
+ '(@better-auth/core, @better-fetch/fetch), so this entry moves with the lockfile and not only with '

0 commit comments

Comments
 (0)