Skip to content

Run one x64 job on pull requests; main runs the rest - #923

Merged
ejc3 merged 1 commit into
mainfrom
ci/pr-single-x64
Sep 14, 2026
Merged

ejc3 merged 1 commit into
mainfrom
ci/pr-single-x64

Conversation

@ejc3

@ejc3 ejc3 commented Sep 13, 2026

Copy link
Copy Markdown
Owner

Why

Every PR push launched four x64 metal runners: Host-x64, both Host-Root-x64 modes and Container-x64. c5d.metal is the largest runner line item (about $925 of roughly $2,000 in runner spend since 2026-07-22). Three of those four jobs run paths the arm64 jobs already cover on the same PR.

What changes

  • skip-check now plans the self-hosted matrix.
    • pull_request: every arm64 job, plus Host-Root-x64-SnapshotEnabled. That job takes the privileged suite through a snapshot miss and a restore on x86, which is where the arch-specific KVM and vCPU state code lives.
    • push to main: every job that has not already succeeded on a PR run of the same tree. After a normal merge that means the other three x64 jobs, so x86 still gets the full matrix before release. If the PR run skipped the matrix (docs-only), main skips it too, as before.
    • Any other event: the full matrix. That covers workflow_dispatch (and so ci-train), the Build Kernels workflow_run, and a push whose tree never passed on a PR.
  • host, host-root and container take their matrix from the plan via fromJSON, and skip when their list is empty.

Tests

  • New tests in tests/test_ci_workflow_coverage.rs run the real planner step with fake gh and git. They check:
    • A PR gets exactly one x64 job and every arm64 job.
    • The PR run and the main run together cover the full matrix, with no job running twice.
    • A push with no passing PR run of the same tree gets the full matrix.
    • After a full or matrix-skipped PR run, main runs nothing.
    • Each self-hosted job reads its matrix from the plan.
  • Results: 28/28 pass, and cargo fmt --check, clippy and actionlint are clean.
  • This PR's own CI run is the live check: it should show four arm64 jobs and one x64 job.

Summary by CodeRabbit

  • CI Improvements

    • Pull request validation now runs a focused test matrix while maintaining coverage across supported environments.
    • Main-branch builds run only the remaining checks when pull request coverage is available, reducing unnecessary duplicate work.
    • Builds run the complete matrix when prior pull request coverage is unavailable or incomplete.
    • Manual and workflow-triggered runs continue to validate the full matrix.
  • Tests

    • Added coverage to verify matrix planning and execution behavior across supported event types.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 7bcd13ad-9fab-4703-8a57-4a0ef759bf62

📥 Commits

Reviewing files that changed from the base of the PR and between 92ced2a and 28581a8.

📒 Files selected for processing (2)
  • .github/workflows/ci.yml
  • tests/test_ci_workflow_coverage.rs

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Changes

CI Matrix Planning

Layer / File(s) Summary
Matrix planner
.github/workflows/ci.yml
skip-check now plans self-hosted matrices for pull requests, pushes, and other events. It emits family-specific matrices, run flags, and skip.
Planned matrix consumption
.github/workflows/ci.yml
The host, host-root, and container jobs now use planner outputs for their matrices and execution conditions. The skipped notice text was updated.
Planner validation
tests/test_ci_workflow_coverage.rs
Tests execute the planner with simulated GitHub data and validate pull request coverage, push completion, fallback events, skipped matrices, and job wiring.

Priority: ⬇️ Low

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Other

Sequence Diagram(s)

sequenceDiagram
  participant GitHubEvent
  participant skip_check
  participant GitHubAPI
  participant SelfHostedJobs
  GitHubEvent->>skip_check: provide event type and tree
  skip_check->>GitHubAPI: query matching PR runs
  GitHubAPI-->>skip_check: return completed job names
  skip_check->>SelfHostedJobs: emit family matrices and run flags
  SelfHostedJobs-->>GitHubEvent: execute planned jobs
Loading

Merge Risk: ⚪ Minimal · up to 28581

The CI planner preserves the intended PR-plus-main coverage and correctly skips empty job families. No actionable merge risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the primary CI matrix change: pull requests run one x64 job, and main runs the remaining jobs.
Docstring Coverage ✅ Passed Docstring coverage is 80.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 1 files. (1 skipped: 1 …
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/pr-single-x64

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ejc3

ejc3 commented Sep 13, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

skip-check now plans the self-hosted matrix. A pull request gets every
arm64 job plus Host-Root-x64-SnapshotEnabled; a push to main runs every
job that has not already passed on a PR run of the same tree; other
events run the full matrix. host, host-root and container read their
matrix from the plan, and the coverage tests run the planner with fake
gh and git.
@ejc3

ejc3 commented Sep 13, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@ejc3

ejc3 commented Sep 13, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@ejc3 ejc3 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NOT-A-DEFECT: CodeRabbit's walkthrough for 28581a8 reports no actionable comments, minimal merge risk and 5 of 5 pre-merge checks passed; it carries no finding. Its one suggestion, "Fix failing CI checks", referred to Host-Root-x64-SnapshotEnabled in run 34783983989 attempt 1, whose runner (i-0cc85225bb0c40d3d, r5d.metal spot) was reclaimed by EC2 (Server.SpotInstanceTermination) mid test-root. The rerun in attempt 2 passed, and every check on this head is green.

@ejc3
ejc3 merged commit 750b5ae into main Sep 14, 2026
25 of 27 checks passed
@ejc3
ejc3 deleted the ci/pr-single-x64 branch September 14, 2026 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant