You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(devx): graduate metadata-fs and example-showcase out of TEST_DEBT (#8061)
Both packages' test layers were hidden from tsc by an include-shaped hole
that #7353 taught TESTS_COVERED to see, and both were ledgered as measured
TEST_DEBT rather than repaired. This repairs them via the #5286 route and
deletes both entries in the same PR, which RECONCILED forces as a pair.
Re-measured on the merged ref before repair; both matched their recorded
numbers exactly (metadata-fs 6, example-showcase 4), so the entries are
deleted against measurements rather than against hope.
metadata-fs takes the sibling-config route. Its rootDir is `src` and `dev`
emits (`tsc --watch`, outDir dist), so widening rootDir in the BUILD config
would relocate dist/index.js and start emitting compiled tests; the sibling
tsconfig.test.json carries the widened rootDir under noEmit instead and is
named by the typecheck script. Its 6 errors were real: 5 dead imports
(TS6133, from the root config's noUnusedLocals) and one TS2349 where an
immediately-invoked drain loop made tsc narrow a captured `let` to `null`,
so the optional call resolved to `never`. Binding the loop to a name before
calling it restores the declared type; runtime behaviour is unchanged.
example-showcase takes the widened-include route (#7312's shape for
app-crm / app-todo) since its rootDir is already `.`. Its 4 TS2339 were
`process.env` reads against the package's minimal ambient shim, fixed with
the file-local `declare const process` idiom the package already uses in
objectstack.config.ts and src/system/self-url.ts. The include glob is
`e2e/**/*.spec.ts` and NOT `e2e/**/*`, holding the line the deleted entry's
note drew: the wholesale glob would pull in e2e/global-setup.ts, a fixture
rather than a test, and bill the layer 6 errors that are not its own.
@objectstack/cli stays in the ledger — a programme, not a graduation. No
other entry's recorded number is touched.
Co-authored-by: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: scripts/check-type-check-coverage.mjs
+22-3Lines changed: 22 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -474,13 +474,34 @@ const EXEMPT = {
474
474
// re-ratcheted.
475
475
//
476
476
// THE THREE ENTRIES THAT ARRIVED WITH #7353 -- cli 188, metadata-fs 6,
477
-
// example-showcase 4 -- are not new debt and did not slip past a ledger that is
477
+
// example-showcase 4 -- were not new debt and did not slip past a ledger that is
478
478
// closed to it. They are debt this gate had never been able to SEE: TESTS_COVERED
479
479
// asked whether an `exclude` named the tests, so a package that had simply never
480
480
// pointed `include` at its test tree answered "covered" while nothing compiled a
481
481
// line of it. All three were in that state before this ledger existed. 198 raw
482
482
// errors is what the blind spot was worth on the day it was measured, and the
483
483
// only thing that changed to surface them is the question.
484
+
//
485
+
// TWO OF THE THREE HAVE SINCE GRADUATED (#7923), which is the point of a TEST_DEBT
486
+
// entry: it is a holding position that makes a layer ratchet, not a destination.
487
+
// Both were re-measured on the merged ref before repair and both matched their
488
+
// recorded numbers exactly (metadata-fs 6, example-showcase 4), so the entries
489
+
// were deleted against measurements rather than against hope.
490
+
// - `@objectstack/metadata-fs` took the sibling-config route, because its
491
+
// `rootDir` is `src` and its `dev` script emits (`tsc --watch`, `outDir:
492
+
// dist`): a package-root `rootDir` in the BUILD config would relocate
493
+
// `dist/index.js` and start emitting compiled tests. `tsconfig.test.json`
494
+
// beside it is named by the `typecheck` script -- the #5286 mechanism, the
495
+
// same one `packages/metadata-core` uses for the structurally identical hole.
496
+
// - `@objectstack/example-showcase` took the widened-`include` route (#7312's
497
+
// shape for app-crm / app-todo), because its `rootDir` is already `.` and
498
+
// nothing needed neutralising. Its glob is `e2e/**/*.spec.ts` and NOT
499
+
// `e2e/**/*`, holding the same line the deleted entry's note drew: the
500
+
// wholesale glob would pull in `e2e/global-setup.ts`, a fixture rather than a
501
+
// test, and bill the test layer 6 errors that are not its own. That file is
502
+
// still read by no tsc program and is filed rather than folded in here.
503
+
// `@objectstack/cli` (188 raw across 56 files) is deliberately NOT part of that
504
+
// graduation -- it is a programme rather than a sitting, and its entry stands.
484
505
constTEST_DEBT={
485
506
'@objectstack/plugin-approvals': {
486
507
errors: 547,
@@ -628,7 +649,6 @@ const TEST_DEBT = {
628
649
'@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.'},
629
650
'@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.'},
630
651
'@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.'},
631
-
'@objectstack/metadata-fs': {errors: 6,note: 'TS6133 x5 (declared, never read -- the root config sets `noUnusedLocals`), TS2349 x1. Include-shaped: `include: ["src/**/*"]`, no `exclude` naming tests, and all 6 test files in a sibling `test/` tree, so this was invisible to the exclude-shaped detector (#7353). 5 of the 6 are in test/contract.test.ts; the TS2349 is in test/watch-write-registration.test.ts. Measured at b9f930b, recorded exactly.'},
632
652
'@objectstack/connector-mcp': {errors: 5,note: 'TS2339 x5. Re-measured 5 at 5ab08428, exact.'},
633
653
'@objectstack/connector-openapi': {errors: 5,note: 'TS2339 x5. Re-measured 5 at 5ab08428, exact.'},
634
654
'@objectstack/http-conformance': {
@@ -639,7 +659,6 @@ const TEST_DEBT = {
639
659
+'this package\'s own code. Raw `tsc --noEmit` counts are what every number in these ledgers means, '
640
660
+'so they are counted here rather than filtered out -- but they are not this package\'s debt to fix.',
641
661
},
642
-
'@objectstack/example-showcase': {errors: 4,note: 'TS2339 x4. The one entry here whose hidden files are Playwright specs rather than vitest tests: `include` names `src/**/*`, `objectstack.config.ts` and `test/**/*` -- so the vitest layer is compiled and the `e2e/` tree beside it is not. Three specs, 4 errors (detail-shapes.spec.ts x2, bulk-capability-gate.spec.ts x1, showcase-smoke.spec.ts x1). Measured by adding the three spec files to `include` one at a time, NOT `e2e/**/*`, which would also have pulled in e2e/global-setup.ts and billed this layer 6 errors from a file that is not a test. Sibling to #7312, which repaired app-crm and app-todo the same way and could not move this gate\'s count because neither app had ever counted toward it.'},
'@objectstack/service-sms': {errors: 1,note: 'TS2493 x1, in transports.test.ts. Re-measured 1 at 5ab08428 and still 1 at e8db1a230, after two more hidden test files: #5773 added sms-manifest-providers.contract.test.ts and #2814 / PR #6042 added sms-daily-quota.test.ts. The file count moved twice while the error count did not -- both new files are type-clean with the exclusion lifted.'},
0 commit comments