tools: pin every published spec population with its matcher and its unit - #3504
Merged
Conversation
Closes #3503 Last pass found a population column counting comments: `sign` published as "63 uses in 48 specs" is one use in one spec, and that 63 had already become a recommendation. The obvious response is to re-count every figure this campaign has published. ALMOST NONE OF THE MOVEMENT WAS MISCOUNTING. figure published in code why cast_i8 uses 1079 1079 -- []T{} empty slice literals 478 478 -- abs( uses 389 389 -- x.len() 1322 1319 3 in comments x.len 687 680 7 in comments three-segment paths 477 473 4 in comments len(x) "142" 296 142 was a DIAGNOSTIC count pub const OP_* "20" 11 20 was a SITE count in the C [T] 220 220/228 depends on the primitive set THE TWO LARGE DISCREPANCIES ARE UNIT CONFLATIONS, not counting errors: a sentence about the specs quoting a number measured in the generated C. And `[T]` moves by 8 depending on whether `float` and `int` count as types -- a number that cannot be reproduced without its matcher is not a measurement. So the repair is not another re-count. This pins each figure WITH the regex that produced it and the UNIT it is in, re-derives them from the specs in code only, and `--check` exits 1 on drift -- the contract the census pin already has here: a change that moves a number must say so. IT CAUGHT ONE ON ITS FIRST RUN: test blocks 12 644 -> 12 456. The corpus moved and the reason is on the record -- #3482 deleted 188 duplicate blocks whose bodies were byte-identical to their twin, and 12 644 - 188 = 12 456. The pin followed the corpus rather than being blessed away. Wired into Spec Guards beside the duplicate-declaration ratchet, with the `paths:` filter extended so a change to the file triggers the workflow that reads it. Positive control recorded: with a deliberately wrong pin the gate exits 1 and names the drifting row; restored, 0. CENSUS RE-BLESSED IN THIS COMMIT, and the number is this change's own: `run: steps` 246 -> 248, the two steps added to Spec Guards -- the self-check and the `--check` gate. Nothing else moved. Corrections published: `x.len()` 1319 not 1322; `x.len` 680 not 687; three-segment paths 473 not 477; the `len(x)` spelling is 296 uses in 29 specs, not 142; `pub const OP_*` declarations are 11 in one spec, not 20. Full suite 3568 passed 0 failed. No codegen change: 0 stale seals. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
gHashTag
enabled auto-merge (squash)
September 8, 2026 14:28
Contributor
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tools: pin every published spec population with its matcher and its unit
Closes #3503
Last pass found a population column counting comments:
signpublishedas "63 uses in 48 specs" is one use in one spec, and that 63 had already
become a recommendation. The obvious response is to re-count every
figure this campaign has published. ALMOST NONE OF THE MOVEMENT WAS
MISCOUNTING.
figure published in code why
cast_i8 uses 1079 1079 --
[]T{} empty slice literals 478 478 --
abs( uses 389 389 --
x.len() 1322 1319 3 in comments
x.len 687 680 7 in comments
three-segment paths 477 473 4 in comments
len(x) "142" 296 142 was a DIAGNOSTIC count
pub const OP_* "20" 11 20 was a SITE count in the C
[T] 220 220/228 depends on the primitive set
THE TWO LARGE DISCREPANCIES ARE UNIT CONFLATIONS, not counting errors: a
sentence about the specs quoting a number measured in the generated C.
And
[T]moves by 8 depending on whetherfloatandintcount astypes -- a number that cannot be reproduced without its matcher is not a
measurement.
So the repair is not another re-count. This pins each figure WITH the
regex that produced it and the UNIT it is in, re-derives them from the
specs in code only, and
--checkexits 1 on drift -- the contract thecensus pin already has here: a change that moves a number must say so.
IT CAUGHT ONE ON ITS FIRST RUN: test blocks 12 644 -> 12 456. The corpus
moved and the reason is on the record -- #3482 deleted 188 duplicate
blocks whose bodies were byte-identical to their twin, and
12 644 - 188 = 12 456. The pin followed the corpus rather than being
blessed away.
Wired into Spec Guards beside the duplicate-declaration ratchet, with
the
paths:filter extended so a change to the file triggers theworkflow that reads it. Positive control recorded: with a deliberately
wrong pin the gate exits 1 and names the drifting row; restored, 0.
CENSUS RE-BLESSED IN THIS COMMIT, and the number is this change's own:
run: steps246 -> 248, the two steps added to Spec Guards -- theself-check and the
--checkgate. Nothing else moved.Corrections published:
x.len()1319 not 1322;x.len680 not 687;three-segment paths 473 not 477; the
len(x)spelling is 296 uses in 29specs, not 142;
pub const OP_*declarations are 11 in one spec, not 20.Full suite 3568 passed 0 failed. No codegen change: 0 stale seals.
🤖 Generated with Claude Code