Commit 56d3ab6
committed
fix(pm): stop check-widening-tells reading the retirement ledger's own rows as an accept-set gain
T2 is "the accept set gains a VALUE", and the ADR-0087 retirement ledger is a
list of values written BECAUSE an accept set shrank. Every retirement adds rows
to `RETIRED_KEYS_BY_MAJOR` / `RETIRED_DEFS_BY_MAJOR` and to a step's
`conversionIds`, so the mechanical clause-② axis read adverse on the one change
class whose direction is unambiguously narrowing: PR #17298 exits 4 with three
T2 rows against a declaration that is correct.
The repair is a LICENCE, minted only by an added line on one of two declared
input surfaces and checked by exact string identity:
- `export const entry = '<row>';` under `packages/spec/src/migrations/entries/**`
— the generator's own per-entry input (#7297), the exact string
`gen:migration-registry` emits into the table; and
- `id: '<id>',` added to `packages/spec/src/conversions/registry.ts` — the D2
registration a hand-maintained `conversionIds` row refers to.
Neither a region nor a file is excluded. One of PR #17298's three rows sits in
the hand-maintained `conversionIds` array, outside every `<os-generated …>`
marker, so a position-keyed predicate covers two rows of three. A lookup in the
local tree was measured and is wrong rather than merely expensive: a retirement
registers its conversion in the same PR, so `view-page-mount-removed` reads 0
occurrences in any checkout of main against a positive control reading 1.
The licence is read AFTER #16943's replacement budget, so a block that removes a
member and adds both a tombstone and a genuine member still reports the genuine
one. Self-test 218 -> 245 cases, 27 of them a new battery whose firing half
comes first: the same row with no licence, a licence for a neighbouring row, a
licence spent on the wrong file, a genuine member beside a licensed one, and the
ordering against the budget.
Claude-Session: https://claude.ai/code/session_01YKEjmbYNvYWJvWGSWx26zK
Co-authored-by: Claude <noreply@anthropic.com>1 parent 65ad77d commit 56d3ab6
1 file changed
Lines changed: 257 additions & 4 deletions
0 commit comments