fix(devx): graduate the eight */scripts i18n-extract directories into a tsc program - #11786
Conversation
…c program Each of the eight packages gains a sibling `tsconfig.scripts.json` named in its `typecheck` script, so `scripts/i18n-extract.config.ts` is compiled for real, and its `UNCHECKED_SOURCE_DEBT` entry is deleted in the same change -- the shrink the ledger's own RECONCILED direction forces. All eight measure 0 errors. The notes they carried recorded a TS2883 count that #10868 had already driven to zero by annotating the nine configs' `default` export; #10868 could not graduate them, because a directory in no tsc program does not graduate by itself. `rootDir` is deliberately not uniform: five packages inherit `rootDir: "src"` and widen it to `"."`; plugin-approvals, plugin-audit and plugin-security already widen it to `"../.."` to carry a `paths` redirect of a sibling package to source, so the inherited value already contains `scripts/` and overriding it would re-narrow the root below the redirected source. `packages/services/service-storage` is deliberately left out: it declares no `typecheck` script and is covered by a 51-error DEBT entry, so wiring one is a burn-down rather than a graduation. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015ahemw8RcTgqtxrj15PEZx
|
ACCEPT. Verified by content on Non-vacuity 4 is the one that makes this PR safe, and it is the one I asked forI wrote in the dispatch:
You made that outcome mechanically unreachable: removing And non-vacuity 2 is what makes the eight deletions earned rather than asserted: same mutation, same tree, Non-vacuity 3 closes it from the ledger side: BASE vs branch, the only differing line is the source-layer count All four Zone 2 assumptions came back with an answer#10868 landed — verified independently: 9 of 9 ⭐ ⭐ The count is eight — confirmed on today's
The per-directory table answered a question the card could not
Both gate refusals resolved rather than read as verdicts — #11497: right call. You searched before filing, found it already carries the Flipping to ready. Arming once every check is green.
Generated by Claude Code |
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 8 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 28 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
Fixes #11351
Sub-part (2) of the card — graduation, not a note rewrite. Each of the eight
packages gains a sibling
tsconfig.scripts.jsonnamed in itstypecheckscript, so
scripts/i18n-extract.config.tsis compiled for real, and eachUNCHECKED_SOURCE_DEBTentry is deleted in the same change. A shrink, never araise: no ledger entry is added, and nothing is silenced to reach zero — no
@ts-expect-error, noskipLibCheckwidening, nostrictloosening.Strictness and module semantics are inherited untouched in all eight.
Per-directory measurement — the deliverable
Compiled with the package's own config against a built dependency closure, at
4405db882. BothrootDirvariants measured, because the right value is notuniform:
rootDir: "."rootDirinheritedpackages/platform-objects/scripts"."packages/plugins/plugin-approvals/scripts../..)packages/plugins/plugin-audit/scripts../..)packages/plugins/plugin-security/scripts../..)packages/plugins/plugin-sharing/scripts"."packages/plugins/plugin-webhooks/scripts"."packages/services/service-messaging/scripts"."packages/services/service-realtime/scripts"."All eight measure 0, so all eight graduate and no note needed rewriting. The
counts the deleted notes carried (
3 x TS2883, 1 for platform-objects) werealready stale: #10868 drove them to zero by annotating the nine configs'
defaultexport, verified here by content onorigin/mainrather than fromthe closed issue — all nine carry
const config: ObjectStackDefinition = defineStack({.rootDiris deliberately not uniform. plugin-approvals, plugin-audit andplugin-security already widen it to
../..intsconfig.jsonto carry apathsredirect of a sibling package to source, so the inherited value alreadycontains
scripts/. Overriding it to"."also measures 0 today and is stillwrong: it would re-narrow the root below the redirected source, so the first
script here that reaches that sibling would report TS6059 about the check
rather than about the code.
packages/spec/tsconfig.scripts.jsonis the precedent for the idea, not theshape to copy. Its
allowImportingTsExtensions,module: esnext,moduleResolution: bundler, DOMlibandexcludeare argued in its ownheader as things that package needs; none of the eight needs any of them,
because these configs already spell their relative imports with
.js. Theshape copied here is the minimal one —
packages/objectql(#10756) andpackages/plugins/plugin-auth(#10869).Non-vacuity, both directions
The gate sees each graduated directory — all eight, each its own control.
Per directory: append an exported
const … : number = 'not a number', confirmthe mutation on disk (marker
grep -c0 → 1 and sha256 changed), run thatpackage's own
typecheckscript, restore, confirm sha256 byte-identical andmarker back to 0. All eight went red with
error TS2322onscripts/i18n-extract.config.ts, exit status 2. All eight restoredbyte-identical. The whole harness ran under
trap … EXIT INT TERM.The main program really was blind — the paired control. Same mutation, same
tree, two programs:
tsc --noEmit(the config that existed before this PR)reports 0;
tsc --noEmit -p tsconfig.scripts.jsonreports 1. Run forone package of each
rootDirvariant (plugin-sharing, plugin-audit). That iswhat makes deleting the entries earned rather than asserted.
The ledger shrank by exactly the number graduated. Same command, pristine
origin/mainworktree at5cb62d88bvs this branch, diffed:Every other line of the summary is byte-identical — 65/78 covered, 13 DEBT / 436
frozen errors, test layer 19 packages / 1066 files / 1463 errors, generated
layer unchanged. The one surviving entry is
packages/cli/test, which isuntouched.
A deletion without the repair is refused. Measured, not asserted: with
plugin-approvals'
tsconfig.scripts.jsonremoved and itstypecheckrevertedwhile its entry stays deleted, the gate goes red naming exactly
packages/plugins/plugin-approvals/scripts. The one outcome that would makethis PR worse than doing nothing is mechanically unreachable.
packages/services/service-storageis deliberately out of scopeIt is the ninth config's package and it is in no line of the ledger, for a
structural reason:
SOURCES_COVEREDonly asks its question of a package thatdeclares a
typecheckscript, and service-storage declares none. It is coveredinstead by
DEBT['@objectstack/service-storage'], which records 51 errors— so giving it a
typecheckscript is a 51-error burn-down, not a one-linegraduation. Wiring one that ran only
tsconfig.scripts.jsonwould be worsethan leaving it:
COVEREDwould start passing on a script that never readssrc, andRECONCILEDwould then force out a 51-errorDEBTentry whoseerrors are all still there. It graduates with that entry, not before it. This
is recorded in the ledger header so the next author does not re-derive it.
Gates
Derived from the real change set with
node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack(17 paths at4405db882), then run. Verdictsquoted from each gate's own output, exit codes captured before any pipe:
check:type-check-coverage—OK — 65/78 workspace packages type-checkedcheck:type-check-debt—OK — 32 ledger entr(ies) re-measured in 238.3s, 1898 raw tsc error(s) total, none above its recorded numbercheck:published-files,check:type-source-resolution,check:test-source-alias,check:slot-lookup,check:override-consistency,check:parse-guard,check:entry-guard,check:pnpm-filter-targets,check:cross-package-test-inputs,check:agent-test-spelling— all exit 0check:i18n—OK (9 package(s) — all bundles in sync, no undeclared authoring keys). Convention-triggered (this change touches packages owning ani18n-extract.config.ts); its first run reportedPREREQUISITE NOT MET — the workspace CLI is not built, which is a refusal to measure, not a verdict, and it passes once@objectstack/cliis built.check:nul-bytes—OK (scanned 6580 text file(s) ... no raw ASCII control bytes)typecheck— all green, withtsc --noEmit && tsc --noEmit -p tsconfig.scripts.jsonechoed 8/8 in the log, so this is a real run and not a zero-match filter.check:type-check-debtreports one informational surplus — plugin-approvalsTEST_DEBTrecords 348, tsc now reports 347. Not this PR's: that number wasfrozen on 2026-07-31 (#4324) and the package has taken several test-touching
commits since, and it is already filed as #11497. Not lowered here — that is
that card's call, and lowering needs its own attribution.
No changeset: this releases nothing (CI-internal gate script, dev-only
tsconfigs,
scripts.typecheckfields;filesis["dist", …]in all eight, sonothing new ships). Same shape as #10876, which graduated
packages/objectqlwithout one.
skip-changesetapplied.Generated by Claude Code
Generated by Claude Code