Repository navigation
ci(macos): budget macos-swift by runner so fork PRs finish - #119017
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed August 26, 2026, 3:49 AM ET / 07:49 UTC. ClawSweeper reviewWhat this changesThe PR gives GitHub-hosted macOS Swift jobs a 30-minute budget, retains Blacksmith’s 20-minute budget, and adds focused routing coverage and CI documentation. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 3 items remain Keep open: the patch correctly aligns the macOS Swift timeout with its runner-selection policy, but the external PR still lacks after-fix proof from an eligible GitHub-hosted macOS run. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — step 1 Assertions:
How this fits togetherThe CI workflow derives a macOS runner from trust, retry, and backend facts before starting native Swift validation. Its timeout must match that selected runner so the required CI gate receives a completed result rather than a cancellation. flowchart LR
A[Pull request event] --> B[Trust and retry facts]
B --> C[macOS runner selection]
C --> D[Timeout selection]
D --> E[macOS Swift validation]
E --> F[Required CI gate]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +21, Docs +1, Config 0. Total +22 across 3 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land only after a redacted eligible hosted macOS Swift run shows Do we have a high-confidence way to reproduce the issue? Yes—source inspection proves that current main selects hosted macOS for untrusted first-attempt PRs while retaining a 20-minute timeout; the cited prior hosted cancellation supports the observed failure mode. Is this the best way to solve the issue? Yes—the narrowest maintainable repair is to make the timeout predicate cover the same hosted routes as runner selection, rather than adding a separate fallback or changing trusted-runner capacity. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a63cfce81c69. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (9 earlier review cycles; latest 8 shown)
|
2423e6e to
4414589
Compare
4414589 to
77e79b5
Compare
77e79b5 to
b371cd5
Compare
runs-on falls back to hosted macos-26 for several cases: workflow_dispatch, run_attempt > 1, fork pull requests, and (as of the runner-backend circuit breaker landed on main the same day this PR was authored) breaker-routed GitHub-hosted fallback. timeout-minutes did not cover the fork-PR case, so fork PRs ran on the slow hosted runner with the Blacksmith-tuned 20-minute budget. Measured on PR openclaw#118989 (a fork PR): macos-swift was cancelled after 20m25s, killed mid-compile at step 1365/1416. No test executed, and the log has no swift compile error - only 'The operation was canceled.' ci-gate then fails because it lists macos-swift as required, so the PR reads red for a reason unrelated to its diff, and a contributor cannot rerun it. Make the budget follow the runner instead of the trigger: every hosted path gets 30 (folded into the same budget the circuit breaker's own hosted-fallback timeout extension already established for this job), so this doesn't reintroduce a second, competing hosted-timeout value. Blacksmith paths keep 20 unchanged. Replaces the single pinned-string guard with a table-driven test covering runs-on and timeout-minutes together across every trigger context that can route to a hosted runner.
Main now routes macos-swift by pull_request author_association rather than fork-ness, so the timeout predicate and its guard scenarios follow it.
77547d9 to
8390e1c
Compare
|
@vincentkoc could you make a call on this one? The defect is still on current main (75b736c): Proof here means observing a fork PR's CI budget on your runners, which only the repo config side can see. If the budget split is intended, say so and I will close this to free the slot. |
Co-authored-by: harjoth <[email protected]>
Co-authored-by: harjoth <[email protected]>
|
@clawsweeper re-review The stale 35-minute PR description now reflects the actual existing 30-minute hosted policy, the workflow invariant comment is two lines, and the duplicated 118-line scenario test has been reduced to focused cases in the existing runner-budget owner test. Direct evaluation of the real expressions proves |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Maintainer proof decision: accept the bounded CI-policy proof override for this workflow-only repair.
The real hosted first-time-contributor macOS route will be observable on the next eligible native-changing contributor PR after merge. The existing observed cancellation, exact-expression red/green behavior, sibling-route regression, and required exact-head CI are sufficient for this narrowly bounded owner-policy correction. |
|
Merged via squash.
|
…119017) * ci(macos): budget macos-swift by runner so fork PRs finish runs-on falls back to hosted macos-26 for several cases: workflow_dispatch, run_attempt > 1, fork pull requests, and (as of the runner-backend circuit breaker landed on main the same day this PR was authored) breaker-routed GitHub-hosted fallback. timeout-minutes did not cover the fork-PR case, so fork PRs ran on the slow hosted runner with the Blacksmith-tuned 20-minute budget. Measured on PR openclaw#118989 (a fork PR): macos-swift was cancelled after 20m25s, killed mid-compile at step 1365/1416. No test executed, and the log has no swift compile error - only 'The operation was canceled.' ci-gate then fails because it lists macos-swift as required, so the PR reads red for a reason unrelated to its diff, and a contributor cannot rerun it. Make the budget follow the runner instead of the trigger: every hosted path gets 30 (folded into the same budget the circuit breaker's own hosted-fallback timeout extension already established for this job), so this doesn't reintroduce a second, competing hosted-timeout value. Blacksmith paths keep 20 unchanged. Replaces the single pinned-string guard with a table-driven test covering runs-on and timeout-minutes together across every trigger context that can route to a hosted runner. * chore: refresh PR head (keep open for maintainer review) * ci(macos): track main's author-association runner routing Main now routes macos-swift by pull_request author_association rather than fork-ness, so the timeout predicate and its guard scenarios follow it. * ci(macos): tighten hosted runner budget coverage Co-authored-by: harjoth <[email protected]> * docs(ci): document hosted macOS budgets without merge conflicts Co-authored-by: harjoth <[email protected]> --------- Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
First-time external contributors can have the required macOS Swift CI job cancelled before compilation finishes because runner selection and timeout selection disagree. Their pull requests correctly route to GitHub-hosted
macos-26, but the existing timeout expression gives that slower runner the 20-minute budget intended for a 12-vCPU Blacksmith Mac.The original failure was observed on contributor PR #118989: its hosted
macos-swiftjob ran for 20 minutes 25 seconds, was cancelled while compiling file 1,365 of 1,416, and never reached its tests. The contributor could not rerun the protected repository workflow.Why This Change Was Made
Keep the existing timeout budgets and make them follow the already-selected runner:
macos-26macos-26macos-26The repair matches GitHub author-association trust routing instead of assuming every fork uses the same runner. It does not increase Blacksmith concurrency, consume additional runner registrations, change repository trust, or introduce a new timeout policy.
User Impact
External contributors no longer lose the required Apple Swift check solely because their first run inherited the wrong runner budget. Trusted returning contributors, canonical pushes, and existing hosted fallback routes retain their established behavior.
Evidence
macos-swiftcancelled after 20m25s.main: author associationsNONEandFIRST_TIME_CONTRIBUTORselectmacos-26but receive only 20 minutes.CONTRIBUTORstill selectsblacksmith-12vcpu-macos-26with 20 minutes.docs/ci.md; focused formatting verification and independent structured review both pass.Contributor credit: @harjothkhara.