Skip to content

ci: overlap local Rust helper builds with nightly Swift compilation - #13874

Merged
teamleaderleo merged 7 commits into
mainfrom
feat-nightly-helper-tail
Sep 23, 2026
Merged

teamleaderleo merged 7 commits into
mainfrom
feat-nightly-helper-tail

Conversation

@lawrencecchen

@lawrencecchen lawrencecchen commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

The nightly Release build currently compiles local Rust helpers after Swift finishes. Start the diff sidecar and Nucleo FFI builds alongside Swift at low priority so their authoritative Xcode phases can reuse Cargo outputs.

The helper prebuild uses the same target directories, SDK, and deployment target as the phases. Each phase still builds, packages, and verifies its own outputs. A Python supervisor bounds optional work to ten minutes, terminates entire process groups on build completion or cancellation, and preserves the primary build status.

cmux-cua deliberately stays in its existing required phase: its shared Git checkout can leave index locks if an optional prebuild is killed during mutation. This change does not touch that source cache.

Native experiment 35810949235 measured diff-sidecar prebuild at49s and Nucleo at23s, with corresponding phase Cargo invocations warm. That experiment also overlapped cmux-cua and reduced the whole tail111s→23s; the final narrower implementation does not claim that full reduction. Its end-to-end saving will be measured on the next ordinary nightly.

Validation: six lifecycle tests cover primary failure, optional failure, deadline, successful warm completion, cancellation reaching grandchildren, and exclusion of shared Git source mutation. Determinism checker reports zero findings or suppressions; registry, release guard, nightly decision tests and shell syntax pass. No additional native experiment dispatched.

Summary by CodeRabbit

  • Chores
    • Updated the release build workflow to prepare supporting components alongside the app build. If preparation fails or takes too long, the app build can still build them itself, and the workflow preserves the app build’s result. This improves the release build process without changing app features.

The cmux target's diff sidecar, Nucleo FFI, and cmux-cua phases run after the
Swift compile although they do not read it, adding about 100 s of cargo work
to the end of every nightly build. Start the same build scripts in the
background before xcodebuild, with the phases' Cargo target directories,
deployment target, and SDK, so the phases find every unit fresh. A failed or
late prebuild only leaves the work to the phases; Cargo's build-directory lock
serializes the two.
@github-actions

Copy link
Copy Markdown
Contributor

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

@coderabbitai

coderabbitai Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

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

Review profile: ASSERTIVE

Plan: Advanced

Run ID: a5db8319-7565-43a4-bed7-ec3d05175920

📥 Commits

Reviewing files that changed from the base of the PR and between dc956af and e786d80.

📒 Files selected for processing (2)
  • .github/workflows/nightly.yml
  • scripts/ci/prebuild-app-helpers.sh

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

The nightly Release workflow now starts a low-priority Rust helper prebuild while Xcode compiles. The script builds three helpers in parallel, and the workflow reports helper failures while exiting with the Xcode build status.

Changes

Nightly helper prebuild

Layer / File(s) Summary
Prepare and run helper builds
scripts/ci/prebuild-app-helpers.sh
The new script reads build options, derives the macOS build environment, and builds the diff sidecar, Nucleo FFI, and cmux-cua in parallel. It logs each result and exits with a failure status if any helper build fails.
Integrate prebuild with nightly Release build
.github/workflows/nightly.yml
The workflow starts the script in the background with the selected architectures and derived-data path. It waits for the script, prints its log, and exits with the captured Xcode build status.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to e786d

The nightly build remains governed by the Xcode result, and its existing phases can build the helpers if prebuilding fails. No actionable merge-blocking issue was established.

