Repository navigation
RR-57: CI diet (fewer redundant jobs per PR) - #435
Merged
Merged
Conversation
Keep the runner pool from saturating (120+ concurrent Linux jobs, queue p90 about 45 minutes on 2026-10-06): run the expensive legs where they pay (merge queue, push to main for repositories without a queue, weekly schedule), not on every pull request, and let the label `full-ci` opt a pull request back in. Every job now has a timeout-minutes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: db7e40da-af83-4487-990d-eb0b97097a34) |
# Conflicts: # AGENTS.md
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 66ef45a3-c30c-4216-813a-d740d36d2e91) |
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.
Why
On 2026-10-06 between 19:00 and 21:00Z more than 120 Linux jobs ran at once and the queue p90 wait was about 45 minutes (max 69, longer than the merge queue's 60-minute timeout). Each opf PR runs 11 to 12 jobs and 15% of opf jobs are cancelled after partial work. This PR removes work that repeats a SHA or that nobody needs on every PR push, and keeps the merge queue run and the release train fully covered.
What changes
OPF CIandCoordinated public packages. The merge queue fast-forwards main to the exact commit itsmerge_grouprun tested, so the push run repeated every job on the same SHA.workflow_dispatchstays, and so does the nightlyscheduleofCoordinated public packages(itsmain-statusjob now reports on the nightly run only).OPF CIinto.github/workflows/engines-range.yml(same job name,Node 22 (engines range)andNode 26 (engines range)). They run in the merge queue, onworkflow_dispatchand on a PR with the labelfull-ci. A PR runsVerify OPF packages(Linux, Node 24) only.paths:is ignored formerge_group, so a firstscopejob applies it through the new.github/actions/paths-changedaction), on the weekly schedule and manual runs, and on a PR with the labelfull-ci.Installed candidates (windows-latest|macos-latest)already took no Windows or macOS runner on a PR (RR-45). It now also honoursfull-cinext toecosystem-full. Becausepackagesis a required aggregator, this workflow does not get thelabeledevent type: the label takes effect on the next push or a re-run.timeout-minuteson every job (the four missing ones:Verify OPF packages20,Node N (engines range)20,npm-publishpublish and release 15;CLI portabilityraised 15 to 25 because Windows p90 is 13.4 min).pnpm check:ci-dietfails when a job has none.full-cifor the legs moved offpull_request. It uses thelabeledevent type andif: contains(github.event.pull_request.labels.*.name, 'full-ci'), so it works without a re-push. Any other label starts nothing and sits in its own concurrency group, so it cancels nothing. One line inAGENTS.md: add the label when a change touches OS- or Node-version-specific code.Verification that the queue tested the commit main points to
Not an assumption: for the last six merged PRs (#406, #404, #427, #426, #424, #418) the GraphQL
checkSuitesof the PR'smergeCommit.oid(main's commit) hold amerge_grouprun ofOPF CIand ofCoordinated public packagesand apushrun of each, all on that one SHA. Thepushruns are the duplicates removed here.scripts/release-train.mjscommitChecks(used bytag,settleandstatus) readscommits/<sha>/check-runsplus commit statuses and picks the latest run per name; it never looks at the event. The ruleset 24382980 requirespackages,Installed candidates (windows-latest),Installed candidates (macos-latest)andVerify OPF packages, and the merge_group run reports all four on the release commit, sotagstill finds them green andsettlestill waits for pending ones. No change torelease-train.mjsis needed.Caveats stated plainly:
tagwould reportnot reportedfor the required checks and stop, and the nightly run is the safety net.OPF_TRACKER_STALEisfailoutside PRs and the queue); it now fires only on a manualOPF CIrun (the nightly run isCoordinated public packages, which does not runpnpm test).Tracker refreshstill runs on every push to main and opens the refresh PR, so a stale tracker is still repaired.Tracker refreshstill runs on every push to main.release-trainas a non-required failing check. Making them required is an owner decision.Jobs per PR
OPF CICoordinated public packagesCLI portability(whenpackages/cli,packages/javascript,skills,package.jsonor the lockfile change)Estimated runner minutes saved per week
Using the numbers from the CI baseline: engines legs plus the duplicate Verify about 3.0k min/week; CLI macOS and Windows about 4.4k per 14 days (about 2.2k/week); opf macOS about 5.2k raw minutes per 14 days (about 2.6k/week, overlapping the CLI figure and the push-run Installed candidates). So roughly 5.2k min/week from the two disjoint figures and up to about 7.8k counting the macOS figure on top. Cross-check from the other side: a push run after a merge costs about 66 job-minutes at p50 (OPF CI 20.6, Coordinated 45.4) plus about 10 for the CLI portability push runs that match their paths, and opf merged 202 PRs in the last 7 days, so the dropped push runs are on the order of 9k to 15k raw job-minutes a week (about 40% of push runs were cancelled, per
ci-cd.md). These are estimates, not billing data; macOS minutes bill at 10x.Tests
scripts/ci-diet.test.mjs(pnpm check:ci-diet): every job has a timeout, the heavy workflows havemerge_groupand nopush, the moved legs have thelabeledtype, thefull-cicondition and the ignored-label concurrency group, the required workflows never getlabeled, and thepaths-changedaction is run against a real queue-shaped repository (match, no match, other events, unfetchable base: all fail open).scripts/ecosystem-scope.test.mjsis updated for the new trigger set and thefull-cipolicy. Also run:ecosystem-lock,core-golden,ecosystem-roll,release-train,run-checkstests (84 pass).Not exercised until the queue runs it: the
scopejob and the three moved workflows on a realmerge_groupevent. Theif:expressions were reviewed by hand and the YAML parses; there is no actionlint in this environment.Label
full-cicreated in this repository for the opt-in.Observed on this PR
All checks green. Running jobs (this PR also edits
installed-parity.ymlandpublished-matrix.yml, so their Linux legs ran):Verify OPF packages,ecosystem-render,ecosystem-pptx-editor,ecosystem-corex3,packages,Installed candidatesx2 (0.2 min each, policy skip on Ubuntu, so the required names still report),Published matrix (ubuntu-24.04),Installed parity (ubuntu-24.04). Skipped as designed: the Node 22 and 26 legs (engines-range.yml), thescopejobs,cli, bothCross-OS comparisonjobs andmain-status. A typical code PR (no change to those two matrices) runs 9 jobs.🤖 Generated with Claude Code
Note
Medium Risk
Changes when and where required vs optional CI runs relative to merge queue and main, so mis-scoped workflows could miss OS/Node coverage or duplicate gates until
check:ci-dietand queue behavior are validated in production.Overview
RR-57 cuts redundant GitHub Actions work: typical PRs run fewer jobs, while merge-queue, nightly, and opt-in paths keep cross-platform and multi-Node coverage.
Push-to-main is removed from
OPF CI,Coordinated public packages, and the path-filtered portability/matrix workflows, because the merge queue already tests the commit that lands onmain. Required checks stay on that SHA forrelease-train.mjs; the ecosystem nightly schedule remains the backstop (andmain-status/main-redissues now track schedule failures only).Heavy legs move off default PR runs: Node 22/26 engines-range jobs leave
opf-ci.ymlfor newengines-range.yml(merge queue,workflow_dispatch, or PR withfull-ci). CLI Windows/macOS, published-matrix, and installed-parity drop push triggers, addmerge_groupplus ascopejob using new.github/actions/paths-changed(path globs GitHub ignores onmerge_group). PRs withoutfull-cirun Linux-only matrix legs and skip cross-OS compare jobs;labeled+ concurrency groups avoid unrelated labels re-firing or cancelling runs. Ecosystem Installed candidates also treatsfull-cilikeecosystem-fullfor real OS runners.Operational guardrails: every workflow job gets
timeout-minutes;pnpm check:ci-diet(scripts/ci-diet.test.mjs) locks in triggers, timeouts,full-ciwiring, and paths-changed behavior. Docs (AGENTS.md, ecosystem/release runbooks) and a changelog fragment document the model.Reviewed by Cursor Bugbot for commit 9b03ed6. Configure here.