Repository navigation
ci(cmux-next): cache the Swift exports by source key - #18372
Conversation
Red: scripts/cmux-next/swift-exports-key.py does not exist yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
swift-exports-key.py hashes what the export tests compile and read (the packages, plans/cmux-next, the generators and the Xcode pin), minus the exports and the web bundles, so a cache keyed by it can hand the settings schema, MDM manifests, action surfaces, links, daemon capabilities and CI target graph to a job without a Mac build. The checks job runs its tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Red: scripts/cmux-next/swift-exports-cache.sh does not exist yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
swift-exports-cache.sh packs the exports with their stamp and installs a pack only into a checkout with the same source key, after checking the pack's digest. A Linux job saves the pack after a green feat-cmux-next push, when every tier passed, so a job that only reads the exports (the web bundles read the settings schema) can restore them instead of a Mac build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
This comment has been minimized.
This comment has been minimized.
…ports-source-key # Conflicts: # tests/test-execution.toml
…ports-source-key # Conflicts: # .github/workflows/cmux-next.yml
|
Not verified: macOS jobs did not run: compile and app tests were skipped on CI passes on Written by |
| "docs/mdm/com.manaflow.cmux.plist", | ||
| "docs/mdm/com.manaflow.cmux.intune.plist", | ||
| "docs/mdm/managed-preferences.md", | ||
| ] |
There was a problem hiding this comment.
Export pack omits MDM example
Medium Severity
OUTPUTS lists four MDM files but not docs/mdm/cmux-example.mobileconfig, which ManagedPreferencesManifestTests generates with the rest under CMUX_UPDATE_MDM_SCHEMA. pack and install therefore never store or restore that profile, so a later switch off committed exports would drop it.
Reviewed by Cursor Bugbot for commit 0d0dfa3. Configure here.
…d the chat index relay
…ync; app relays the chat index as project.observe
… vscdb, a failed Zed row or a scanning chat index; rank-only times; three.js folders)
…into feat-cmux-next-m0p7-adapters
…aces the unit tests (NO UNIT TESTS)
…into feat-cmux-next-m0p7-adapters
…into feat-cmux-next-m0p7-adapters
…ext-m0p7-adapters
…ext-m0p7-adapters
Unit-test deletion lane, slice 8 (Lawrence 2026-10-10, "Delete all now"). SDK tests in cmux-tui/bindings before: about 1,243; after: about 507. Deleted (call SDK code directly, in-memory fake or scripted transports, net.Pipe, count/shape checks): TypeScript authority, base64, device-kind, field-compatibility, wire-json, client, resource-api, websocket-transport, presence; Python consumer, device_kind, events, aio_cleanup, convenience, schema_roundtrip; Rust bookmarks_typed, cloud_name_authority, device_kind, error_codes, state_handles, public_api and the in-src tests of cmux-sdk (except the socket ones below), cmux-daemon-client, cmux-sidebar, the two bootstrap crates and examples/rust-agent-screen-detection; Go client_zero_progress, resource_api, resource_api_external, socket, raw/device_kind; go-pane envelope, frame, token, provider, conn, richpane; Java Codec, GeneratedModel, SocketDiscovery, ResourceApi, BrowserPointerFrame; C++ attachment, base64, json, client, resource; Zig raw/authority_test and the inline tests of resource.zig, raw/client.zig, raw/wire.zig, raw/transport.zig and raw/capabilities.zig that open no socket. Runner lists follow (java scripts/test.sh, cpp CMakeLists.txt, zig raw.zig). Kept (wire boundary or generated check): - live daemon tests (*_live.rs), rust mock_server, byte_attachment, home_conversation, typed_state_ops, dock_field_capability, local_socket_windows, rust-daemon-client tests/, rust-sidebar runtime (real Unix sockets), cmux-sdk in-src socket tests in client.rs, codec.rs, resource/client.rs, socket_hash.rs (UnixListener); - Python resource_api, lifecycle (UnixJsonServer), protocol (generated vs schema), package_consumer; TypeScript unix-transport, generated, package-consumer, resource-package-consumer, code-mode cloud-relay; Go raw client, ergonomics_external, consumer, url_open (net.Listen); go-pane listener, websocket, examples/hello main + vectors; Java GeneratedCoverage, StreamMode, Lifecycle, Ergonomics, UnixTransport, consumer; C++ generated, macro_collision, unix_transport; Zig provider, stream_client, wire_presence, generated presence and the socket tests in transport/client/resource; - example apps' socket fakes; conformance runner; codegen --check. Also drops the last hand-written count pins: C++ attach-surface field_requirements size and the TypeScript emitted-event count. Release tooling tests (bindings/tests, codegen/tests) are CI tooling and stay. No Cargo.toml change: dev-dependencies left as they are.
…ext-m0p7-adapters
…a static-only type [cx-94dl] 35a61bd added enum HomeAppLinks (all-static public surface), which lint-ios-package-conventions.sh refuses; cdd28b4 got past the lint by making it a struct with an empty public init. URL.isChiefSubagentLink is the same check on the receiver type; behavior is unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ext-unitdel-bindings
…18896) * test(ci): the base autofix regenerates without touching frozen paths (red) base-autofix.sh copies the Mac job's regenerated files into a checkout, skipping frozen paths, and adds a missing cmux-tui tree input to both lists. Red: the script does not exist yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci: a base autofix bot commits generated files, tree inputs and fmt After each cmux-next run on a feat-cmux-next push, cmux-next-base-autofix repairs the mechanical reds in one commit on top of it: the generated files the Mac generated-files job rebuilt (its cmux-next-generated-patch artifact, so no fleet Mac), missing cmux-tui tree inputs and cargo fmt in cmux-tui. Frozen paths (base-autofix-frozen.txt) are reported and never written; the app FFI pin stays with the app-ffi-repin pull request. The push uses a GitHub App token minted only for the push step and a plain push that never overwrites a moved base. Dry run until the repo variable CMUX_NEXT_BASE_AUTOFIX is 1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(ci): the base autofix never writes a workflow file (red) The bot pushes with GITHUB_TOKEN, which cannot push .github/workflows changes. A regenerated workflow file is skipped and reported, and a missing cmux-tui tree input (its second list is cmux-tui-artifacts.yml's paths) is reported without writing either list. Red: both are written. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci: the base autofix pushes as github-actions[bot] with GITHUB_TOKEN No GitHub App: the job's GITHUB_TOKEN (contents: write) pushes the repair; no ruleset or branch protection applies to feat-cmux-next. GITHUB_TOKEN cannot push workflow files, so every .github/workflows path is frozen for the bot, and missing cmux-tui tree inputs (whose second list is cmux-tui-artifacts.yml's paths) are reported, not written. Its pushes start no workflow: the next push's cmux-next run verifies the repair commit. The trigger also checks the run's workflow path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…x-tui crate (#18913) 36c60c8 moved the image paste spool into cmux-tui-image-paste, and cmux-tui-core's lib.rs re-exports it (use cmux_tui_image_paste:: image_paste;). The image staleness guard (8e23f8a, cx-4l51) only looked for crate::image_paste under cmux-tui-core, found 9 constants named CAPABILITY and failed, so release rails is red on every PR and on nightly-next. A crate:: path whose first segment lib.rs re-exports from a workspace crate now also names that crate's module file. No bead (repairs the cx-4l51 guard). Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* ci: format staged files in the trusted pre-commit hook * ci: guard formatter scope for staged files * ci: scope Rust formatter guard to its package * ci: use direct rustfmt and skip merge formatting * ci: pass the cmux-tui Rust edition to rustfmt
* test(ci): red test, PRs check rustfmt on the cmux-tui packages they touch PR CI never runs cmux-tui.yml (dispatch only), so #18706 landed unformatted Rust and broke base cargo fmt --check. These tests pin a helper that runs cargo fmt --check once per touched package, checks every package when a rustfmt config changes or there is no base, and names each unformatted package. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci: check rustfmt on the cmux-tui packages a PR touches PR CI never runs cmux-tui.yml (dispatch only), so #18706 landed unformatted Rust and broke base cargo fmt --check. cmux-tui-spec.yml already runs on every PR and push touching cmux-tui/** on hosted Linux; its new rustfmt job runs cmux-tui-fmt-changed.py, which maps each changed .rs file or Cargo.toml to its nearest tracked package and runs cargo fmt --check on it with the pinned toolchain. No build and no dependency download. A rustfmt config or toolchain change, or no base, checks every package; vendored crates and deleted packages are skipped. A PR compares with its merge commit's first parent, a push with the commit before it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * style(cmux-tui): rustfmt acpmux's draft tests and the relay circuit The new rustfmt job's full run found two base packages that fail cargo fmt --check: acpmux, from #18706's draft tests and their module order, and the Cloudflare relay's circuit.rs. Formatting only, exactly the hosted rustfmt diff. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * style(cmux-tui): leave the relay circuit to its own repair Touching the Cloudflare relay runs its lane, whose npm audit is red on base (sharp and undici advisories through wrangler, fixed only by a wrangler bump outside the stated range). That is the relay's own repair, so this PR keeps acpmux's formatting only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* ci: add mini-first Swift canary for cmux-next * ci: remove unit tests from Swift canary change
…e cmux-tui (#18698) * test(cmux-next): red: a PR that changes no cmux-tui fails same-tree on an unpublished merge tree #16614, #17551 and #18605 change no cmux-tui or ghostty-next path, yet same-tree cmux-tui failed them because the base tip's tree was never published (its artifacts run was cancelled). Such a PR should reuse the newest published tree in its history (tree_fetch_key, fetched through CMUX_TUI_TREE_KEY), or skip the tree jobs when none is published, never fail. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci(cmux-next): same-tree cmux-tui is a hard check only for PRs that change cmux-tui Path routing records whether the pull request's own diff touches cmux-tui/ or ghostty-next. For one that does not, a merge tree that is not ready no longer fails: the probe (CMUX_TUI_TREE_BASE_FALLBACK=1) resolves the newest published tree in the merge's history and reports ready with tree_fetch_key, which the daemon tests and the Debug scheme compile fetch through CMUX_TUI_TREE_KEY; with none published it reports skipped. Pushes, dispatches and PRs that change cmux-tui keep the hard check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cmux-next): the newest-published search deepens only this commit's history A bare `git fetch --deepen=50 origin` deepens every branch of origin: on this PR's first run it took path routing past its 5-minute limit (job 113609407061) before the probe's base fallback, which then resolved in under a second. Deepening only HEAD takes about 30 s on a depth-2 clone of feat-cmux-next. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* docs(cmux-next): map UI parity reference sources * docs(cmux-next): add media preview reference source * docs(cmux-next): define reference freshness checks
* test(nightly): the notes step cannot spend the publish budget before the upload (red) Run 37611677848 spent 29 of publish-nightly's 30 minutes on release notes and was cancelled mid-upload, leaving partial release assets. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(nightly): bound the publish notes step at 10 minutes The notes take seconds since 0115b26. A regression now fails the step before any asset upload, instead of spending publish-nightly's 30 minutes and being cancelled mid-upload with partial assets left on the release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…self (#17622) * test(cmux-next): the cmux-tui gate pins and dispatches an unpublished tree itself Publisher run 37505519359 failed transiently and its retry was replaced by a newer feat-cmux-next push, so the tree was never published and lanes pushed cmux-tui-pin-* branches by hand to unblock their gates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(cmux-next): the tree gate watches the base and may pin the tree Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci(cmux-next): the cmux-tui gate pins and dispatches an unpublished tree When two run checks find no artifacts run that will publish the tree, the gate creates cmux-tui-pin-<key12> at the publisher commit and dispatches the artifacts workflow there, once, then keeps waiting. A pull request now watches its base commit (the merge's first parent) instead of no publisher, so it neither waits 45 minutes for a tree nobody builds nor needs a lane to push a pin branch by hand. A superseded push still skips; forks keep a read-only token and no autopin. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(cmux-tui): a transient wrong binary read must not fail publication Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cmux-tui): read a mismatched published binary again before failing R2 objects are write-once, so a digest mismatch on a binary the run just uploaded is a bad read. Fetch it again from a cache-busting URL up to three times, and name the response headers when it still differs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(cmux-next): a pull request gate pins a tree its base never builds Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci(cmux-next): a pull request gate pins a tree its base never builds A pull request that changes cmux-tui has a merge tree no push builds, and the artifacts workflow's pull_request_target trigger has never started a run, so its gate waited 45 minutes with the run check off. With CMUX_TUI_TREE_AUTOPIN the gate now pins its own checkout at once and watches that run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci(cmux-next): retain base tree dispatch tests --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* ci(gallery): capture narrow responsive states * test(gallery): cover workflow matrix changes * fix(gallery): dedupe equal responsive widths * ci: shard gallery matrix renders * ci: retrigger sharded gallery validation
Resolutions: the Swift exports are still committed on feat-cmux-next and regenerate-swift-exports.sh still writes them, so the source-key cache stays. Its unit tests (test_swift_exports_key.py, test_swift_exports_cache.sh), their checks-step lines, path filters and test-execution.toml entry are dropped (no unit tests in cmux-next); base's reload-shim and app-ffi-pin-scope entries stay. The swift-exports-cache job moves above request-nightly-next's comment, which it had split. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 3 potential issues.
There are 4 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit beddd34. Configure here.
| print(f"cargo fmt --check --manifest-path {package}/Cargo.toml", flush=True) | ||
| # From cmux-tui/ so rustup uses its rust-toolchain.toml pin. | ||
| if subprocess.run(["cargo", "fmt", "--check", "--manifest-path", str(manifest)], cwd=repo / ROOT).returncode: | ||
| red.append(package) |
There was a problem hiding this comment.
Workspace fmt check hits every crate
High Severity
Selecting the cmux-tui workspace root and running cargo fmt --check --manifest-path against that manifest formats every workspace member, not just the root package. A change limited to the root package (cmux-tui/Cargo.toml or build-support/source-watch.rs) therefore fails on untouched, still-unformatted crates, which is the failure this script was added to avoid.
Reviewed by Cursor Bugbot for commit beddd34. Configure here.
| contents: read | ||
| timeout-minutes: 20 | ||
| env: | ||
| CMUX_NEXT_RUNNER: ${{ needs.macos-placement.outputs.runner || github.repository_owner != 'manaflow-ai' && 'macos-26' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && 'blacksmith-6vcpu-macos-26' || vars.CI_PR_POOL_OWNED == '1' && contains(fromJSON('["pull_request","push","workflow_dispatch"]'), github.event_name) && (github.run_attempt <= 2 || github.triggering_actor != 'github-actions[bot]') && vars.CI_SIDE_LANE_RUNNER || vars.MACOS_RUNNER_26 || 'blacksmith-6vcpu-macos-26') }} |
There was a problem hiding this comment.
Canary skips attempt-4 overflow
Medium Severity
The new swift-canary job still pins runs-on and CMUX_NEXT_RUNNER to macos-placement’s runner on every attempt. The other Mac jobs now drop that label on bot attempt 4 so a mini refusal overflows to Blacksmith. A refused canary stays on the mini and can loop or sit queued, even though this job is the merge gate for package-only Swift PRs.
Reviewed by Cursor Bugbot for commit beddd34. Configure here.
| echo "own_tui=false" >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo "own_tui=true" >> "$GITHUB_OUTPUT" | ||
| fi |
There was a problem hiding this comment.
Tree fallback ignores key inputs
Medium Severity
own_tui is false unless the PR touches cmux-tui/ or the ghostty-next gitlink. The tree key also hashes other inputs (cross-compile scripts, include_str! fixtures, and similar). A PR that only changes those files still gets CMUX_TUI_TREE_BASE_FALLBACK and runs daemon/scheme jobs on an older published tree, so the new inputs are never what CI tests.
Reviewed by Cursor Bugbot for commit beddd34. Configure here.
|
Found 1 test failure on Blacksmith runners: Failure
|


Summary
cx-vn5 follow-on for the settings exports and
ci-target-graph.json. Swift tests on a Mac write these exports: the settings schema, the MDM manifests, the action surfaces andactions.md, links, daemon capabilities and the CI target graph. Some Linux jobs only read them; the web bundles, for example, readschemas/settings. Once the exports are cached by source key, those jobs can restore them instead of building on a Mac. This mirrors the web bundle cache in #18360.scripts/cmux-next/swift-exports-key.py ROOT --source|--outputs|--stamp|--list: the source key hashes what the export tests compile and read:Packages/,plans/cmux-next, the generators and the Xcode pin. It leaves out the exports themselves and the web bundles, so a web-only change keeps the key.scripts/cmux-next/swift-exports-cache.sh pack|install DIR:packcopies the exports with their stamp.installrefuses, and writes nothing, when the pack has another source key or its files no longer match the digest they were packed with.cmux-next Swift exports cache: after a greenfeat-cmux-nextpush, with checks, generated files, swift test and daemon test all passing, it saves the pack undercmux-next-swift-exports-v1-<key>. A push runs every tier, so the cached exports are the ones the Swift tests checked.Not in this PR:
install.generated-fileson a key hit was dropped. That job also builds cmux-tui and the web bundles, so a key that made the skip safe would almost never hit.Testing
tests/test_swift_exports_key.pyat f721b04 andtests/test_swift_exports_cache.shat 121d476 failed because the scripts did not exist. Both pass at the head.actionlint,tests/test_ci_workflow_guards_are_wired.py,tests/test_cmux_next_route.pyandtests/test_ci_self_hosted_guard.shpass.cmux-next.ymlfail locally, and fail the same way on the base.Changelog
none
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Note
Medium Risk
Touches feat-cmux-next CI routing, optional bot autofix pushes, and new daemon project-list sync from the chats feed; mis-routing or sync bugs could block PRs or skew project state.
Overview
Adds source-keyed caching of cmux-next Swift exports on green
feat-cmux-nextpushes (swift-exports-key.py,swift-exports-cache.sh, newswift-exports-cachejob). Readers are not switched to restore yet; exports stay committed until a follow-up.cmux-next CI gains a Swift canary job (mini-first
swift buildon routed CmuxNext targets) as the merge gate for package-only Swift PRs, while Release compile stays visible butcontinue-on-erroron that class. Path routing exposesswift_canary/tree_fetch_key; PRs that do not touchcmux-tuiuse base tree fallback (CMUX_TUI_TREE_BASE_FALLBACK) and fetch the newest published tree for scheme/daemon jobs. Mac jobs keep side-lane placement through run attempt 3 (bot reruns). A newcmux-next base autofixworkflow (push gated byCMUX_NEXT_BASE_AUTOFIX) commits regenerated artifacts andcargo fmtrepairs after eachfeat-cmux-nextcmux-nextrun.cmux-tui PR/push checks add incremental
cargo fmt --checkviacmux-tui-fmt-changed.pyincmux-tui-spec.yml, with unit tests for package selection and vendored skips.App / daemon:
ProjectsImportmirrors acpmux chat index → daemonproject.observe/project.sync(project-list-v1,ProjectStateClient). MessagesLab replacesHomeAppLinkswithURL.isChiefSubagentLink.Gallery PR matrix adds narrow + normal widths, 4-way render sharding, and a compare-step merge of shard results. CONTRIBUTING documents staged pre-commit formatting for webviews and
cmux-tuiRust.cmux-tui bindings drop large C++ unit test sources from the default test target and remove several in-crate
#[cfg(test)]blocks from the agent-screen-detection example (tests likely relocated or trimmed).Reviewed by Cursor Bugbot for commit beddd34. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by cubic
Adds a source-keyed cache for the cmux-next Swift exports so Linux jobs that only read them can restore them from cache instead of building on a Mac. The branch also carries merged feat-cmux-next work: project imports from editor sources, a base autofix bot, rustfmt checks, SDK unit-test deletion, and earlier sign-in and bundle fixes.
Swift exports cache
swift-exports-key.pyhashes what the export tests compile and read —Packages/,plans/cmux-next, the generators, the CI's Xcode pin — skipping the exports and web bundles.swift-exports-cache.sh pack|installstores exports with a stamp and refuses an install whose source key or output digest mismatches.feat-cmux-nextpush undercmux-next-swift-exports-v1-<key>.install.Merged from feat-cmux-next
ProjectsImportrelays the acpmux chat index into the daemon's project list (project-list-v1); removing a team member revokes their team-bound installs.feat-cmux-nextpushes.cmux-tui-spec.ymlruns rustfmt on touched packages; the pre-commit hook formats staged files.Written for commit beddd34. Summary will update on new commits.