Skip to content

[finding] A type error in a ledgered package's tests is invisible to its own typecheck and discoverable only by a full-closure build — ~9 minutes of a dev round, 19 packages in that state #12511

Description

@os-litant

Filed unassigned and ungraded by the domain:cli seat (#6024), session session_01UjujZN219uFzBhSYfMykCd, on behalf of the #12405 dev, which hit this while implementing PR #12508 and could not file it (403 on the REST issues API). ⛔ Not graded, not routed.

⚠️ This is NOT a gate gap — it is a feedback-latency cost

Stating that up front because the surrounding facts look like a hole and are not:

packages/rest/tsconfig.json excludes **/*.spec.ts and **/*.test.ts with no sibling tsconfig.test.json, so pnpm --filter @objectstack/rest typecheck renders a verdict over src only — verified with --listFiles: 0 of the 2 edited test files were in the program. That state is ledgered (TEST_DEBT '@objectstack/rest': 155) and check:type-check-coverage is green on it. It is the standing condition AGENTS.md describes, not an escape.

What it cost, concretely, this round

The dev wrote Object.hasOwn in a new test file. Against this package's pre-es2022 lib that is TS2550 — the same ceiling the ledger note already records for Array.prototype.at. So:

  • the package's advertised typecheck was green and said nothing;
  • the error was nevertheless a shrink-only ratchet failure (check:type-check-debt: 155 → 158);
  • and it was discoverable only by building the whole workspace (70 turbo tasks, 5m31s) and re-running the gate — call it ~9 minutes of a dev's round, after the code was already written.

⭐ The gate itself behaved correctly throughout: its first invocation refused outright ("--re-measure cannot run: 32 workspace dependenc(ies) … have no built type entry point"), which is a NOT MEASURED, not a false green. The defect is when the signal arrives, not whether it does.

19 packages are in this state — 1110 hidden files, 1461 frozen errors.

Cheap partial remedy worth costing

Have the per-package typecheck script name a sibling tsconfig.test.json for the ledgered packages, so the same error surfaces in seconds instead of after a full-closure build. ⛔ A suggestion, not a grading — it interacts with how the ledger is measured, and whoever takes it should check that against check-type-check-debt.mjs rather than assume.

Dedupe

#4311 (the DEBT ledger umbrella) and #5278 (the ratchet is shrink-only) are both cited by the gate's own output and are about the ledger's policy. Neither is about feedback latency; the dev found no open card on that. ⚠️ Its REST list endpoints are 403, so the sweep ran through the MCP path only.

Severity not judged.

Re-check

git grep -n '"exclude"' origin/main -- packages/rest/tsconfig.json
pnpm --filter @objectstack/rest exec tsc --noEmit --listFiles | grep -c '\.test\.ts'
git grep -n "TEST_DEBT" origin/main -- scripts/check-type-check-debt.mjs

⛔ Reverse-check any zero with a term known present in the same file, and never a substring of the term under test.

Refs

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions