Skip to content

ci: run slow and history-dependent guards in parallel jobs - #13097

Merged
austinywang merged 1 commit into
manaflow-ai:mainfrom
teamleaderleo:ci-split-guard-tests
Sep 20, 2026
Merged

austinywang merged 1 commit into
manaflow-ai:mainfrom
teamleaderleo:ci-split-guard-tests

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Sep 20, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

workflow-guard-tests sits on the critical path to every macOS job and took about 390 s (example). 104 s was a fetch-depth: 0 checkout. A shallow checkout of this repo takes 10 s, and only one step reads history: the SwiftPM lockfile policy, which diffs against the merge base. Four other steps took 170 s between them.

  • workflow-guard-tests now uses a shallow checkout and keeps every step except the ones below. Expected about 120 s.
  • workflow-guard-history keeps fetch-depth: 0 and runs the SwiftPM lockfile policy. It is the only guard job that fetches history.
  • workflow-guard-cli-scripts runs the cmux-tui client commit resolution (60 s) and profiling script (33 s) guards.
  • workflow-guard-source-lints runs the sidebar lazy-layout guard (55 s) and the DispatchWorkItem lint (20 s) with its Bonsplit init.
  • linux-preflight requires success from all four, so macOS still starts only after every guard passes. ci-status lists them too.

The moved steps are unchanged. Each new job sets up Python 3.9 and the same pinned pip packages, because those steps ran after that setup before. No other guard script calls git against repo history (checked by grepping every script the job runs), and no test pins the moved steps to the old job.

This is step 2 of #13095. This PR edits tests/test_ci_change_areas.py, so the router runs every area for it.

Testing

  • actionlint .github/workflows/ci.yml
  • python3 tests/test_ci_change_areas.py on Python 3.9 and 3.12. New cases: linux-preflight fails when any of the four guard jobs is failed, cancelled or skipped, and only workflow-guard-history fetches full history.
  • tests/test_ci_reusable_workflow_permissions.py, tests/test_ci_app_host_home_isolation.py, tests/test_ios_testflight_pro_distribution.py, tests/test_ci_self_hosted_guard.sh, which all parse the workflow-guard-tests job.
  • The real timing comes from this PR's own run.

Issues

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Summary by cubic

Splits the slow and history-dependent guard steps out of workflow-guard-tests so macOS jobs no longer wait on one ~390s critical path. workflow-guard-tests now uses a shallow checkout; only the new workflow-guard-history job fetches full history.

  • workflow-guard-cli-scripts runs the cmux-tui client commit resolution and profiling script guards.
  • workflow-guard-source-lints runs the sidebar lazy-layout and DispatchWorkItem lints.
  • Each new job sets up Python 3.9 and the same pinned pip dependencies as before.
  • linux-preflight and ci-status now require all four guard jobs to succeed.
  • Updates test_ci_change_areas.py to enforce the new job requirements and the history-fetching split.
  • This is step 2 of [RFC] CI structure: thin router, reusable platform workflows, merge queue, failure ratchet #13095.

Written for commit 45165b0. Summary will update on new commits.

Review in cubic

workflow-guard-tests took about 390 s on the critical path to every macOS
job. 104 s of that was a full-history checkout that only the SwiftPM
lockfile policy needs, and four steps accounted for another 170 s.

The lockfile policy moves to workflow-guard-history, the only guard job
that still fetches history. The cmux-tui commit resolution and profiling
script guards move to workflow-guard-cli-scripts, and the sidebar
lazy-layout and DispatchWorkItem lints move to workflow-guard-source-lints.
Each new job sets up the same Python 3.9 and pip packages the steps ran
under before. linux-preflight requires all four jobs to succeed.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@cursor

cursor Bot commented Sep 20, 2026

Copy link
Copy Markdown

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

@coderabbitai

coderabbitai Bot commented Sep 20, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 12 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 250ab4e2-3550-4d1c-9161-c5942c8d4df1

📥 Commits

Reviewing files that changed from the base of the PR and between 2bda736 and 45165b0.

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

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.

@github-actions

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@greptile-apps

greptile-apps Bot commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge; the split guard jobs preserve their prerequisites and remain mandatory through both preflight and aggregate status.

Summary

This PR shortens the critical CI guard path by splitting slow and history-dependent checks into parallel jobs while preserving their gating behavior.

  • Makes the main workflow-guard-tests checkout shallow.
  • Isolates the SwiftPM history check in the sole full-history guard job.
  • Moves CLI-script and source-lint checks into parallel jobs with their required setup.
  • Requires all four guard jobs through linux-preflight and includes them in ci-status.
  • Adds regression coverage for guard outcomes and checkout depth.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    A[Pull request] --> T[workflow-guard-tests<br/>shallow checkout]
    A --> H[workflow-guard-history<br/>full checkout]
    A --> C[workflow-guard-cli-scripts<br/>shallow checkout]
    A --> S[workflow-guard-source-lints<br/>shallow checkout]
    T --> P[linux-preflight]
    H --> P
    C --> P
    S --> P
    P --> M[macOS jobs]
    T --> Z[ci-status]
    H --> Z
    C --> Z
    S --> Z
Loading

Reviews (1) · Last reviewed commit: "ci: run slow and history-dependent guard..."

@teamleaderleo
teamleaderleo enabled auto-merge (squash) September 20, 2026 00:39
@austinywang
austinywang merged commit e3f22bd into manaflow-ai:main Sep 20, 2026
33 of 35 checks passed
rustybret pushed a commit to rustybret/bmux that referenced this pull request Sep 20, 2026
e3f22bd ci: run slow and history-dependent guards beside workflow-guard-tests (manaflow-ai#13097)
974c2c4 Normalize Cloud tree machine icon spacing (manaflow-ai#13081)
10d13a6 test: align cloud rename parity with optimistic tree (manaflow-ai#13092)
be7692c ci: start the agent notification lane only for the suites it runs (manaflow-ai#13067)
2bda736 ci: run web validation for the merge queue (manaflow-ai#13069)
39f1328 ci: cancel superseded pull request runs in three macOS workflows (manaflow-ai#13064)
80ee5dc ci: skip blocked internal TestFlight polls (manaflow-ai#13062)
cbb3477 ci: stop routing workflow plumbing changes to macOS (manaflow-ai#13083)
22d913e Quiet cloud terminal creation tabs (manaflow-ai#12979)
@teamleaderleo
teamleaderleo deleted the ci-split-guard-tests branch September 23, 2026 11: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.

2 participants