Commit d7c4240
feat(gate): enumerate check:engine-double-contract's pinned population so a lost pin names itself (#9712)
* feat(gate): enumerate check:engine-double-contract's pinned population so a lost pin names itself
The gate pinned 319 engine doubles and reported that count as a printed
integer nobody compared. Deleting a pinned double's whole `delete()` member
took it to 318 with the gate green (exit 0), because discovery requires the
member to exist: a double that stops declaring one simply leaves the
population. DISCOVERED fires at zero, never at one-fewer-than-yesterday.
Adds a fifth invariant, RETAINED, over a generated ledger of the pinned
(file, verb, count) rows. The four existing checks are untouched. A lost pin
is classified into four worlds — file deleted, verb gone, members deleted,
double unguarded — so a legitimate decrease and the defect get different
messages and different remedies.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XqDQYVU5smx29ts9pAErja
* docs(gate): re-measure the pinned-set churn over the full commit population
The shipped comment justified this ratchet with "the 269 commits on `main` in
the month to 2026-08-18 ... changed in 7 commits (2.6%) ... zero left". 269 was
the depth of the shallow clone the measuring agent ran in, not the month's
traffic (#9878).
A denominator swap would not have been honest: the numerator was computed over
the same 269 visible commits, so `7/3,110` would have replaced one unverified
number with another inside the comment whose whole job is to justify a
merge-blocking gate. Re-measured instead, over the full population.
Method (stated in the comment so it can be redone): membership is proxied by
`assertEngine…Dispatch(` call sites in test files under the scan roots,
calibrated against this gate's own ledger at HEAD — 0 false negatives on the
file sets, 309 of 310 (file, verb) rows agreeing on the exact count.
Over 3,103 first-parent commits (2026-07-18..2026-08-18):
delete changed in 111 commits (3.6%) 162 entered 1 left
update changed in 103 commits (3.3%) 160 entered 1 left
The rate is HIGHER than the sample reported, which is the direction swapping
only the denominator would have hidden. The single departure per verb is one
commit, f16e54e, that DELETED a test file and added a replacement carrying
both pins in the same commit — repo-wide coverage never dropped. Zero instances
of the shape this ratchet catches (file present, verb gone), and zero per-file
counts that shrank without reaching zero.
Also corrects "308 entries today" to 310 in the same paragraph, which the
merge's ledger regeneration moved.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XqDQYVU5smx29ts9pAErja
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 05864fb commit d7c4240
2 files changed
Lines changed: 2089 additions & 8 deletions
0 commit comments