Commit a2d8cd2
fix(devx): stop the test-typecheck ledger regenerating a refuted cause over its own prose (#12809)
* fix(devx): stop the test-typecheck ledger regenerating a refuted cause
`LEDGER_COMMENT` named the #5478/#5543 OUTPUT-vs-INPUT conflation as the cause
of every ledgered error. PR #6786 fixed that on 2026-08-08; `packages/rest`'s
ledger was created 18 days later and stamped with it in the present tense.
Measured on 2026-08-27, both packages with a ledger that has entries:
rest — 0 `z.infer` occurrences across its ledgered files
spec — 8 across its 55 ledgered files, 5 of them inside prose comments;
of its 263 errors, 9 are of the missing-properties shape at all,
and none of those 9 sits in a file that contains a `z.infer`
So the clause is dropped rather than made per-package: the mechanism sentences
(EXACT ratchet, the three red directions, the regenerate command) are the part
that is true everywhere, and the comment now tells the reader to measure the
classes instead of handing them one.
The second half of the defect is that `--update` rebuilds `_comment` from the
constant, so a correction written into a ledger survives only until the next
`gen:test-typecheck-debt` — which the ratchet requires on every repair. That is
not hypothetical: `packages/client`'s `_comment` carries an appended AUTHORED
paragraph recording that ADR-0122 phase 2 (#6083) emptied its ledger, and the
next regeneration would have deleted it. The generated and authored halves are
now separate keys: `_comment` is regenerated and says so, `_note` is authored
and is preserved verbatim.
No ledger NUMBER moves: `entries` is byte-identical to its parent in all three
files (spec 55/263, rest 3/6, client 0/0), and spec's was rewritten by the real
regenerator, not by hand.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PfaSTikked61BkcsB5Rn69
* fix(devx): keep the new self-test off Object.hasOwn (root lib is ES2020)
`scripts/**` is inside the ROOT tsc program, whose `lib` is ES2020, so
`Object.hasOwn` is a TS2550 there and every use is a raw error the
check:type-check-debt ratchet counts. The file already spends one in
`evaluate()`; a second, added by the new `_note` pin, put the root program one
over. Measured single-file under the root config: 29 diagnostics at the parent
commit, 30 with `Object.hasOwn`, 29 with `in` — and the diagnostic SET is
identical to the parent, not merely the count.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PfaSTikked61BkcsB5Rn69
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 2a5c1cd commit a2d8cd2
4 files changed
Lines changed: 204 additions & 17 deletions
File tree
- packages
- client
- rest
- spec
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
0 commit comments