Filed unassigned by the dev seat implementing #10175 / #10496 (session session_01DdCnBGcHeufjrq7drTD3wt), which caused the shrinkage below. Recording rather than acting: editing a shrink-only ledger is a different act with its own verification surface, and the gate's own rule is that shrinkage must never be red.
Measured
scripts/check-type-check-coverage.mjs's TEST_DEBT entry for @objectstack/plugin-auth records errors: 109.
Measured with the package's own tsconfig.json with the "**/*.test.ts" exclusion lifted — the same program shape measureTestDebt builds — resolving workspace imports through each dependency's built dist/*.d.ts:
origin/main @ d5e7b9f5a1 109 raw tsc errors (reproduces the recorded 109 exactly)
PR #10614 head @ e1d011f55c 98 raw tsc errors (-11)
The 109 on main reproducing the ledger's recorded 109 is what makes the second number a measurement rather than a differently-shaped program.
Composition of the 11 that left, both from the same cause:
TS2339 8 -> 3 (-5) property does not exist
TS2493 42 -> 36 (-6) tuple index out of range
Cause: PR #10614 pinned two engine doubles to assertEngineUpdateDispatch, which meant giving const engineUpdate = vi.fn(async () => ({})) and const update = vi.fn(async () => ({})) real typed parameters. A zero-parameter mock has a zero-length parameter tuple, so every call site reading .mock.calls[0][1] was a TS2493 and every options?.where off it a TS2339. Typing the mock closed them.
Why it is worth a card at all
The gate's own header names this cost — THE SURPLUS (#6376):
the gap between a recorded number and a smaller measured one is a live PERMISSION ALLOWANCE.
11 new type errors can now be added to plugin-auth's test files without --re-measure reddening. That is not a defect in anything that shipped; it is bookkeeping that the shrink-only asymmetry deliberately defers, and deferring it is correct — the alternative is charging a toll on exactly the work the ledger exists to encourage.
The note on the entry is also now stale in its per-file split: it records 22 of the 109 in src/admin-import-users.test.ts and 18 in src/admin-user-endpoints.test.ts, and those are the two files that moved.
What a fix is
Re-tally the entry from tsc (not by subtracting 11 — the note's composition and per-file split have to be one measurement, which is the discipline the entry's own note describes for the last re-tally) and update errors plus the note. --re-measure needs the full workspace closure built.
⚠️ Not a graduation: 98 is not 0, so the entry stays and the typecheck script does not change.
Related
#10614 (the PR that caused the shrinkage) · #6376 (the surplus) · #5278 (why MEASURED exists) · #10489 (a different concern about the same re-measure — its serial runtime)
Generated by Claude Code
Filed unassigned by the dev seat implementing #10175 / #10496 (session
session_01DdCnBGcHeufjrq7drTD3wt), which caused the shrinkage below. Recording rather than acting: editing a shrink-only ledger is a different act with its own verification surface, and the gate's own rule is that shrinkage must never be red.Measured
scripts/check-type-check-coverage.mjs'sTEST_DEBTentry for@objectstack/plugin-authrecordserrors: 109.Measured with the package's own
tsconfig.jsonwith the"**/*.test.ts"exclusion lifted — the same program shapemeasureTestDebtbuilds — resolving workspace imports through each dependency's builtdist/*.d.ts:The
109on main reproducing the ledger's recorded109is what makes the second number a measurement rather than a differently-shaped program.Composition of the 11 that left, both from the same cause:
Cause: PR #10614 pinned two engine doubles to
assertEngineUpdateDispatch, which meant givingconst engineUpdate = vi.fn(async () => ({}))andconst update = vi.fn(async () => ({}))real typed parameters. A zero-parameter mock has a zero-length parameter tuple, so every call site reading.mock.calls[0][1]was a TS2493 and everyoptions?.whereoff it a TS2339. Typing the mock closed them.Why it is worth a card at all
The gate's own header names this cost —
THE SURPLUS (#6376):11 new type errors can now be added to
plugin-auth's test files without--re-measurereddening. That is not a defect in anything that shipped; it is bookkeeping that the shrink-only asymmetry deliberately defers, and deferring it is correct — the alternative is charging a toll on exactly the work the ledger exists to encourage.The note on the entry is also now stale in its per-file split: it records
22 of the 109insrc/admin-import-users.test.tsand18insrc/admin-user-endpoints.test.ts, and those are the two files that moved.What a fix is
Re-tally the entry from tsc (not by subtracting 11 — the note's composition and per-file split have to be one measurement, which is the discipline the entry's own note describes for the last re-tally) and update
errorsplus the note.--re-measureneeds the full workspace closure built.typecheckscript does not change.Related
#10614 (the PR that caused the shrinkage) · #6376 (the surplus) · #5278 (why MEASURED exists) · #10489 (a different concern about the same re-measure — its serial runtime)
Generated by Claude Code