🚥 Pre-merge checks | ✅ 24 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (24 passed)
Check name Status Explanation
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.
Cmux Cloud Persistent Session And Early Input ✅ Passed The check targets Cloud terminal creation, persistent transport, manual panes, and runtime admission. The pull request changes only .github/workflows/nightly.yml and adds `scripts/ci/prebuild-app-he…
Cmux Swift Actor Isolation ✅ Passed The reviewed diff changes only .github/workflows/nightly.yml and adds scripts/ci/prebuild-app-helpers.sh. It changes no Swift source, so it introduces no Swift actor-isolation mistake covered by t…
Cmux Swift Blocking Runtime ✅ Passed The check is not applicable. The pull request changes only .github/workflows/nightly.yml and adds scripts/ci/prebuild-app-helpers.sh; it changes no Swift source or Xcode project file. The shell sc…
Cmux Browser Automation Off-Main ✅ Passed The check does not apply to this pull request. The exact diff changes only .github/workflows/nightly.yml and adds scripts/ci/prebuild-app-helpers.sh. It changes CI orchestration for Rust helper bu…
Cmux Expensive Synchronous Load ✅ Passed The check is not applicable to this pull request. The review diff changes only .github/workflows/nightly.yml and adds scripts/ci/prebuild-app-helpers.sh; it changes no Swift source or agent-histor…
Cmux Cache Substitution Correctness ✅ Passed The custom check applies to production Swift, TypeScript, and JavaScript changes. The reviewed diff changes only .github/workflows/nightly.yml and adds scripts/ci/prebuild-app-helpers.sh; it chang…
Cmux No Hacky Sleeps ✅ Passed The diff adds no fixed sleep, timer, polling loop, or wall-clock synchronization. The new helper script waits for its child processes to finish, which is explicit process completion; its date calls on…
Cmux Algorithmic Complexity ✅ Passed The PR adds no algorithmic-complexity violation under the stated rule. The new shell script parses a small set of CLI options and launches three fixed helper builds. Its deployment-target grep/sort pr…
Cmux Swift Concurrency ✅ Passed The PR changes only .github/workflows/nightly.yml and adds scripts/ci/prebuild-app-helpers.sh; the authoritative diff contains no Swift files. The background work is a shell-launched Rust helper p…
Cmux Swift @Concurrent ✅ Passed The reviewed diff changes only .github/workflows/nightly.yml and adds scripts/ci/prebuild-app-helpers.sh. It introduces no Swift functions, async work, or call sites, so none of the Swift `@concur…
Cmux Swift Package Boundaries ✅ Passed The reviewed diff changes only .github/workflows/nightly.yml and adds scripts/ci/prebuild-app-helpers.sh. It introduces no production Swift code, so it does not trigger the Swift package-boundary …
Cmux Swiftpm Lockfiles ✅ Passed The diff changes only .github/workflows/nightly.yml and adds scripts/ci/prebuild-app-helpers.sh. It changes neither a cmux-owned package .gitignore nor a Package.swift dependency nor `cmux.xco…
Cmux Swift Logging ✅ Passed The reviewed diff changes only .github/workflows/nightly.yml and adds scripts/ci/prebuild-app-helpers.sh; it changes no production Swift code or Swift logging. The new shell output and helper-log …
Cmux User-Facing Error Privacy ✅ Passed The diff changes only .github/workflows/nightly.yml and adds scripts/ci/prebuild-app-helpers.sh. The added messages and helper build logs are written to the nightly GitHub Actions log for CI diagn…
Cmux Full Internationalization ✅ Passed The diff changes only .github/workflows/nightly.yml and adds scripts/ci/prebuild-app-helpers.sh. These changes run Rust build helpers and report CI status; they add no user-facing app text, web UI…
Cmux Swiftui State Layout ✅ Passed The check is not applicable to this pull request. The review-scoped diff changes only .github/workflows/nightly.yml and adds scripts/ci/prebuild-app-helpers.sh; it changes no Swift, SwiftUI, story…
Cmux Architecture Rethink ✅ Passed PASS. The reviewed diff changes only .github/workflows/nightly.yml and adds scripts/ci/prebuild-app-helpers.sh; it changes no Swift code. The rule targets Swift architectural changes that add repa…
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed The check is not applicable. The reviewed diff changes only .github/workflows/nightly.yml and adds scripts/ci/prebuild-app-helpers.sh; it contains no Swift changes or standalone window declaration…
Cmux Source Artifacts ✅ Passed The changed paths are .github/workflows/nightly.yml and scripts/ci/prebuild-app-helpers.sh. The workflow change adds an intentional CI build step. The new shell script is intentional build-system …
Cmux No Test Or Debug Seam In Production Source ✅ Passed The PR changes only .github/workflows/nightly.yml and adds scripts/ci/prebuild-app-helpers.sh. The review diff contains no changed Swift file under a production Sources/ path, so the check does …
Title check ✅ Passed The title clearly and concisely describes overlapping local Rust helper builds with nightly Swift compilation.
Description check ✅ Passed The description explains the change and its purpose, and reports validation and test results. The demo video is not applicable to this CI change. The review-trigger block and checklist are omitted, bu…
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

@teamleaderleo

Copy link
Copy Markdown
Collaborator

Independent review of 2d976ca: helper compilation overlaps Swift using matching Cargo paths and SDK/deployment settings; authoritative Xcode phases still build or reuse their outputs. Review found an unbounded wait on the optional prebuild after build failure; the revision fixes this with a bounded process-group supervisor preserving the actual build status and cleaning up descendants. Independently reran all five behavioral lifecycle tests successfully. Native experiment 35810949235 establishes the original parallel helper optimization; end-to-end production timing after landing remains to be measured.

BasaltUnwind g1 🗝️

@teamleaderleo teamleaderleo changed the title ci: build the app's Rust helpers during the nightly Swift compile ci: overlap local Rust helper builds with nightly Swift compilation Sep 23, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator

Final independent review at 4bfdd2d: no blocking findings. Only diff-sidecar and Nucleo prebuild concurrently; cmux-cua remains in its authoritative phase to avoid interrupted shared Git checkout hazards. Helper process groups are bounded and cancelled on build failure/cancellation; the required build determines success. Six lifecycle tests pass locally, and current CI checks including Web complexity pass. The earlier experiment included cmux-cua, so its 88-second saving is not claimed for this narrower final change; production timing remains to be measured.

BasaltUnwind g1 🗝️

@teamleaderleo
teamleaderleo merged commit 3094a95 into main Sep 23, 2026
59 of 60 checks passed
rustybret pushed a commit to rustybret/bmux that referenced this pull request Sep 23, 2026
069f1ce ci: streamline app-host test consumers (manaflow-ai#13427)
cfe69ec Merge pull request manaflow-ai#13885 from teamleaderleo/docs/full-ci-explicit-scope
25a6378 docs: require explicit broad-suite intent for full-ci
0a6c362 Merge pull request manaflow-ai#13749 from manaflow-ai/ci/app-host-product-fast-transport
3094a95 ci: overlap local Rust helper builds with nightly Swift compilation (manaflow-ai#13874)
ea4b13b CI: run Claude wrapper regressions without compiling the app (manaflow-ai#13869)
8f1491b test: bound SSH fish helper pipe draining (manaflow-ai#13408)
9667375 Merge pull request manaflow-ai#13826 from manaflow-ai/12284-claude-wrapper-subcommands
40b0cd7 ci: scope trusted web complexity before Bun setup (manaflow-ai#13598)
0f0d4a7 ci(iOS): build simulator test product once (manaflow-ai#13600)
0f28e77 Merge main settings runtime repair for native validation
819adce Merge branch 'main' of https://github.com/manaflow-ai/cmux into 12284-claude-wrapper-subcommands
7442bf7 Merge remote-tracking branch 'origin/main' into 12284-claude-wrapper-subcommands
b6507c7 Merge remote-tracking branch 'origin/main' into 12284-claude-wrapper-subcommands
eed9ca5 Merge main to use corrected test execution and CI routing
645e8af test: control the Claude catalog cache clock
3c0637d Merge remote-tracking branch 'origin/main' into 12284-claude-wrapper-subcommands
6229cdc fix: expire successful Claude command discovery catalogs
6f775da test: require bounded Claude command cache freshness
2132e30 fix: preserve cancellation during Claude command discovery
7ac2789 Merge remote-tracking branch 'origin/main' into 12284-claude-wrapper-subcommands
8cc6659 fix: discover and cache Claude subcommands before hook injection
59dd108 test: cover Claude command discovery and fallback
a9da704 ci: fall back cleanly on artifact decoder errors
bfb744f test: reproduce artifact decoder failures escaping fallback
a02abe7 ci: bound the suite coverage diagnostic job
8237edc Merge main and preserve the derived review-fabric contract group
a982dec test: check review-fabric routing through the router, not its source text (manaflow-ai#13788)
0d16b9b Merge branch 'main' into ci/app-host-product-fast-transport
74b94e3 CI: read the app-host test product over parallel range requests

# Conflicts:
#	.github/workflows/ci-artifact-transport.yml
#	.github/workflows/ci-guards.yml
#	.github/workflows/ci-macos.yml
#	.github/workflows/ci.yml
#	.github/workflows/nightly.yml
#	.github/workflows/test-ios.yml
#	.github/workflows/web-complexity-trusted.yml
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