ci(hygiene): stop copying the gate's scan surface into the workflow comment - #1336
Merged
Merged
Conversation
…omment The comment above the source-hygiene step listed the trees the script reads. That list is a hand-maintained copy of the script's own surface constants and it has gone stale three times (#818, #1235, #1313). The step name one line up had the same defect, and the removal-not-retype route was the one taken there in #1139; this does the same thing one line down. What stays is the durable half — why the step exists at all, in place of three `continue-on-error` greps over a `packages/` tree this repo does not have — plus a pointer to the banner the script prints on every run, which is the one description of the surface that cannot go stale. The missing-surface sentence is generalised in the same move: the script has two such guards, one for a scanned directory and one for a scanned root file, each failing with its own message, and the comment described only the first. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016ED4cusQ7pxZ7d7TCLKrZb
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
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.
Fixes #1238
The comment above the source-hygiene step in
.github/workflows/code-quality.ymllisted the trees the gate scans. That list is a hand-maintained copy of the surface constants inscripts/check-source-hygiene.mjs, and it has now gone stale three times: #818 addedcontent/and.changeset/, #1235 addeddocs/,.github/,.claude/and the root-file whitelist, and #1313 folded root.tsfiles into the marker and header checks. The step name one line up had the same defect, and the route taken there in #1139 was removal rather than re-typing. This does the same thing one line down.What changed
Before (lines 40-44):
After:
Everything that remains is true independently of what the gate currently scans, which is the property the enumeration lacked — it stays true across the next surface change without anyone re-measuring. The durable half is kept verbatim: the
packages/history and thecontinue-on-errorrepair, i.e. why the step exists.The second sentence had drifted too
"fails loudly if a scanned directory ever disappears" described one guard. The script has two, each with its own message:
scripts/check-source-hygiene.mjs:649—✗ source hygiene: scanned director(y|ies) missing: ...(coversSCANNEDandTEXT_SCANNED)scripts/check-source-hygiene.mjs:666—✗ source hygiene: scanned root file(s) missing: ..., whose follow-up line namesROOT_TEXT_FILES(arrived with fix(hygiene): widen the control-byte scan to docs/, .github/, .claude/ and the root first-class files #1235)The replacement covers both without naming either constant: "a directory or a root file it is told to scan", "each guard with its own message".
Reading taken from the gate's own banner
The card's quoted figures (
310 files … 593 under content, .changeset, docs, .github, .claude and 16 root file(s)) predate #1313 and are stale; they are deliberately not reused. What the gate printed on this branch at0a1d035:(On
origin/main@d456ea3, before this branch's changeset file existed, the same banner read344rather than345for the control-byte extras —.changeset/is inside that surface, so adding one file to it moves the count by one.)This reading is recorded for one reason: the #1315 family is concurrently rewriting a sentence describing this same scanned surface in
scripts/check-source-hygiene.mjs. Those two PRs touch disjoint files, so git will not flag anything, and no gate compares two prose descriptions of one surface. Note that this PR copies the reading into no shipped file — the new comment names no trees at all, which is exactly why it cannot come to disagree with that sibling PR, whatever it lands.Verification
pnpm verify(validate, typecheck, lint, lint:i18n-gate, hygiene, hygiene:tokens, build, test) run under the shared verify lock on this branch's tree:with, from that run:
Both ratchet-family gates re-run on the final commit
0a1d035:✓ source hygiene clean,✓ source token ratchet clean. The token ratchet does not measure this file in any case — it walkssrc/only.Changeset: empty-frontmatter, the sanctioned "releases nothing" declaration that
.github/workflows/changeset-check.ymldocuments. This PR is a CI comment plus that changeset; nothing insrc/changed, so nothing ships to users.Out of scope, verified rather than assumed
.github/workflows/ci.yml— its hygiene step (lines 40-41) still carries no descriptive comment, so it needs no equivalent change and got none.scripts/check-source-hygiene.mjs— untouched. It was run for the banner; the two guard messages above were read, not edited.Generated by Claude Code