Uh oh!
There was an error while loading. Please reload this page.
fix(cli): add two missing .js import extensions, shrink TEST_DEBT 188 to 146 with a re-measured note - #8779
Conversation
…hrink TEST_DEBT 188 -> 146
Under moduleResolution NodeNext the extension-less relative imports in
test/i18n-extract.test.ts and test/i18n-coverage.test.ts do not resolve, so
every symbol they name becomes `any` and each unannotated parameter downstream
becomes an implicit any. Adding the extensions collapses the cascade: those two
files go 35 -> 0 and 7 -> 0, and no other file in the layer moves by one error.
Fixing the i18n-extract import exposed 4 TS2339 that the broken import had been
hiding: the file carried an `(e: { path: string[] })` parameter annotation
written to dodge the implicit-any, and it narrowed the real ExpectedEntry away.
The annotation is deleted rather than widened, so the file now type-checks
against the producer's declared type.
The @objectstack/cli TEST_DEBT entry drops 188 -> 146 with its note rewritten to
describe the post-collapse composition -- 57 of the 59 extension-less imports
remain, and every surviving TS7006 sits in a file that still carries a TS2835.
No other ledger entry is touched.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NaS1PAHJcPfAA2acnV53Tn…-test-debt-import-extensions
… the note's base Re-ran both halves on main@35086781b with the closure built, replacing the numbers measured at the earlier base: 188 before, 146 after, delta -42, fully attributed to test/i18n-coverage.test.ts (35 -> 0, 1 TS2835 + 34 TS7006) and test/i18n-extract.test.ts (7 -> 0, 1 TS2835 + 6 TS7006). Outside those two files the before and after diagnostics are identical line for line, so nothing else in the layer moved and nothing new appeared. Also verified the exposure lesson the note carries rather than inheriting it: with the i18n-extract import fixed and the dodge annotation still in place the file reports 4 TS2339, not 0 -- the layer total sits at 150 in that intermediate state. Deleting the annotation, so the parameter takes the real ExpectedEntry the producer declares, takes the file to 0. The header comment above TEST_DEBT now reads 146 across 65 files rather than carrying both the old and new counts. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NaS1PAHJcPfAA2acnV53Tn
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
📓 Docs Drift CheckNo hand-written docs reference the 0 changed package(s). ✅ |
qq9340100
commented
Aug 15, 2026
ACCEPT — PM review, |
qq9340100
commented
Aug 15, 2026
ACCEPT — PM review, |
Uh oh!
There was an error while loading. Please reload this page.
Fixes#8612
Two relative imports in
@objectstack/cli's hidden test layer were missing their.jsextensions. UndermoduleResolution: NodeNextneither resolves, so every symbol they name becomesanyand each unannotated parameter downstream becomes an implicit any — the "a pile of TS7006 is usually one broken import upstream" shape AGENTS.md describes. Adding the two extensions collapses the cascade and the package's TEST_DEBT entry drops 188 → 146.Measured, both halves, on the same tree
Both numbers come from this branch, measured with the gate's own synthesized project (test layer un-hidden,
typeRootsreconstructed) on main at 3508678 with the closure built. The two import extensions are the only difference between the before tree and the after tree.The −42 is fully attributed, with no unexplained remainder:
test/i18n-coverage.test.ts35 → 0 (1 TS2835 + 34 TS7006)test/i18n-extract.test.ts7 → 0 (1 TS2835 + 6 TS7006)Outside those two files the before and after diagnostic sets are identical line for line (146 before, 146 after), so nothing else in the layer moved and nothing new appeared anywhere.
The note rewrite
The card's substance, not a formality: after the collapse the surviving pile has a different composition, and a note still naming the old errors would read as "nearly graduated" to the next author. The new note records what the pile is actually made of — 57 of the 59 extension-less imports still present across 24 files, and every one of the 60 surviving TS7006 sitting in a file that also carries a TS2835, so there is no implicit-any left in this layer without a broken import above it. Nothing in it is inferred; every figure is from the runs above.
A repair here can be bigger than its TS2835 line suggests
Verified rather than assumed, and now recorded in the note. Fixing the
i18n-extractimport alone takes that file 7 → 4, not 7 → 0: it carried an(e: { path: string[] })parameter annotation written to dodge the implicit-any while the import was broken, and that annotation narrowed away the realExpectedEntrythe producer declares. In that intermediate state the layer total sits at 150 (TS2339 24 → 28). Deleting the annotation — so the parameter takes the producer's declared type — takes the file to 0. The annotation is deleted, not widened, and no@ts-expect-erroror per-parameter annotation is used anywhere in this diff.Scope
Only
@objectstack/cli's entry is touched. Across the whole ledger exactly oneerrors:value changed, 188 → 146; every other entry is byte-identical. In particularpackages/lintstays at 20 against a measured 19 — that surplus belongs to #8610, which remains open and is not addressed here.No changeset: tests plus a CI-internal gate script release nothing, which is the
skip-changesetcase lint.yml names explicitly.Gates, all run at
81a3616e8(this PR's head)pnpm check:type-check-debt— green, 33 entries re-measured in 316.2s, 1926 raw errors total, none above its recorded number. The cli entry prints no line at all, meaning measured equals recorded exactly at 146.pnpm check:type-check-coverage— green, including the self-test's 109 cases. TEST_DEBT total moves 1533 → 1491, exactly −42.pnpm check:query-options-erasure— green (ratchet holds, 67 unswept non-test sites, none new). Not named in dispatch; surfaced by re-derivingscripts/pm/dispatch-gates.mjsagainst the actual changed paths, since editing any test file moves it.pnpm check:nul-bytes— green, 5794 files; plus a control-byte self-scan of the three changed files.pnpm --filter @objectstack/cli typecheck— exits 0, which is the point: it is structurally blind to this layer (include: ["src"]), so only the ledger measures it.vitest run test/i18n-extract.test.ts test/i18n-coverage.test.ts— 2 files, 33 tests, all passing.The package's full suite was not run to completion locally: its e2e files boot a runtime and exceeded this session's per-command cap under shared-lock contention. CI runs it.
Generated by Claude Code