What was measured
packages/runtime type-checks none of its own test files, and nothing reports the gap.
packages/runtime/package.json -> "typecheck": "tsc --noEmit".packages/runtime/tsconfig.json -> "exclude": ["node_modules", "dist", "**/*.spec.ts", "**/*.test.ts"].- There is no
tsconfig.test.json, no check:test-typecheck script, and no test-typecheck-debt.json in the package.
So pnpm --filter @objectstack/runtime typecheck exits 0 over source only. Confirmed by measurement rather than by reading the config: tsc --noEmit --listFiles in that package reports 0 hits for a test file that exists in src/domains/.
The population is not small — the package's suite is 208 test files / 3066 tests.
Why this is the shape AGENTS.md warns about
AGENTS.md states the rule directly: never exclude*.test.ts from a package's tsconfig.json, because tsc --noEmit reads that config, so the exclusion hides the tests from the very check the typecheck script advertises — a green gate over source nothing read. It also names the remedy: a sibling tsconfig.test.json named in the typecheck script, which is what packages/objectql and packages/rest both do (each pairing it with scripts/check-test-typecheck.mts --package ... --project tsconfig.test.json and a shrink-only test-typecheck-debt.json).
A @ts-expect-error written in any packages/runtime test today is therefore a phantom check: it evaluates never, and deleting it leaves every gate just as green.
Suggested shape
Onboard packages/runtime by wiring the shared gate the way its two siblings are wired — never by copying their implementation — and seed the per-file, shrink-only ledger with whatever the first measurement reports. Expect a non-trivial initial count; the ratchet only has to shrink from there.
Observed while landing #14309, which added a test file to packages/runtime/src/domains/ and had to type-check it standalone to know it was sound.
Generated by Claude Code
What was measured
packages/runtimetype-checks none of its own test files, and nothing reports the gap.packages/runtime/package.json->"typecheck": "tsc --noEmit".packages/runtime/tsconfig.json->"exclude": ["node_modules", "dist", "**/*.spec.ts", "**/*.test.ts"].tsconfig.test.json, nocheck:test-typecheckscript, and notest-typecheck-debt.jsonin the package.So
pnpm --filter @objectstack/runtime typecheckexits 0 over source only. Confirmed by measurement rather than by reading the config:tsc --noEmit --listFilesin that package reports 0 hits for a test file that exists insrc/domains/.The population is not small — the package's suite is 208 test files / 3066 tests.
Why this is the shape AGENTS.md warns about
AGENTS.md states the rule directly: never
exclude*.test.tsfrom a package'stsconfig.json, becausetsc --noEmitreads that config, so the exclusion hides the tests from the very check thetypecheckscript advertises — a green gate over source nothing read. It also names the remedy: a siblingtsconfig.test.jsonnamed in thetypecheckscript, which is whatpackages/objectqlandpackages/restboth do (each pairing it withscripts/check-test-typecheck.mts --package ... --project tsconfig.test.jsonand a shrink-onlytest-typecheck-debt.json).A
@ts-expect-errorwritten in anypackages/runtimetest today is therefore a phantom check: it evaluates never, and deleting it leaves every gate just as green.Suggested shape
Onboard
packages/runtimeby wiring the shared gate the way its two siblings are wired — never by copying their implementation — and seed the per-file, shrink-only ledger with whatever the first measurement reports. Expect a non-trivial initial count; the ratchet only has to shrink from there.Observed while landing #14309, which added a test file to
packages/runtime/src/domains/and had to type-check it standalone to know it was sound.Generated by Claude Code