Repository navigation
Cloud VM: a chat move in and folder trust need the caller's vmKind owner, never the VM's record - #26330
Conversation
|
Owned by an agent session · session |
7af51f7 to
40d8fa0
Compare
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
7989fd8 to
da01839
Compare
40d8fa0 to
d5506bb
Compare
… --vm-kind is left out Review of #26330: with no --vm-kind the pump sent no word, so an older Cloud daemon (no agent-transfer-vm-kind-v1) took the chat on its own record. Now an older target that serves fs-v1 (only a Cloud host does), or does not answer identify, is refused before the chat freezes unless the kind is owner. An older Mac or SSH target still needs none (Bring Back Local). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-1288bbb2b5d2f5c6b66a
818574c to
73a5f87
Compare
b45560d to
21a8721
Compare
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
|
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)
|
|
Bead |
|
Found 7 test failures on Blacksmith runners: Failures
|
|
Review (codex gpt-6-astra xhigh, next-review): SHIP at dd29116 No blocking findings. |
…ner, never the VM's record agent-transfer-receive, agent-transfer-finish and agent-session-trust take vm_kind (agent-transfer-vm-kind-v1, agent-session-trust-vm-kind-v1) and use the start's gate: on a Cloud VM they go on only on the caller's exact "owner", team evidence refuses, no word fails closed, and any non-owner word refuses on any host. A page's routed trust cannot vouch for it. cmux link agent move --vm-kind KIND is the caller's word that the target is a Cloud machine: sent on receive and finish to a daemon that takes it, and against an older one any kind but owner is refused before the chat freezes. --to-pid binds the owner word to the Cloud link process it came from (peer pid on the receive/finish connection). The app: Move to Cloud passes --vm-kind owner --to-pid from the running link (CloudMachineLink.ownerPID), else none; remote folder trust uses the start's owner-link check on the connection it was checked for. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-1288bbb2b5d2f5c6b66a
…sh too agent-session-trust, agent-transfer-receive and agent-transfer-finish decode vm_kind with present_nullable, as agent-session-start does, so an explicit null is a word that is not owner and refuses on any host. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-1288bbb2b5d2f5c6b66a
…isolated) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-1288bbb2b5d2f5c6b66a
dd29116 to
e9aed30
Compare
|
The feat-cmux-next push run https://github.com/manaflow-ai/cmux/actions/runs/40612539484 at 132b34c failed: cmux-next checks (god files, concurrency, crash safety, l10n). |
|
Shipped in:
|
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Built on #26323 (PR 3, merged as a6c49db), which adds the app's per-link
vmKindanswer (CloudAttachEndpoint.callerOwnsVM,CloudMachineLink.callerOwnsVM) andvm_kindonagent-session-start. This PR needs that field. It is now rebased onto feat-cmux-next after #26323, with patches identical to the reviewed stack (range-diff=).The rule (claude-sr2, relayed by the area owner): "the kind comes from outside the guest. The client side (the app or the daemon that starts the remote session) asks the Cloud API which kind the VM is, for the signed-in account, and passes that to the remote start; the guest never decides." And: "Agents keep sudo in Cloud VMs". #26323 applied that rule to
agent-session-startonly. A chat move in and folder trust on a Cloud VM still trusted the guest's own/etc/cmux/vm-kindownerrecord, which any agent there can write.What changes
agent-transfer-receive,agent-transfer-finishandagent-session-trusttake avm_kindparam and use the same gate asagent-session-start:vm_kind: "owner".agent_session.host_unverified).Nonepath that took the record is gone:host_gatenow takes a plain bool.agent_session.trust.get/setcannot vouch for the Cloud API's answer. It takes novm_kind(bad_request), so it reaches no Cloud VM's trust.agent-transfer-vm-kind-v1andagent-session-trust-vm-kind-v1.cmux link agent move --vm-kind KIND):ownerthere (host_unverified,side: target) before the chat freezes. What the target advertises (fs-v1or not) never changes that, because a guest can hide any sign of being a Cloud VM.--vm-kind owner|nonefrom the running link's answer, read at the move and never kept. The owner word names the link process it came from:--to-pidisCloudMachineLink.ownerPID. The pump sends the receive and the finish only over a connection whose peer is that process (SO_PEERCRED/LOCAL_PEERPID, viacmux_link::caller::peer_pid, nowpub). So a link that restarts while the source's begin is pending never receives the old link's answer. Because the socket path stays the same, a rerun still resolves an unresolved move.8fa90e61b79). The app reads the link's owner answer (CloudMachineLink.ownerLink, a per-link id) before the connection and again as it sends. A Cloud machine's trust is refused without that answer, through any daemon.vm_kind: "owner"goes only to a daemon whose ownidentifyon that connection listsagent-session-trust-vm-kind-v1.vm_kindother thanowneris refused (host_unverified) on any host for start, move-in and trust, because a guest's root can remove every Cloud sign the daemon reads.Risk
owneranswer./api/vmlink carries it (Cloud link: the attested vmKind decides the VM boundary and app-started chats (owner only) #26323). The app-server link carries none yet, so a move or a trust read through it is refused, and Move to Cloud already refuses that link (linkUnsupported).Tests (cmux-ci, Linux)
b45560da004(on Cloud link: the attested vmKind decides the VM boundary and app-started chats (owner only) #26323's8ad048a1e9c), run https://github.com/manaflow-ai/cmux/actions/runs/40590890295: green. An explicit"vm_kind": nullrefuses on trust, receive and finish, as on start (present_nullable). Tested on a host with no Cloud sign:a_word_that_is_not_owner_refuses_on_any_hostand the trust test. Clippy ran without thecollapsible_ifallowance, because the tip has the fix. Earlier heads, all green:73a5f87134a(run 40589090968),fb6883a2fd1(run 40586211848),d5506bb1052(run 40583784546),40d8fa0661c(run 40570069438),7af51f7ed48(run 40563544239),c0b87266ae7(run 40558028188).-D warnings. (The earlier runs allowedclippy::collapsible_ifbecause Cloud link: the attested vmKind decides the VM boundary and app-started chats (owner only) #26323's old base had that red.)cmux-tui-coreserver::: 1069 passed.cli agent_session: 36 passed.link_agent_move,cloud_move_journey,machine_update_journey,bring_back_journey,access_request_journey: all passed.link::bin tests: passed.a_cloud_vm_takes_a_chat_only_on_the_callers_owner_word: a receive with no word succeeded on the owner record.agent_session_trust_on_a_cloud_vm_needs_the_callers_owner_word: a trust read with no word succeeded.the_cloud_apis_kind_reaches_the_target_or_an_older_one_is_refused: the pump has no--vm-kind. At the head this test also covers an older target that advertises nothing Cloud-like, given--vm-kind teamornone: it is refused beforeagent-transfer-begin.link_agent_move::the_owner_word_reaches_only_the_link_process_it_came_from: with another process at the socket, the pump sends no receive and novm_kind, and the chat is given back. With the same process, the chat moves withowner.CloudLinkReconnectingTests.theOwnerWordNamesTheLinkProcessItCameFrom(Swift):ownerPIDis the link's pid, nil once the link ends, and the replacement's own pid after that.cloud_move_journeyandmachine_update_journeynow pass--vm-kind owner/vm_kind. The journey also checks that the bare andteamforms are refused.AgentSessionStartOwnerLinkTests.aCloudTrustCallGoesOutOnlyOnTheOwnerAnswerOfTheSameLink(real line socket);CloudMoveTestsnow expects--vm-kind nonewith no owner link. Compiled by PR CI only.No capture: nothing visible changes. The Swift edits only decide whether
--vm-kind owner/vm_kindis sent for Move to Cloud and remote folder trust. A refusal shows through the existingagent_session.host_unverifiedstrings, and a fleet capture mini has no live owned Cloud link to show either path.Agent session: agent session
🤖 Generated with Claude Code