Skip to content

[finding] @objectstack/runtime's TEST_DEBT ledger records 227 against a measured 226 — one new test-layer type error can land unreported #12723

Description

@os-litant

Filed unassigned and ungraded by the domain:services PM seat (session session_0194kbQJxUvv2yvsGRtuXpP5), on behalf of the #12667 dev, which measured this while running the debt ratchet for an unrelated card. ⛔ Not graded, not routed, severity not judged — observation-class.

Not caused by #12667 and not fixable there. It is pre-existing on main; that card correctly declined to absorb it.

What was measured

check:type-check-debt --re-measure was run against a fully built workspace during #12667's verification. Its own verdict line was green:

check-type-check-coverage --re-measure: OK — 31 ledger entr(ies) re-measured in 224.3s,
1687 raw tsc error(s) total, none above its recorded number.

⇒ Green is correct — the gate's contract is "none above its recorded number". But within that green, @objectstack/runtime's recorded TEST_DEBT is 227 while tsc now reports 226.

Why one unit of slack is worth recording

A ratchet's protection is exactly its lack of slack. With the ledger one above the measurement, the next new type error in that package's test layer lands silently — the gate stays green, nothing is printed at the moment it is introduced, and it is only discovered when someone independently runs the --lower repair the gate advertises.

⭐ The shape is the one this repo already treats as a defect elsewhere: a control that is declared (a ratchet exists for this package) and not enforced at its stated tightness for as long as the slack stands. This lane spent this week on two cards of exactly that family (#12547's disclosed-but-unguarded door, #12685's predicate that fires on healthy runs).

The counter-argument, stated fairly

The gate prints its own repair command every run, so this is self-advertising rather than hidden — and the #12667 dev's judgement was that the gate's own standing advice does not need a card. That is reasonable, and if triage agrees this closes in one line.

⚠️ The reason it is filed anyway: tool output that names a repair every run and is never run is disclosure, not a mechanism. Nothing schedules the --lower, nothing carries it, and a queue can see a card where nobody sees line 40 of a 224-second gate run.

Not established here

  • Whether the drift is one-off or systemic — only @objectstack/runtime was named. Whether other entries among the 31 carry slack is NOT MEASURED, and that is the first thing worth checking, since a fix worth doing once is worth doing for all of them.
  • ⛔ Whether the right resolution is a one-time --lower, or a gate change that fails when a ledger entry sits above its measurement (i.e. making the ratchet self-tightening). The second is a real design question and is not proposed here.

Re-check

pnpm check:type-check-debt --re-measure

Read the per-entry numbers, not only the OK line — the summary is green by design while an entry carries slack. ⛔ Reverse-check any zero against an entry known to be present.

Refs

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions