Repository navigation
CmuxNext Cloud: the start's checks, the vm-kind word, the machine login reading and one harness login call ask Rust; the Swift copies and their tests go (step B) - #32476
Conversation
…in reading and the harness login call Rust; the Swift copies and their tests go (step B) 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/41493651131 at f561b65 failed: cmux-next checks (god files, concurrency, crash safety, l10n). |
|
Review (codex, router-review): SHIP at 2e8856c Reviewer: codex gpt-6-astra high, fast tier. Follow-ups: 2. Each lands as an issue in this repo that links this receipt; the lane that opened the PR fixes it forward. SHIP at 2e8856c Visual verdict: no images; Leo tries the build Static review covered the Rust FFI schemas and changed Swift call sites; Swift/Cargo were unavailable for local tests. Follow-ups:
|
Leo: "BUT WHY THE FING ARE THERE SO MANY TESTS IN FING SWIFT / IT'S CLOUD CODE / WHY IS IT NOT IN RUST". New logic goes in Rust; Swift stays a thin shell.
Step B of #32436: re-pins the app FFI to
cmux-app-ffi-17b75935f08e(built from #32436's merge;check-app-ffi-pin.sh --verify-releasepasses). The Swift copies of the decisions now incmux-cloud-start-corebecome calls, and their tests go. Each is a 1:1 port with no behavior change.CloudHarnessLoginDecisionholds the raw facts: the build and its setting, the harness, the guest probe's stdout and the machine login probe's output. It askscloud_harness_loginonce per step and reads the gate, the provider, the guest kind, the machine login and the probe text off that one answer. The app no longer callscloud_harness_login_provider,cloud_guest_kindorcloud_guest_kind_probe, so an FFI that does not answer always recordsffi-failedand never reads asno-transfer-for-harnessorguest-kind-unread. ThepassesHarnessLogin(isDogfoodBuild:setting:)precedence moves to Rust; Swift keeps only the defaults read.CloudStartChat.refusal,accountTextandcheckAccount,CloudMoveFolder.isTooBroadandAgentPaneCloudStart.uploadscallCloudStartCore(new, in CmuxNextCloud, which now linksCCmuxAppFFI). Swift keeps the disk reads: standardizing, realpath and the working copy's git folders, the last only when Rust asks for it.CloudAttachEndpoint.callerOwnsVMandcallerIsTeammateandCloudMachineLink.vmKindArgumentscall it. So do the app server's connect answer (CloudConnectOpResolver) and the twovmKind == "owner"reads (CloudService.callerOwnsVM, the Codex broker target), which now usecallerOwnsVM.CloudMachineLogin.parseandneedsLoginare gone. The probe output goes into the decision, andfingerprintcalls Rust.When the FFI does not answer, each call fails safe: no login is passed, the start is refused or stops, nothing is copied, and the machine stays sandboxed.
Not touched:
CloudMachineCreateFlow,CloudConfiguration, andAgentSessionAttachClient.startParams.startParamsis the daemon client's start for every session, local ones too; CmuxNextDaemon does not link the FFI, so its three tests inCloudVmKindTestsstay.Swift tests removed (their cases are cargo tests from #32436)
CloudStartChatLoginTests.theSettingWinsElseOnlyDogfoodBuildsPassALogin→the_setting_wins_else_only_dogfood_builds_pass_a_loginCloudStartChatAppLinkTests.aStartOnTheAppServerLinkIsNotRefused,CloudStartChatMachineTests.aCloudStartIsRefusedOnlyWhenCloudIsOffOrNobodyIsSignedIn→a_cloud_start_is_refused_only_when_cloud_is_off_or_nobody_is_signed_inCloudStartChatMachineTests.aSendIsKeptUnderTheAccountItBeganInAndChecksItAtEveryStep→a_send_is_kept_under_the_account_it_began_in_and_checks_it_at_every_stepCloudStartChatMachineTests.aPageNamedFolderIsCopiedOnlyAsItsCheckedUploadRoot→a_page_named_folder_is_copied_only_as_its_checked_upload_root,a_tabs_own_folder_is_copied_only_as_itself_below_home,the_home_check_reads_every_spelling,the_home_folder_and_the_disks_root_are_too_broadCloudVmKindTests.onlyOwnerStartsTheLinkAtTheVMBoundary,anOlderServerKeepsTheSandboxAndAMalformedValueIsNeverOwner→vm_kindtests. The decoder half (a non-string value fails the attach) stays in Swift as one test.CloudMachineLoginTests.onlyAMissingOrRejectedLoginIsReplaced,theProbesWordIsTheAnswerElseItsExitCode→machine_logintestsTwo thin wiring tests replace them:
CloudStartChatMachineTests.theStartsChecksComeFromTheRustRulesand the rewrittenCloudStartChatLoginTests.theDecisionComesFromTheRustRules.Tests
cmux-ci compile-check --package CmuxNextat 71b4041 (this change before the re-pin; the C header is unchanged): passed.cmux-ci run --script scripts/ci/run-swift-testing-suites.shat 2e8856c (this head, the new FFI pin),CMUX_SWIFT_TEST_SUITES=CloudStartChatLoginTests,CloudMachineLoginTests,CloudStartChatMachineTests,CloudStartChatAppLinkTests,CloudMoveAppLinkOwnerTests,CloudVmKindTests,CloudStartSessionTests: 7 suites passed, 0 failed. That includes the scratch-machine probe tests, which now read the probe's output through the decision call, andtheSessionsMachineTakesTheHarnessLoginStep.Observed / Not run
Observed: the compile check, the pin verification, the seven suites above at this head, and #32436's cargo runs. Not run: the full CmuxNext suite (this PR's CI runs it) and a DEV build Cloud start.
Changelog
none
Agent session: agent session
🤖 Generated with Claude Code