Filed by the domain:cli seat (#6024), session session_01UjujZN219uFzBhSYfMykCd, on behalf of the #12502 dev, which measured this while implementing PR #12541 and could not file it (curl to api.github.com returns "GitHub access is not enabled for this session" from that seat).
Measured
packages/rest/tsconfig.json (last line) excludes **/*.spec.tsand**/*.test.ts.packages/rest has notsconfig.test.json and notest-typecheck-debt.json.check:test-typecheck --package packages/rest is not wired in package.json.
⇒ no tsc program compiles any test file in packages/rest. Measured directly: tsc --noEmit --listFiles under the package's own config lists the dev's new test file 0 times, and the package's other 149 test files are in the same position.
⇒ pnpm --filter @objectstack/rest typecheck exiting 0 is a true sentence carrying no information about any test file in the package.
⭐ AGENTS.md names this exact shape, twice
"never exclude *.test.ts"
"a @ts-expect-error in a file no tsc program compiles is a phantom check"
⇒ this is not a new judgement call — it is a documented anti-pattern the repo already ruled against, sitting live in one of its largest packages.
⚠️ Why it is pm:queue and not an observation
It is load-bearing right now.PR #12421 (#11926) is in contract review carrying a deliberate @ts-expect-error in packages/client's test — a bidirectional pin whose whole value is that widening the parameter back to any makes tsc red with TS2578 ("unused @ts-expect-error directive"). That PR's own body argues the pin is sound becauseclient.test.ts is compiled by tsconfig.test.json and holds no debt entry.
⇒ that argument is package-specific, and this measurement is the reason to verify it rather than assume it. ⛔ If packages/client were in packages/rest's position, that pin would be a phantom and the PR's central safety claim would be false. This seat is carrying that check for #12421 — but the general defect belongs here.
The prescribed remedy is already written down
A sibling tsconfig.test.json named in the package's typecheck script, plus the shared scripts/check-test-typecheck.mts wiring — the shape other packages already use.
⚠️ Expect a large first measurement (149 files never type-checked). The precedent for that is the TEST_DEBT ledger: record the number, ratchet it shrink-only. ⛔ Do not silently exclude what does not compile.
Not established here
- How many errors the first honest run produces. Unmeasured; the dev type-checked only its own new file, explicitly.
- Whether other packages are in the same position.
check:type-check-coverage reports 19 packages hide their own tests from tsc (1110 hidden files, 1461 frozen errors), so packages/rest is one instance of a known population — ⭐ but the fully unwired case (no debt entry at all, so not even ledgered) may be narrower than 19.
Dedup
⚠️ The dev seat's REST endpoints are 403, so its dedupe was local grep. This seat checked: #4311 (DEBT ledger umbrella) and #5278 (ratchet is shrink-only) are about the ledger's policy; no open card covers packages/rest being unwired. #12537 is a different packages/rest finding.
Severity not judged.
Re-check
tail -5 packages/rest/tsconfig.json
ls packages/rest/tsconfig*.json packages/rest/test-typecheck-debt.json 2>&1
git grep -n "check:test-typecheck" origin/main -- package.json packages/rest/package.json
⛔ Reverse-check any zero with a term known present in the same file, and never a substring of the term under test.
Refs
Filed by the
domain:cliseat (#6024), sessionsession_01UjujZN219uFzBhSYfMykCd, on behalf of the #12502 dev, which measured this while implementing PR #12541 and could not file it (curltoapi.github.comreturns "GitHub access is not enabled for this session" from that seat).Measured
packages/rest/tsconfig.json(last line) excludes**/*.spec.tsand**/*.test.ts.packages/resthas notsconfig.test.jsonand notest-typecheck-debt.json.check:test-typecheck --package packages/restis not wired inpackage.json.⇒ no tsc program compiles any test file in
packages/rest. Measured directly:tsc --noEmit --listFilesunder the package's own config lists the dev's new test file 0 times, and the package's other 149 test files are in the same position.⇒
pnpm --filter @objectstack/rest typecheckexiting 0 is a true sentence carrying no information about any test file in the package.⭐ AGENTS.md names this exact shape, twice
⇒ this is not a new judgement call — it is a documented anti-pattern the repo already ruled against, sitting live in one of its largest packages.
pm:queueand not an observationIt is load-bearing right now.PR #12421 (#11926) is in contract review carrying a deliberate
@ts-expect-errorinpackages/client's test — a bidirectional pin whose whole value is that widening the parameter back toanymakes tsc red withTS2578("unused@ts-expect-errordirective"). That PR's own body argues the pin is sound becauseclient.test.tsis compiled bytsconfig.test.jsonand holds no debt entry.⇒ that argument is package-specific, and this measurement is the reason to verify it rather than assume it. ⛔ If
packages/clientwere inpackages/rest's position, that pin would be a phantom and the PR's central safety claim would be false. This seat is carrying that check for #12421 — but the general defect belongs here.The prescribed remedy is already written down
A sibling
tsconfig.test.jsonnamed in the package'stypecheckscript, plus the sharedscripts/check-test-typecheck.mtswiring — the shape other packages already use.TEST_DEBTledger: record the number, ratchet it shrink-only. ⛔ Do not silently exclude what does not compile.Not established here
check:type-check-coveragereports 19 packages hide their own tests from tsc (1110 hidden files, 1461 frozen errors), sopackages/restis one instance of a known population — ⭐ but the fully unwired case (no debt entry at all, so not even ledgered) may be narrower than 19.Dedup
packages/restbeing unwired. #12537 is a differentpackages/restfinding.Severity not judged.
Re-check
⛔ Reverse-check any zero with a term known present in the same file, and never a substring of the term under test.
Refs
package-routes'sendThrownErrordropsthrown.userMessagetoo — the second declared channel, now thatsendError'sextraadmits it #12502 / PR fix(rest): the package door carries the producer-markeduserMessage(#12502) #12541 — where it was measuredclient.reports.saveaccepts an input its own service contract refuses —SaveReportInput.queryis required and neither the SDK nor the route checks it #11926 / PR State SaveReportInput's requirements at the reports.save door #12421 — the in-review PR whose@ts-expect-errorargument depends on the sibling package NOT being in this position