Uh oh!
There was an error while loading. Please reload this page.
fix(devx): graduate metadata-fs and example-showcase out of TEST_DEBT - #8061
Merged
hotlong merged 1 commit intoAug 12, 2026
Merged
Conversation
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.
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
📓 Docs Drift CheckNo hand-written docs reference the 0 changed package(s). ✅ |
hotlong
marked this pull request as ready for review
August 12, 2026 14:33
Uh oh!
There was an error while loading. Please reload this page.
hotlong
deleted the
claude/issue-7923-metadata-fs-showcase-typecheck-graduation
branch
August 12, 2026 14:50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes#7923
Graduates the two same-day candidates out of
TEST_DEBTvia the #5286 route, deleting each ledger entry in the same PR (RECONCILED forces the pair).@objectstack/cli(188 raw / 56 files) is out of scope per triage's binding scope comment — it is a programme, not a graduation. No other entry's recorded number is touched (that is #7888's--lowerjob; #7888 remains open).Re-measured before repair
The recorded counts were taken at older commits, so both layers were re-measured on the merged ref (
3373a29) the same way the gate'smeasureTestDebtdoes — hidden test files added toincludeone at a time,rootDirneutralised:@objectstack/metadata-fs@objectstack/example-showcaseBoth matched exactly, so the entries are deleted against measurements rather than against hope.
Route taken, per package
@objectstack/metadata-fs— siblingtsconfig.test.json, named by thetypecheckscript.Its
rootDirissrcanddevemits (tsc --watch,outDir: dist), so wideningrootDirin the build config would relocatedist/index.jstodist/src/index.jsand start emitting compiled test files, which ci.yml gates against. The sibling carries the widenedrootDirundernoEmitinstead. This package is a structural twin ofpackages/metadata-core, whose sibling config (#5476) is the model followed here. Strictness is inherited untouched — nothing is loosened.The 6 errors were real and were fixed in the tests:
test/contract.test.ts— genuinely dead imports (describe,it,beforeEach,expect,MetaRef); the file registers the shared contract suite, which declares its own cases, soafterEachis the only hook it uses.test/watch-write-registration.test.ts— the drain loop was written as an immediately-invoked async arrow. For an IIFE, tsc narrows a capturedletto its type at the point of the call, soresolveNext(initialisednull) narrowed tonulland the optional call resolved tonever. Binding the loop to a name and then calling it restores the declared type. Runtime behaviour is identical — the loop still starts there, unawaited.@objectstack/example-showcase— widenedinclude.Its
rootDiris already., so nothing needed neutralising; this is the shape #7312 applied to app-crm / app-todo. The 4 × TS2339 wereprocess.envreads against the package's minimal ambient shim (test/node-shim.d.tsdeclares onlycwd()), fixed with the file-localdeclare const processidiom the package already uses inobjectstack.config.tsandsrc/system/self-url.ts— no new dependency, no widened type surface.The glob is spec-scoped (
e2e+/**/*.spec.ts) rather than the wholesalee2e+/**/*, which holds the line the deleted entry's note drew. Confirmed by measurement: the wholesale glob pulls ine2e/global-setup.tsand bills the test layer 6 errors from a file that is not a test — 3process.envreads plus 3 gaps in the shim (nomkdirSync/writeFileSyncon thenode:fsshim, nonode:pathmodule at all). That file stays outside the program and is filed separately rather than folded in here.Reverse verification
Direction predicted before running: deleting a ledger entry without repairing its layer should fail TESTS_COVERED (not RECONCILED) — the entry is what was holding the hidden layer, so removing both the entry and the repair leaves the layer visible-but-unheld.
Measured by un-wiring metadata-fs's
typecheckscript with the entry already deleted. It went red in exactly that direction:Restored afterwards; the gates below are from the restored tree.
Verification
Dependency closure built first (
pnpm build, 71/71 tasks) — a bare debt-gate run exits 1 on a missing-module cascade.pnpm check:type-check-coverage— OK, 64/77 packages type-checked; test layer down to 20 packages hiding tests. Both entries gone.pnpm check:type-check-debt— OK, 33 entries re-measured, 1965 raw errors, none above its recorded number. Neither graduated package appears in the surplus list.pnpm --filter @objectstack/metadata-fs typecheck— passes both programs;test— 6 files, 51 tests passed.pnpm --filter @objectstack/example-showcase typecheck— passes;test— 20 files, 193 tests passed.pnpm --filter @objectstack/metadata-fs build— dist layout unchanged (index.js/index.cjs/index.d.ts), no compiled tests in dist.check:nul-bytes— OK; control-char self-scan over all changed files clean.scripts/pm/dispatch-gates.mjson the changed paths named exactly the two gates above.Playwright specs are type-checked but not executed here —
test:smokeneeds a live server and is non-blocking nightly.No changeset: tests, tsconfig and gate-script only, nothing user-visible is released.
skip-changesetapplied.Generated by Claude Code