Repository navigation
ci: a release PR runs a fast release check instead of the heavy suites - #6524
Conversation
Edit accuracy: accurate 271 (base branch 271), smooth 170 of thoseThe gate passes. Quarantined, measured but not gated (0) Unstable (2)
|
There was a problem hiding this comment.
Verdict: APPROVE · 0 blocker · 2 important · 0 nits
No blocker: the merge queue still runs the full suite (merge_group → release_only=false), so this only trims the PR stage, and every required check is either kept or skips the way it does for a docs-only PR. The two important items are inline. All required checks pass on 23e9ec72. Fallow audit (not required) is red on classify, which this PR adds.
Scope
Read the whole diff. Ran release-only-diff.test.mjs (8/8 pass). Ran the script against the 0.8.207 release 619b8bc4d: release only, --verify exits 0. Against 0390f3f90 (docs): not release only. Against a diff that only touches the changelog: release_only=true, --verify exits 1. Checked the required contexts in rules/branches/main: Lambda and Safari aren't in the list and only run on path triggers. Every heavy job checks !cancelled() or result != 'success', so a failed detection still runs it.
| } | ||
| other.push(path); | ||
| } | ||
| return { releaseOnly: paths.length > 0 && other.length === 0, other, versions }; |
There was a problem hiding this comment.
important: if a PR touches only docs/changelog.mdx or a releases/*.md file, with no manifest bumped, this returns releaseOnly: true. That covers a weekly changelog:weekly --write digest, a changelog typo fix and an edit to old release notes. Release checks then runs --verify and fails with manifests move to different versions: none changed (I reproduced exit 1). It isn't a required check, but those PRs get a red check they can't fix. Requiring at least one bumped manifest fixes it:
| return { releaseOnly: paths.length > 0 && other.length === 0, other, versions }; | |
| return { releaseOnly: versions.size > 0 && other.length === 0, other, versions }; |
The empty-diff case is still false. Add a test that a changelog-only diff is not release-only.
What changed
A release PR (versions, release notes, changelog) ran the same heavy CI as a code change, because every
packages/*/package.jsonit bumps matchespackages/**.scripts/ci/release-only-diff.mjsnow reads the diff against the PR's current base and says release-only only when every changed file is a manifest (package.json,plugin.json,gemini-extension.json) whose only change isversion,releases/v*.mdordocs/changelog.mdx. A manifest that changes anything else, or any other file, makes it false, so a release PR that carries code, or is merely namedrelease/, keeps the full suite. Main, the merge queue and scheduled runs never take the shortcut.When true, the existing
code,cli,cli_bundle,skills,catalog_index,gcp_beginframe,studioandedit_accuracyoutputs in ci.yml, thechangesoutputs of regression, Windows render, preview-regression and player-perf, and newchangesjobs in player-safari and lambda-arm64-image read false (skipped checks pass, as for a docs-only PR). Kept: Build (packs the manifests, checks the packed-manifest budgets, keeps the release tarballs), Test reachability, the title and Codex plugin checks, and a newRelease checksjob runningrelease-only-diff.mjs --verify: every bumped manifest moves to one version,releases/v<version>.mdexists with no TODO or style note, and the changelog has the entry.What I measured
PR #6510 (0.8.207), runner minutes by workflow: CI 126, regression 92, Windows render 52, Safari perf 19, player perf 15, Lambda image 14, CodeQL 10, Docs 3, preview 2.5 (about 340 before the merge, critical path about 19 min: CI, Windows and Safari each finish at 19). A main push at the same base ran about 113 runner minutes (CI 65, Windows 41 when cancelled). After this change a release PR keeps Build 4.7, change detection about 2, reachability 0.5, the release check and the small checks: about 20 runner minutes, about 6 minutes of wall time. CodeQL and Docs still run.
scripts/ci/release-only-diff.test.mjs, 8 tests on the devbox: a real-git release diff is release-only and consistent; the same release plus one code file is not; a manifest with a changed dependency is not; a branch namedrelease/that carries code is judged by its files; an empty diff and an ordinary code PR are not;--verifyrefuses mixed versions, missing notes, an unreviewed TODO and a missing changelog entry; the workflow wiring is asserted.other.length === 0condition removed the test file fails (4 of 8 fail).--verifypasses. Against the commits before it: not release only.What I did NOT exercise
I did not run the workflows on GitHub: the first real check is the next release PR (its run should show the heavy jobs skipped and
Release checksgreen).check-edit-accuracy-filter.test.mjsneeds the full package tree and was not run; the filter itself is unchanged. Which jobs are required checks I did not read from branch protection; the skipped jobs behave as they do for a docs-only PR.No visible change
CI configuration only.