Repository navigation
cmux-cloud-start-core: the Cloud start's harness login decision in Rust over the app FFI (step A) - #32305
Conversation
…st, served over the app FFI (step A) The NEXT Cloud start's harness login decision (the App's CloudHarnessLoginDecision and CloudStartChat.loginProvider: the step, the reason, readsMachine, guestTakesLogin, skippedTeamMachine, the record line, the harness family to provider map and the guest vm-kind probe and parse) moves to a new pure crate, cmux-cloud-start-core. cmux-layout-reducer-ffi's JSON channel serves it as ops cloud_harness_login, cloud_harness_login_provider, cloud_guest_kind and cloud_guest_kind_probe. Step A of a two-step FFI move: step B re-pins the app FFI, makes the Swift side call these ops and deletes the Swift copy and its tests (CloudStartChatLoginTests' decision cases). No app behavior change here. Wiring: workspace member, app-ffi lock entry, the app FFI release push path, the app crate license gate's first-party list and the swift job route. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-548f18c0a6d1ebb48240
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
Shipped in:
The feat-cmux-next push run https://github.com/manaflow-ai/cmux/actions/runs/41454213833 at 986d466 failed: cmux-next checks (god files, concurrency, crash safety, l10n). |
|
Owned by an agent session · session |
|
Found 6 test failures on Blacksmith runners: Failures
|
|
Review (codex, router-review): SHIP at 119ca32 Reviewer: codex gpt-6.1-sol xhigh, fast tier. SHIP at 119ca32 Visual verdict: no images; Leo tries the build I found no correctness, regression, security, or integration issues. License and app FFI release path checks pass; Cargo was unavailable in this box for local Rust execution. Follow-ups: none |
#32305 changed app FFI sources (cmux-cloud-start-core harness login) without a re-pin, so the cmux-next checks FFI pin step went red on base. Same diff as the release bot's #32121. Agent-Session: https://cmux.com/deeplink/agent?id=aid-1fa4777434cab9ff131a Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…, which also carries #32305's ops) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-548f18c0a6d1ebb48240
…ift copy and its tests go (step B) (#32403) * CmuxNext Cloud: the start's harness login decision calls cmux-cloud-start-core; the Swift copy and its tests go (step B) Re-pins CCmuxAppFFI to cmux-app-ffi-8b624259cf79 (#32305, which added the cloud_harness_login* ops). CloudHarnessLoginDecision keeps what the start knows and reads the step, the reason, readsMachine, guestTakesLogin, skippedTeamMachine and the record line from the Rust rules in one FFI call; loginProvider, the vm-kind probe and its parse are FFI calls too. An FFI that does not answer skips the login with reason ffi-failed (never silent). CloudStartChatLoginTests drops its six decision tests (the Rust crate's 10 cargo tests cover every case) for one bridge test; the build gate's UserDefaults tests stay, since that read stays in Swift. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-548f18c0a6d1ebb48240 * CCmuxAppFFI: pin cmux-app-ffi-2b457e203eac (base's newest FFI release, which also carries #32305's ops) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-548f18c0a6d1ebb48240 --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The repin job now runs check-app-ffi-pin.sh --verify-release before it pushes app-ffi-repin, and writes the pin through GitHub's contents API so the commit is the release App's, signed by GitHub. The review reconciler reviews such a PR on first sight and the lander lands it, so base is red on the FFI pin for about the build time instead of until someone notices (#32305, #31927, #32436). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-1fa4777434cab9ff131a
The repin job now runs check-app-ffi-pin.sh --verify-release before it pushes app-ffi-repin, and writes the pin through GitHub's contents API so the commit is the release App's, signed by GitHub. The review reconciler reviews such a PR on first sight and the lander lands it, so base is red on the FFI pin for about the build time instead of until someone notices (#32305, #31927, #32436). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-1fa4777434cab9ff131a
#32477) The repin job now runs check-app-ffi-pin.sh --verify-release before it pushes app-ffi-repin, and writes the pin through GitHub's contents API so the commit is the release App's, signed by GitHub. The review reconciler reviews such a PR on first sight and the lander lands it, so base is red on the FFI pin for about the build time instead of until someone notices (#32305, #31927, #32436). Agent-Session: https://cmux.com/deeplink/agent?id=aid-1fa4777434cab9ff131a Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Leo: "But why are there so many tests in Swift? It's Cloud code. Why is it not in Rust?" and "Why are there so many of these tests in the first place?"
What
Step A of a two-step app FFI move: the NEXT Cloud start's harness login decision moves to Rust.
cmux-tui/crates/cmux-cloud-start-core(harness_login): the step and reason acloud.startChatstart takes about its machine's Claude login,readsMachine,guestTakesLogin,skippedTeamMachine, the one-line record for the log andcloud.machines, the harness-family-to-provider map, and the guest/etc/cmux/vm-kindprobe and its parse. A 1:1 port of the app'sCloudHarnessLoginDecisionandCloudStartChat.loginProvider.cmux-layout-reducer-ffi's JSON channel serves it ascloud_harness_login,cloud_harness_login_provider,cloud_guest_kindandcloud_guest_kind_probe.cmux-app-ffilock entry, the app FFI release push path, the app crate license gate's first-party list (and its test), and the swift job route.Step B (next PR, after the FFI release this merge publishes): re-pin
CCmuxAppFFI, makeCloudHarnessLoginDecisiona thin caller of these ops, and delete the Swift copy and the decision cases inCloudStartChatLoginTests(6 of its 8 tests; the 2 kept test the build gate'sUserDefaultsread, which stays in Swift). No app behavior change in this PR.check the app FFI pinis expected red here: the FFI sources change without a new pin, as in every step A (#31945, #32055).Tests
Ran on the fleet (
cmux-ci test, run 41449956072, at 119ca32):cargo test -p cmux-cloud-start-core: 10 passed (every case of the SwiftCloudStartChatLoginTestsdecision tests, plus the wire shape and the probe run undersh).cargo test --test cloud_harness_loginincmux-layout-reducer-ffi: 4 passed (the ops through the C ABI).cargo clippy --all-targets -D warningson both crates: clean.python3 -m unittest tests.test_app_crate_licenses,scripts/cmux-next/tests/app-ffi-release-paths.test.sh: pass.Changelog
none
🤖 Generated with Claude Code
Agent session: agent session
Summary by cubic
Moves the NEXT Cloud start's harness login decision from Swift to a new Rust crate (
cmux-cloud-start-core), served to the app overcmux-layout-reducer-ffi's JSON channel. This is step A of a two-step migration: no app behavior changes here.CloudHarnessLoginDecisionandCloudStartChat.loginProvider(1:1), including the step, reason, machine-reading flags, log record, harness-to-provider map, and guest/etc/cmux/vm-kindprobe.cmux-layout-reducer-ffiexposes it ascloud_harness_login,cloud_harness_login_provider,cloud_guest_kind, andcloud_guest_kind_probeops.Migration
Step B (next PR): re-pin
CCmuxAppFFI, make the SwiftCloudHarnessLoginDecisioncall these ops, and delete the Swift copy plus 6 ofCloudStartChatLoginTests' 8 test cases.check the app FFI pinis expected red here.Written for commit 119ca32. Summary will update on new commits.