Skip to content

ci(hygiene): stop copying the gate's scan surface into the workflow comment - #1336

Merged
os-trump merged 1 commit into
mainfrom
claude/issue-1238-hygiene-step-comment
Aug 26, 2026
Merged

ci(hygiene): stop copying the gate's scan surface into the workflow comment#1336
os-trump merged 1 commit into
mainfrom
claude/issue-1238-hygiene-step-comment

Conversation

@os-trump

Copy link
Copy Markdown
Collaborator

Fixes #1238

The comment above the source-hygiene step in .github/workflows/code-quality.yml listed the trees the gate scans. That list is a hand-maintained copy of the surface constants in scripts/check-source-hygiene.mjs, and it has now gone stale three times: #818 added content/ and .changeset/, #1235 added docs/, .github/, .claude/ and the root-file whitelist, and #1313 folded root .ts files 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):

      # Replaces three inline greps that scanned `packages/` — a directory this
      # repo does not have — each with `continue-on-error: true`. The script
      # scans the real tree (src, test, e2e, scripts) and fails on a hit; it
      # also fails loudly if a scanned directory ever disappears, so the check
      # can never silently go vacuous again.

After:

      # Replaces three inline greps that scanned `packages/` — a directory this
      # repo does not have — each with `continue-on-error: true`. The script
      # scans this repo's first-party files and fails on a hit; it also fails
      # loudly, each guard with its own message, when a directory or a root
      # file it is told to scan has gone missing, so the check can never
      # silently go vacuous again. It prints the surface it actually reads on
      # every run — read that banner; every copy of it kept here has gone stale.

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 the continue-on-error repair, 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:

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 at 0a1d035:

Source hygiene — 339 files under src, test, e2e, scripts, plus 3 root .ts file(s) in the marker and header checks; the control-byte scan adds 345 under content, .changeset, docs, .github, .claude and 16 root file(s)

(On origin/main @ d456ea3, before this branch's changeset file existed, the same banner read 344 rather than 345 for 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:

os-verify-lock: VERDICT command-exit 0 · held the lock 167s (2m47s) · waited 0s

with, from that run:

✓ i18n lint gate: 0 `i18n/missing-*` issues (55 total lint issue(s) reported, unaffected by this gate)
✓ source hygiene clean
✓ source token ratchet clean
 Test Files  142 passed (142)
      Tests  2997 passed | 1 skipped (2998)

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 walks src/ only.

Changeset: empty-frontmatter, the sanctioned "releases nothing" declaration that .github/workflows/changeset-check.yml documents. This PR is a CI comment plus that changeset; nothing in src/ changed, so nothing ships to users.

Out of scope, verified rather than assumed


Generated by Claude Code

…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
@vercel

vercel Bot commented Aug 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
hotcrm Ignored Ignored Aug 26, 2026 9:17am

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/cd CI plumbing and the verification pipeline

Projects

None yet

2 participants