Uh oh!
There was an error while loading. Please reload this page.
fix(ci): changeset-guard.yml now exercises its own PR - #6398
Merged
Conversation
The gate's `paths:` filter was `.changeset/**` alone, so it was one of two exceptions to the repo's 5-of-7 self-inclusion convention for path-filtered gates: a PR editing the gate's own YAML or the script it runs (`scripts/check-changeset-no-major.mjs`) never triggered the gate itself — the first real run landed on someone else's unrelated `.changeset/**` PR. Add the workflow's own path and the invoked script to both the `pull_request` and `push` `paths:` lists, matching the majority pattern set by `node-esm-load-gate.yml`, `published-dist-gate.yml` and `spec-range-floors.yml` (own YAML + the script the `run:` step executes). Deliberately NOT added: `scripts/invoked-as.mjs` (a 40+-importer shared utility that those same three gates import without listing — only `half-state-patrol.yml` lists it, as a documented one-off) and `scripts/__tests__/check-changeset-no-major.test.ts` (already covered by the root vitest suite on any PR touching `scripts/**`, the same `~ partial` reasoning `published-dist-gate.yml`/`spec-range-floors.yml` apply to their own gate scripts' `__tests__` files). Both calls are recorded in the workflow's own header comment. `content/docs/guide/ci-cd-pipeline.md` updated to match: the inventory table row, the path-filter bullet, the "contexts that can never be required" structural claim (pinned verbatim by `scripts/__tests__/ci-cd-pipeline-doc.test.ts`), and the dedicated Changeset Guard section. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012CZgmFFzqA9cX8tBMhvpFe
os-warren
marked this pull request as ready for review
August 25, 2026 20:15
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Aug 25, 2026
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 freeto 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#6321
Conclusion: oversight, not deliberate
changeset-guard.yml'spaths:filter was.changeset/**alone, on both itspull_requestandpushtriggers. Nothing in the file, its history, or the linked cards (#6245 / PR #6315) recorded a reason for excluding the gate's own YAML or the script its one step runs. Measured against the repo's other six path-filtered workflows, 5 of 7 self-include;changeset-guard.ymlandperformance-budget.yml(closed in #6315) were the two exceptions. No defensible reason was found in the file forchangeset-guard.ymlto be the third — this is the oversight branch.Filter — before / after
Before (
pull_requestandpush, identical):After (both triggers):
The
~ partialjudgementTwo things were deliberately not added, and the reasoning is recorded in the workflow's own header comment (not just this PR body):
scripts/invoked-as.mjs(the gate script's one import) — this repo's majority pattern for a self-including, script-running gate is "list what therun:step executes" (own YAML + the invoked script), not the transitive import graph.node-esm-load-gate.yml,published-dist-gate.ymlandspec-range-floors.ymlall import this exact same shared helper (isEntrypoint, 40+ importers underscripts/) and none of them lists it. Onlyhalf-state-patrol.ymldoes, and its own header names that as a specific, documented one-off tied to its objectstack port (Install the parameterised half-state patrol (sweeper + workflow pair from objectstack PR #11294) #5791/divergence 2), not a general convention. Adding it here would makechangeset-guard.ymlthe outlier relative to the other three comparable gates, not the convention-follower.scripts/__tests__/check-changeset-no-major.test.ts— this matches the looser~ partialpatternpublished-dist-gate.ymlandspec-range-floors.ymlalready set for their own gate scripts'__tests__files, not the stricter closure pattern. Verified directly: the file lives underscripts/**, whichci.yml/lint.yml'sDecide whether this change needs a full runstep does not exclude (only**/*.mdand.changeset/**are excluded), so any PR touching the script or its test already gets a real run of the root vitest suite that executes it — the same reasoning the two~ partialrows rely on. Confirmed both files run underscripts/**/*.test.tsinvitest.config.mts's root project.So
changeset-guard.ymlnow matches the~ partialpattern (own YAML + invoked script, not the full transitive closure), same tier aspublished-dist-gate.yml/spec-range-floors.yml.Self-coverage confirmed on this PR — READ, not reasoned about
This PR's diff includes
.github/workflows/changeset-guard.ymlitself. Pulled the check list viaget_check_runsafter pushing:The gate is present and running on this PR, which is exactly the self-coverage #6321 asked for. (PR #6315 asserted this same thing and turned out wrong because a
paths:filter excluded it — this time the check list was actually read.)Docs updated to match
content/docs/guide/ci-cd-pipeline.md:changeset-guard.yml.scripts/__tests__/ci-cd-pipeline-doc.test.ts(STRUCTURAL_BLOCKS['changeset-guard.yml'].quotes()reads the livepaths:values out of the YAML and requires the doc line to quote all of them); updated and reverified green.### Changeset Guardsection.No conflict with PR #6389 (
content/docs/guide/ci-cd-pipeline.md) was hit — my worktree was created after #6389 already landed onmain(commitb362c1b47), so this branches from the current file, not a stale copy.Out of scope (per the triage ruling)
The 22 workflows with no
paths:filter at all — they report on every PR, so this gap cannot arise for them.Tests run
pnpm exec vitest run scripts/__tests__/check-changeset-no-major.test.ts scripts/__tests__/check-changeset-presence.test.ts scripts/__tests__/ci-cd-pipeline-doc.test.ts scripts/__tests__/check-pre-install-import-graph.test.ts→ 112 passed, including the pinned regex incheck-changeset-no-major.test.ts(.changeset/**still the firstpaths:entry) and everySTRUCTURAL_BLOCKS['changeset-guard.yml']assertion inci-cd-pipeline-doc.test.ts.node scripts/check-changeset-no-major.mjs→ ✅ nomajorbump declared.node scripts/check-changeset-presence.mjs→ ✅ (this change touches no published packagesrc/; changeset added anyway per dispatch).node scripts/check-doc-links.mjs→ ✅ links valid across 17 scan roots.node scripts/check-control-bytes.mjs→ ✅.node scripts/check-entry-guard.mjs→ ✅ (unaffected, ran as a cheap sanity check sincescripts/**was touched).changeset-guard.ymlwithyaml.parseto confirm bothpull_request.pathsandpush.pathsare syntactically valid and contain the three expected entries.get_check_runson this PR (see above) — Changeset Bump Policy present and running.Changeset
.changeset/6321-changeset-guard-self-coverage.md— internal CI/docs-only change, no published package touched.Generated by Claude Code