Repository navigation
docs(tests): replace a false typecheck-script premise in four pin headers - #17303
Merged
Merged
Conversation
…eaders Four test files justified a pin's placement (or a typing choice) with the claim that the package "has no `typecheck` script (a type-check DEBT ledger entry)". Both halves are false on this tree: `@objectstack/core`, `@objectstack/runtime` and `@objectstack/service-automation` each declare a `typecheck` script ending in `check:test-typecheck`, and none of them holds an entry in `scripts/check-type-check-coverage.mjs`'s `DEBT`. Following the pattern #16738 set for the two sibling headers: delete the false premise, promote the surviving true reason, and record the correction in place so the next reader does not re-derive it. - rest/core retired-fields pair: the pin lives in `rest` because only that program resolves `@objectstack/core` to the BUILT `dist/index.d.ts`. Measured with `tsc --listFiles` on both programs: rest's contains `packages/core/dist/index.d.ts` and zero files under `packages/core/src/`; core's own test program contains `packages/core/src/plugin-loader.ts` and zero under `packages/core/dist/`. - runtime's quickjs `ctx.crypto` pin is executable because the defect was a member declared on the host seam and never installed, so a type-level assertion reads the artefact that lied. Its file IS in the program #14504's `tsconfig.test.json` defines, so a directive there would be live. - service-automation's `FlowTrigger` typing note: that package's build config carries no test exclusion, so its `tsc --noEmit` already compiles the file, and no `test-typecheck-debt.json` exists beside its test config, so the floor is zero errors rather than a shrink-only lane. Comment prose only: every changed line begins with `//`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012GKcPZbMoGq7WPzKLfRBTU
Contributor
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
baozhoutao
marked this pull request as ready for review
September 10, 2026 05:41
baozhoutao
enabled auto-merge
September 10, 2026 05:41
baozhoutao
deleted the
claude/issue-16742-pin-placement-header-premise
branch
September 10, 2026 06:09
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 free
to 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 #16742
Four test files justified a pin's placement (or a typing choice) with the claim that the
package "has no
typecheckscript (a type-check DEBT ledger entry)". Both halves are falseon this tree. This is comment prose only — every changed line begins with
//, provedmechanically:
The falsification, re-derived rather than transcribed
scripts/check-type-check-coverage.mjs'sDEBTobject literal (lines 802-830 on this tree)holds exactly four entries, and they are other packages:
@objectstack/cloud-connection,@objectstack/hono,@objectstack/observability,@objectstack/spec-monorepo. TheDEBT['@objectstack/service-storage']that appears elsewhere in the same file is past-tenseprose about an entry #15050 deleted, not a fifth entry.
TEST_DEBTholds exactly one:@objectstack/http-conformance.check:type-check-debtprinted the same populationindependently: "76/80 workspace packages type-checked (plus the root), 4 in the DEBT ledger".
Each named package declares a
typecheckscript, read out of its ownpackage.json:Finding the carriers — a grep cannot, and a count is not a reading
The sentence contains backticks, wraps across lines, and the
//prefix lands inside thewrap. The scan strips comment prefixes, flattens whitespace, drops backticks, then matches the
short fragment
has no typecheck scriptover all 7969 tracked source/doc files. Positivecontrol
DEBT-> 744 hits; nonsense control -> 0.Seven files carry the fragment, six of them test files, and the count is identical (1) before
and after this change — which is exactly why the count decides nothing. Each was read:
packages/rest/src/plugin-type-closed-set.pin.test.tspackages/core/src/plugin-type-closed-set.test.tspackages/rest/src/plugin-metadata-retired-fields.pin.test.tspackages/core/src/plugin-loader.retired-fields.pin.test.tspackages/runtime/src/sandbox/quickjs-runner.test.tspackages/services/service-automation/src/flow-trigger-kind-shared-resolver.test.tsscripts/check-type-check-coverage.mjsAll four asserted carriers are now quoted-and-corrected, following the pattern #16738 set:
delete the false premise, promote the surviving true reason, record the correction in place.
The promoted reasons
rest / core retired-fields pair. The compile-time pin lives in
restbecause only thatprogram resolves
@objectstack/coreto the BUILTdist/index.d.ts. Re-proved here withtsc --noEmit --listFileson both programs, workspace closure built first, each leg carryingits own control:
PluginMetadatais declared atpackages/core/src/plugin-loader.ts:41, so a directive in corewould be evaluated — core's
typechecknames its owntsconfig.test.jsonsince #14613 — butagainst the source declaration, never the emitted surface. That is the durable half; the
script-list half was not.
runtime — the quickjs
ctx.cryptopin. Derived from this package's own wiring, not copied.packages/runtime/tsconfig.jsonis the BUILD config and excludes**/*.test.ts(measured: 0 ofits test files in that program, 81 non-test src files as the control), which is where the old
sentence came from. But #14504 added
tsconfig.test.json, which thetypecheckscript NAMESvia
check:test-typecheck --project, andtsc --listFilesputssrc/sandbox/quickjs-runner.test.tsin it. So a type-level directive there would be live. Thereal reason the pin is executable is the defect it pins:
ScriptContext.crypto.hashwasDECLARED on the host seam and never installed, so a type-level assertion reads the very artefact
that lied and would have passed green on the broken tree. Only running the sandbox observes what
the VM really got.
service-automation — the
FlowTriggertyping note. Derived the same way. That package'stsconfig.jsoncarries no test exclusion (itsincludeis["src"]), so thetsc --noEmitits
typecheckscript runs already compiles the file, and #15048'stsconfig.test.jsoncompiles it too (measured: the file is in both programs; 127 own test files in each). There is
no
test-typecheck-debt.jsonbeside that config, and the gate confirms the absence is the zero:"0 file(s) / 0 error(s) / 0 pinned signature(s)". The floor under that file is stricter than the
old sentence claimed, not laxer.
Changeset:
skip-changeset, measuredThe four files sit under
packages/**/src/**, so this was measured rather than assumed. Thecriterion is whether anything a package actually ships moves. Each package's
filesis["dist","README.md","CHANGELOG.md"]; after a full workspace build, a token unique to eachedited test file was grepped across exactly those shipped paths, with a positive control from
the same package's own source in the same pass:
Zero hits with the control hitting means the grep reached the shipped bytes and the comment
prose is not among them — a bundled package emits nothing from
src/**/*.test.ts.check:published-filesis green on the same tree. Nothing publishable moves, so this PRdeclares no release of its own.
Verification, at
b20d479d76dispatch-gates --ran: 55 derived families, 55 run, 0 NOT-MEASURED, 0 UNRUN.check:dual-build-cjs-loadsandcheck:type-check-debtboth need the whole workspace built.The full build was run (
turbo run build --filter='./packages/*' --filter='./packages/*/*',72/72 tasks) and both were driven to a real verdict: exit 0.
pnpm typecheckfor the four affected packages: all exit 0. The two test-layer ledgersare unmoved — runtime "27 file(s) / 191 error(s) / 69 pinned signature(s)", service-automation
"0 / 0 / 0". The ledger is keyed by file plus normalised signature, not by line number, so
inserting comment lines above an existing diagnostic cannot move it.
service-automation 14 passed.
pnpm lint(eslint . --no-inline-config) over the whole repo: exit 0. No narrowing, sono narrowing claim is being made.
instrument.
Acceptance notes
deliberately NOT touched here.
packages/rest/src/rest-api-plugin-slot-lookups.test.tssays "
packages/rest/tsconfig.jsonexcludes its.test.tsfiles and the package declares notypecheckscript (it is a DEBT/TEST_DEBT ledger entry), so NO tsc program compiles thisfile".
@objectstack/restdeclarestsc --noEmit && pnpm check:test-typecheck, is in neitherledger, and its
tsconfig.test.jsonprogram compiles that file. It was found by widening thescan to wording variants (
no typecheck script,DEBT ledger entry,DEBT table of,type-check DEBT lane) rather than the single fragment. Reported to the dispatching seatrather than folded in, per the dispatch's explicit fence.
plugin-security/src/permission-set-projection.test.ts(already quoted-and-corrected by@objectstack/plugin-securityexcludes**/*.test.tsfrom its only tsc program — 89 test files unchecked, 11 standing type errors behind a greentypecheck#13176),service-datasource/src/__tests__/datasource-driver-handle-contract.test.ts(claimsabsence from the ledger, which is true),
verify/src/harness.host-resolution.test.ts(claimsa TEST_DEBT entry for a different package), and
spec/src/contracts/objectql-engine.ts(past-tense history of why [P2] framework: 66 个包用 tsup 构建、无人做类型检查 —— 实测 18 个包共 380 处 code-tier 错误(#4118 的 framework 侧对应) #4311 happened, not a live justification).
seven files on this tree, six of them test files. The seventh,
scripts/check-type-check-coverage.mjs, states it generically about DEBT graduates and istrue. Two of the six were already fixed, so four were in scope — the arithmetic the card
states.
Generated by Claude Code