Repository navigation
ci: finish successful aggregate checks without a runner queue - #29136
Conversation
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: 🟡 Moderate · up to
|
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
463cdf1a-d578-4634-a603-2f7f6e70f4ca
📥 Commits
Reviewing files that changed from the base of the PR and between cdf4b38 and de73c727c09d022cdfc5432cffc213dfd1afe357.
⛔ Files ignored due to path filters: 1
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing: 6
.github/workflows/pr.ymlconfig/scripts/pr-aggregate-gate-context.mjsconfig/scripts/pr-aggregate-gate.test.mjsconfig/scripts/pr-ready-check-gate.test.mjsconfig/scripts/pr-ready-check-reuse.test.mjspackage.json
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
de73c72 to
377fc90
Compare
ELI5
When all required checks have the expected results, finish the aggregate check without waiting for another runner. A failed or unexpectedly skipped prerequisite still runs the existing checker and fails the PR.
What Changed
The existing path-detection job validates its routing values. The final job then compares every prerequisite with that routing before allocating a runner. A valid combination skips the aggregate job, which GitHub accepts for required checks. Any mismatch, missing evidence, or noncanonical routing uses the original shell and environment unchanged. The required check name, dependency list, and cancellation behavior stay the same.
The routing marker uses exact lowercase values because GitHub expression equality ignores case. Explicit domain checks also catch outputs removed after validation. The new dev-only
@actions/expressionsdependency tests the actual Actions expression semantics; it adds no transitive packages or production imports.Why
The last qualified run queued the aggregate for 821 seconds, then spent 9 seconds reporting results already known by GitHub. Moving the valid-result decision into the job condition removes that allocation. The existing shell remains the conservative fallback instead of replacing the checker or weakening success-versus-skip requirements.
That 821-second observation is one run, not a promised average or a whole-pipeline benchmark. Other jobs and queue delays can still determine completion time.
Linked Issue
N/A — maintainer CI performance work.
Visual Proof
N/A — CI workflow and tests only; no product UI changes.
Testing
On macOS: 7 focused files / 117 cases passed, including all 8,192 valid routing combinations, individual dependency mismatches, the full preflight selector pair, cancellation, readiness reuse, and masked/malformed outputs. Actual Bash checks cover 158 routing-marker cases and 366 aggregate parity cases, batched to keep test cost low. These are not every mismatch in every mixed routing combination.
Typecheck, changed-code quality, changed-file Oxlint/Oxfmt, and independent static review passed. The existing fallback shell and environment are byte-identical to the base.
Hosted negative qualification passed: run 38723009907 deliberately skipped a selected preflight, allocated the aggregate runner, and failed with
preflight: expected success, got skippedand exit code 1. The normal preflight condition is restored, the branch is based on current main, and all seven implementation files exactly match the locally tested and independently reviewed bytes. Final qualification passed at exact head377fc9025ec4a0fa7fc414ccb6487ca8837301e3in run 38724756703. All 46 check results completed: 36 successful and 10 legitimate skips. All 12,308 unit roots were assigned and executed exactly once; all 33 changed-root cases passed, with zero unhandled errors. Seven artifact digests, all five unit logs, detector routing and every selected prerequisite were independently verified. The aggregate completed as skipped with no steps or runner allocation. The latest-main combination, including Mobile routing, also passed 137 focused cases locally; all seven PR paths are disjoint from upstream changes. The whole combined tree has not been hosted-tested.Official skipped-job behavior: https://docs.github.com/en/actions/how-tos/write-workflows/choose-when-workflows-run/control-jobs-with-conditions
Review
Independent review checked all 12 conditional prerequisites, exact routing validation, missing/masked outputs, cancellation, readiness reuse, and expression-versus-shell semantics. GitHub controls prerequisite result values through its documented success/failure/cancelled/skipped enum.
Agent skill upstream boundary
Notes
No application behavior, host ownership, remote protocol, native runtime, or platform assumptions change. The existing aggregate shell continues to execute on Linux; expression tests run without Bash on Windows, while shell tests retain their existing Windows skip.
Checklist