Repository navigation
ci(changesets): check Changeset coverage on pull requests with the release classifier - #7195
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
AI review status for this pull request.
|
Contributor
PR Analysis Report
|
… ids by mention; wire lint; document
cixzhang
force-pushed
the
ci/pr-changeset-coverage
branch
from
October 8, 2026 23:07
bf27630 to
b3dfcca
Compare
Contributor
There was a problem hiding this comment.
Approving. The gate catches exactly the gaps it was built for and nothing else in the recent history.
- Replayed the classifier on the real merge commits with
--released v0.6.6: #7125 fails for@astryxdesign/clishipped documentation with thepnpm changeset:new --packages @astryxdesign/cli --category docsrepair; #7154 and #6874 fail for the removed doctor check idthemeswith the[breaking]/Compatibility:options; #7179 (restored), #7155, #7175, #7182, #7188 and today's five core fixes all pass. The last 60 first-parent merges onmaingive 55 passes and those same 5 failures — no false positive among stories, tests, Lab, docsite, CI and spec-only changes. Four open heads (#7183, #7199, #6885, #6963) pass too. release --since v0.6.6 --until origin/mainreports the same two uncovered merges (#7134, #7141) the pull-request mode flags, so the two modes agree; currentmainhas no released CLI JSON id missing against v0.6.6.- README guard:
--checkpasses at this head, and removing the DEP-0006 marker from thelayoutrow fails it (exit 1), which is the #7175 regression a merge dropped earlier today. - Tests: the 19 release/changeset/scope files pass (427 tests). The messages name the package or id, the rule, and the exact command or note.
- Authority: FR43 already assigns pull-request CI the docs and package-files checks against latest stable with named repairs, so I read the Rule 1 scope as consistent with FR7 — a doc asset in a package's tarball is that package's shipped surface, not "documentation-only". A one-line FR7 clarification ("documentation-only" = repository documentation outside any tarball) would remove the ambiguity; a spec follow-up, not a block here.
[Automated review]
This branch was successfully deployed
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.
Primary intent
Add one pull-request check that fails a change shipping to consumers without a Changeset naming the package, using the same classifier the release coverage audit runs. This is CI with a policy edge (what counts as shipped), so neither
maintenance.mdnor a product template fits exactly.User or maintainer impact
@astryxdesign/cliand are read throughastryx docs, and added no Changeset. The release audit treated anything under/docs/as exempt, so nothing caught it until a fix-up Changeset landed in #7171. #7134 and #7141 did the same thing and still have no Changeset.--json. #7154 added a[fix]Changeset saying "astryx doctor'sthemescheck is nowtheme-management". That is a rename of a released doctor check id, filed as a patch. #7179 later restored the id. Nothing mechanical caught the rename.Problem and solution fit
/docs/and.mdeverywhere, including docs that ship inside a package. It also had no notion of released JSON ids.Change, one primary delta plus supporting pieces:
scripts/release/changeset-coverage.mjs, run on every pull request by the requiredlintjob.Rule 1, coverage. A changed path ships when its package is in the stable cut and the path lands in the npm tarball:
isStableReleasePackage;files, the root README, or consumer-facingpackage.jsonfields.That covers
packages/*/src, CLIapi/clients/foundation/authoring/assets(includingassets/docs), and*.doc.mjs. A path is judged on both sides of the change, so a deleted shipped file counts, and a package leaving the stable cut in the same change cannot exempt its own edits. A shipped path needs a Changeset that the change adds or edits and that names the package.These are exempt:
change-scoperule, plus*.spec.tsbrowser tests);lab,charts,richtext,vega, Storybook, sandbox);Rule 2, released CLI JSON ids. It compares the latest
vX.Y.Ztag with head for responsetypevalues, response typedef fields (composed typedefs resolved), golden JSON field paths, and doctor check ids. A missing id is this pull request's to classify when either:Ids are named by full identity (
themes,DoctorCheck.fix,docs.list.data[].topic), never by a bare field name that unrelated fields share. It clears with a[breaking]Changeset naming the id or aCompatibility:paragraph naming it. Catalog values (template slugs, docs routes, theme slugs) are not compared (FR9, FR11, FR45), so docs: split Layout into a namespace with five focused guides #7125's docs-route rename in the golden is not flagged.releasemode. It walks a release range commit by commit through the sameevaluateChange, so PR and release answers agree by construction. A fix-up Changeset that names the package and cites#Ncovers that pull request, matching the release process's fix-up step.isStableReleasePackagefromactive-release.mjs;isPackageReleasePathfromchange-scope.cjs;parseWorkspaceGlobsfromworkspace-globs.mjs.lintjob also runsnode packages/cli/scripts/generate-cli-readme.mjs --checkon the merge result. The CLI README's generated tables ship in@astryxdesign/cli, and a merge from main can silently drop a generated row, such as the DEP-0006 marker #7175 added to thelayoutcommand. A workflow test pins both steps.Authority
spec:AST-017FR43: pull-request CI compares latest stable to head to find released victims, and base to head to attribute deltas; failures name the victim and the repair. FR3/FR13 make CLI machine schemas contractual. FR2 excludes never-released surfaces. FR7 exempts fixed-group co-bumps.Change and evidence
Replayed against the real merge commits (
pr --base <sha>^ --head <sha> --released v0.6.6):@astryxdesign/cliships shipped documentation without a Changeset →pnpm changeset:new --packages @astryxdesign/cli --category docsthemesis in the released v0.6.6 JSON contract and missing →[breaking]namingthemes, or aCompatibility:notethemes)themes)The last 150 commits on
maingive 143 passes and 7 failures. Every failure is a real shipped change with no Changeset naming the package: #7125, #7134, #7141, #6832 (CLI token docs changed under a core-only Changeset), #6942 (translations shipped in@astryxdesign/core/locales), #7154, and #6874.release --since v0.6.6 --until origin/mainreports #7134 and #7141; #7125 counts as covered by #7171's fix-up. Currentmainhas no released CLI JSON id missing against v0.6.6.Expected follow-on: a translation-sync pull request now needs a
@astryxdesign/coreChangeset (translations are user-visible), and a change to CLI docs needs@astryxdesign/clinamed even when the main change is elsewhere.Scope
Testing
pnpm exec vitest run scripts/release .github/scripts/change-scope.test.mjs scripts/check-changesets.test.mjs scripts/release-admission.test.mjs scripts/lib: 19 files pass, including 58 new tests, with red arms for the docs: split Layout into a namespace with five focused guides #7125 and [CLI] Name the theme package on import and teach import in the theme list #7154 shapes and their passing repairs.node scripts/release/changeset-coverage.mjs pr --base origin/main: this PR ships nothing to consumers and passes its own check.pnpm check:repo(pre-commit) passes.generate-cli-readme.mjs --checkpasses at this head; dropping the DEP-0006 marker from thelayoutrow fails it (exit 1, "README generated tables are out of date").