Uh oh!
There was an error while loading. Please reload this page.
feat(tooling): @objectstack/core declares a typecheck script; test and examples layers enter the ratchet - #14916
Conversation
…d examples layers enter the ratchet (#14613) `packages/core/package.json` declared exactly `build`, `test`, `test:watch`. `turbo run typecheck` selects only packages that declare the task, so the lint workflow's typecheck job could not reach this package and `pnpm --filter @objectstack/core typecheck` failed with ERR_PNPM_RECURSIVE_RUN_NO_SCRIPT for anyone who tried it. Measured at 84b8190, dependency closure built first: - `tsc --noEmit -p tsconfig.json` (tests included, as the DEBT entry measured it): 98 errors over 12 files, all 12 of them `.test.ts` - the same program over only the 63 non-test source files: ZERO - the same 48 test files under vitest's module semantics: 4 So 94 of the 98 were the CHECK, not the code, and NO TEST FILE IS EDITED here. `tsconfig.json` keeps the build layer and excludes tests; a new `tsconfig.test.json` compiles them under `module: esnext` / `moduleResolution: bundler`, retiring 22 x TS2835, the TS2347 beside them and the TS7006 cascade they cause. Strictness is inherited and untouched. The residue of 4 is held per file and per signature in `test-typecheck-debt.json`, EXACT and shrink-only. Declaring the script flips the package from COVERED-BY-LEDGER to COVERED-BY-SCRIPT, so `check:type-check-coverage`'s SOURCES_COVERED invariant then reported `packages/core/examples` -- 2 non-test source files in NO tsc program. Neither had ever compiled (`../index.js` resolves above the package root; `@objectstack/core` is this package self-referencing by a name it declares in no dependency block). Collapsing that cascade EXPOSED errors, 12 -> 29: 20 reads of ObjectKernel's private `logger`, four scan-result members that do not exist, and two config literals passing unparsed shapes where the methods are declared over the `Parsed` ones -- drift from two retirements that edited this file while no tsc program could check it. Every correction is pinned to this package's own signatures; `packages/spec` was not touched. `@objectstack/core` therefore leaves the DEBT ledger: the coverage gate reads 70/79 type-checked with 9 ledgered, where it read 68/78 with 10. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0112hMx9hjJ9BgB28X97DS68
📓 Docs Drift CheckThis PR changes 1 package(s): 1 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
What this run could not see
Coarse fallback — 24 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 000a8b2396d77613e3506148fbad7b8072257e01 && git checkout 000a8b2396d77613e3506148fbad7b8072257e01
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 09cc6be43414214b9abfc7791b8497ea4f9dd2fc 86d7cc58b2615bf4cd0fe2de6a0c0856102f0336 && git checkout -B drift-repro 09cc6be43414214b9abfc7791b8497ea4f9dd2fc && git merge --no-ff 86d7cc58b2615bf4cd0fe2de6a0c0856102f0336
node scripts/docs-audit/affected-docs.mjs --json 09cc6be43414214b9abfc7791b8497ea4f9dd2fc
|
…R_MANAGED check:merge-driver red on PR #14916: gen:test-typecheck-debt (added to @objectstack/core by #14613) had no recorded merge disposition in either ledger in scripts/regen-artifacts.mjs. packages/core/test-typecheck-debt.json is the same shrink-only, per-signature EXACT ratchet as its six siblings already routed to NOT_DRIVER_MANAGED (spec, client, rest, objectql, the plugin family, lint, runtime) — a mid-merge "discard both sides and regenerate" would record whatever the half-merged tree happens to compile to, turning a real GAINED-error red into merge noise. It also carries the family's clearest example of the second hazard: a hand-authored `_note` (never written by `--update`, only ever preserved verbatim from an existing file) recording a human's triage of all 4 entries — 2 deferred to a shared-fixture repair in flight on @objectstack/metadata, 1 a genuine open design question, 1 left unfixed on purpose for diff cleanliness — plus why the ledger opens at 4 rather than the 98 the retired check:type-check-coverage DEBT entry once measured (94 of those 98 were a NodeNext config artifact this PR's tsconfig.test.json fixes, not test debt). None of that triage is reconstructable from source. Verified: only one new generator (gen:test-typecheck-debt) was added by #14613's diff; check:test-typecheck and typecheck are non-generator scripts and need no disposition. `pnpm check:merge-driver` is green, both legs. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0112hMx9hjJ9BgB28X97DS68
…re-typecheck-script # Conflicts: # scripts/regen-artifacts.mjs
Uh oh!
There was an error while loading. Please reload this page.
Fixes#14613
@objectstack/coredeclared exactlybuild,test,test:watch.turbo run typecheckselects only packages that declare the task, so the lint workflow's typecheck job could not reach this package, andpnpm --filter @objectstack/core typecheckfailed withERR_PNPM_RECURSIVE_RUN_NO_SCRIPTfor anyone who tried it — which is how a dispatched task came to assume it existed.The card asked for the count before any repair. Here it is.
Measured at
84b8190ae, dependency closure built firsttsc --noEmit -p tsconfig.json(undivided — exactly as the DEBT entry measured it)98reproduces the ledger to the unit, and the class breakdown matches it line for line: TS7006 x71, TS2835 x22, and one each of TS6133, TS2739, TS2352, TS2347, TS18046. All 12 files are.test.ts.So the build layer graduated as it stood, and 94 of the 98 were the CHECK, not the code.
What landed
The split this repo already runs for
spec,rest,objectqlandclient:tsconfig.jsonstays the BUILD config and now excludes the test layer.tsconfig.test.json(new) compiles that layer undermodule: esnext/moduleResolution: bundler— the semantics vitest actually executes it with. That retires 22 x TS2835, the TS2347 beside them, and the share of TS7006 they cascade into: an import that does not resolve makes every symbol it namesany. Strictness is inherited and untouched, and no test file is edited.test-typecheck-debt.json(new) holds the residue of 4, per file and per signature, EXACT and shrink-only.scripts/check-type-check-coverage.mjs— the@objectstack/coreDEBT entry is deleted, because RECONCILED makes a DEBT entry for a package that declarestypecheckan error.The 4 ledgered are left deliberately, and the ledger's authored
_notesays why. Two are one defect twice over (src/plugin-loader.test.ts,src/security/plugin-permission-enforcer.test.ts: a mockPluginContextmissingregisterServiceFactory/replaceService/getServiceScoped) — the same shape the@objectstack/metadataDEBT entry records, whose repair is in flight on its own card, so the shared fixture they want should be authored once by whoever closes that rather than twice in parallel.The
examples/half — found by the new script, not by the cardDeclaring
typecheckflips the package from COVERED-BY-LEDGER to COVERED-BY-SCRIPT, andcheck:type-check-coverage's SOURCES_COVERED invariant then reportedpackages/core/examples: 2 non-test source files in no tsc program at all. Neither had ever compiled —kernel-features-example.tsimported../index.js(above the package root, never existed) andphase2-integration.tsimported@objectstack/core, i.e. this package self-referencing by a name it declares in no dependency block.Collapsing that cascade exposed errors rather than removing them, 12 to 29 — all real, none new:
ObjectKernel's privatelogger;passed,score,summary.critical,summary.high, whereKernelSecurityScanResultcarriesstatusand per-severity counts);PluginHealthMonitor.registerPluginandHotReloadManager.registerPluginare declared over theParsedones. That pair is retirement drift: this file was edited by two retirements (thePluginHealthCheckrestart keys, andwatchPatterns) while no tsc program could check the result.Every correction is pinned to this package's own signatures —
PluginPermissionSetoffsrc/security/permission-manager.ts, theParsedvariants offsrc/health-monitor.ts/src/hot-reload.ts, the scan shape off the type tsc printed.packages/specwas not touched, and needed no change: the three types the example wanted are exported from@objectstack/spec/kernel, never from.../system, and this package's own source already imports them fromkernel.@objectstack/coretherefore leaves the DEBT ledger:check:type-check-coveragenow reads 70/79 type-checked with 9 ledgered, where it read 68/78 with 10.Out of scope, reported not fixed
packages/core/examples/phase2-integration.tsis the sole composer ofPluginSecurityScanner, whichdocs/qa/platform-checklist/FOLLOW-UPS.mdalready records as exported dead code on the public barrel with 3 of 5 scan methods empty stubs. When this directory was last found composing a retired surface, the repo deleted the example (api-registry-example.ts, #4939). Whether these two files should exist at all is a retirement decision for that seat; this PR only makes them compile, so the question is now visible to tsc instead of hidden from it.Gates
Derived with
node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commandsand no path arguments, so the change set comes from the merge base rather than a hand-written list; harvested via--commands, not by grepping the prose. 49 families, all run at27ecaa29e:check:dual-build-cjs-loadsandcheck:type-check-debtgreen.pnpm --filter @objectstack/core typecheck— exit 0 (the script this card is about).check:type-check-debt—20 ledger entr(ies) re-measured in 299.8s, 451 raw tsc error(s) total, none above its recorded number. surplus: none.node scripts/pm/check-governed-merges.mjs --teston the final 9-file list —NOT governed.check-test-completenessandcheck-half-statesboth exit 3 = PREREQUISITE NOT MET (a savedturbo run testlog; GitHub API access). Neither is a finding, and both are unrelated to this diff.check:dual-build-cjs-loadsfirst reported 2 findings against@objectstack/clientand@objectstack/client-react. Both were artifacts of a cut-off local build (dist present, declarations not emitted); after building those two properly the gate is green over 102 entry points. Neither names@objectstack/coreand this diff changes no exports map, nofiles, and no runtime source.🤖 Generated with Claude Code
https://claude.ai/code/session_0112hMx9hjJ9BgB28X97DS68
Generated by Claude Code