chore(guardrail): re-sync canon, id no longer moves with the calendar - #22
Merged
Merged
Conversation
compute_canon_id now excludes the payload's `Emitted <date>` line from the digest. The emitter stamps today's date, so while that line was hashed the canon id was a function of the calendar: re-emitting with no vocabulary change moved the id, every vendored copy read as out of date, and the daily fan-out asked for one pull request per repo changing a date and nothing else. canon id: 785922bbdc3f -> ff28e99a952b (public redacted variant). check.py gains a two-way self-test assertion: re-dating the payload must NOT move the id, and appending any other line MUST. An exclusion that is too wide is as dangerous as a missing one, so `_EMITTED_LINE` is anchored to a bare ISO date rather than to `^Emitted`. Verified in this checkout: check.py --self-test exit 0, 15 entries both ways, 8 specimens check.py exit 0 scanned 68 files, 292206 bytes, 447 spans, 3 rules canon holds: 0 failing findings, 0 warnings, 0 graced CANON_ID = ff28e99a952b7912... len(DEFINITIONS) = 0 profile.py is untouched. It is hand-written per repo and never travels.
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.
Routine vendored-guardrail re-sync. Two files moved, both of them travelling
files that are identical in every repo of this class:
canon_payload.pyandcheck.py.What moved
compute_canon_idnow excludes the payload'sEmitted <date>line from thedigest, alongside the
CANON_IDline it already excluded.Why
The emitter stamps today's date into the payload, so while that line was
hashed the canon id was a function of the calendar, not of the vocabulary.
Re-emitting with no vocabulary change at all moved the id; every vendored copy
then read as out of date; and the daily fan-out asked for one pull request per
product repo that would have changed a date and nothing else. Measured on
2026-09-15, the canonical payload and forge-cli's vendored copy differed in
that line alone, and in the id it forced.
The id now answers "is this the same vocabulary", which is the only question
anyone asks it.
The exclusion is deliberately narrow.
_EMITTED_LINEis anchored to a bareISO date (
^Emitted \d{4}-\d{2}-\d{2}\.$), not to^Emitted, because a lineexcluded from the digest is a line nobody checks:
Emitted 2026-09-15. FooBrand is fine now.does not match the pattern and is still hashed.check.py --self-testgains an assertion in both directions, since anexclusion that is too wide is as dangerous as a missing one: re-dating the
payload must not move the id, and appending any other line must.
Verified in this checkout
check.py --self-testcheck.pyscanned 68 files, 292206 bytes, 447 spans, 3 rulescanon holds: 0 failing findings, 0 warning(s), 0 graced.CANON_IDff28e99a952b791210cf743af8eecb3117f5cdd51f0f92710061b72dd8ff0330— the public redacted variant, as expected for this repolen(DEFINITIONS)The scan reports
0 of 10 approved names presentunder canon coverage. That isexpected for an SDK repo whose prose does not name the product surface; it is
coverage information, not a finding, and the scan exits 0.
Not touched
tools/product_guardrail/profile.pyis untouched, andgit statuswaschecked for it explicitly before committing. It is hand-written per repo — what
to scan, what to skip, the grace list — and it never travels. The diff is two
files, both generated upstream.
Not merging from here; this is for review in the usual place.