Repository navigation
acpmux: the caller's side of the VM boundary (vmBoundary lease, saved peer, forwarding) - #26309
Merged
Merged
Conversation
… peer, forwarding) A caller holds its own opt-out for a peer's remote chains: `vmBoundary` on a saved peer (config.json, followed at a reload) or on `_acpmux/peer_lease` (held with the lease, never saved). Each `session/new` it forwards there for the person's own clients (unix socket, the app, its own peer daemon) carries `_meta.acpmux.vmBoundary: true`; the field from any client is dropped first. A request forwarded for a paired machine says `via: device`, so the peer never takes it for the owner's. The guest ignores the field until it takes the boundary (next PR): no behaviour changes on any machine yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-1288bbb2b5d2f5c6b66a
Collaborator
Author
|
Owned by an agent session · session |
Collaborator
Author
|
Bead |
|
Found 2 test failures on Blacksmith runners: Failures
|
teamleaderleo
temporarily deployed
to
sentry-dsyms
October 27, 2026 17:53 — with
GitHub Actions
Inactive
teamleaderleo
temporarily deployed
to
artifacts
October 27, 2026 17:53 — with
GitHub Actions
Inactive
teamleaderleo
temporarily deployed
to
artifacts
October 27, 2026 18:01 — with
GitHub Actions
Inactive
teamleaderleo
temporarily deployed
to
artifacts
October 27, 2026 18:10 — with
GitHub Actions
Inactive
teamleaderleo
temporarily deployed
to
artifacts
October 27, 2026 18:13 — with
GitHub Actions
Inactive
teamleaderleo
marked this pull request as ready for review
October 27, 2026 19:20
Contributor
|
Shipped in:
|
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
The caller's side of the VM boundary. A caller keeps its own opt-out for a peer's remote chains, and forwards it only for the person's own clients. No machine's behaviour changes yet: the guest ignores the field until #26276 (the guest's side) lands.
The design, as agreed with 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".
PR 2a of the series. The order:
vmKindCloud attach-endpoint: report vmKind (owner only for the caller's own personal VM) #26222 (live).--vm-kind ownerinto the lease, only when the Cloud API answered"owner"for the signed-in caller.This was one PR. I split it to keep each part under about 800 lines.
What changes
Saved peer:
vmBoundary: trueon a saved peer in the caller's own config.json, for a VM its fleet registry calls a dedicated agent VM.peer_addnever sets it, and a re-add of the same name and URL keeps it. A config reload applies the file's value to the running peer (same URL only) with no reconnect. A leased peer keeps its lease's value.Cloud link lease:
_acpmux/peer_lease {vmBoundary: true}(unix socket only). PR 3's link sends it only when the Cloud API said this caller owns the VM. It is held with the lease and never saved. Only the JSON valuetruecounts.Forwarding: each
session/newthe caller forwards to such a peer carries_meta.acpmux.vmBoundary: true, but only for the person's own clients (vm_boundary::owner):LocalApp);PeerTokenandControl::Peer).It is never added for a Web client, the listener token, a paired machine (
Device,ReadOnlyDevice) or a request held to the Web's rules. AnyvmBoundarythe client sent itself is dropped first.via: device: a request this daemon forwards for a paired machine'sclientcredential, which is served as a peer, now saysvia: device. The peer then never takes it for the owner's. An older peer ignores the mark, and its folder-trust gate treats it as before (novia).Risk
Low. Nothing reads the field on the guest yet. The lease takes one more optional param, and the forwarded
session/newcarries one more_metakey that older daemons ignore (vmBoundaryis not a mode field).Tests
tests/peer_lease.rsa_vm_boundary_lease_forwards_the_boundary_for_the_persons_own_clients_onlyuses a fake peer that records each forwardedsession/new:vmBoundarylease, the unix socket's and the app's starts carryvmBoundary: true.vmBoundary: trueitself.via: weborvia: device.a_reload_takes_a_saved_peers_vm_boundary_backchecks that a reload turns a saved peer's boundary off and on again with no reconnect. Unit tests coverforwardsandowner.Before and after
On base 370fc61, with only the new forwarding test:
On base, a plain lease forwards the client's own
vmBoundary.At this head (cmux-ci, Linux):
The full
cargo test -p acpmuxfails on the tip the same way it fails here: agent_tools, codex_auth_broker, daemon_chat_open, ephemeral_run, hermetic_daemon_guard and session_pool.Agent session: agent session
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Implements the caller's side of the VM boundary: a caller marks a peer as a VM it owns, and its daemon forwards
_meta.acpmux.vmBoundary: trueonsession/newfor that peer. The mark comes from a saved peer'svmBoundaryin config.json (a reload applies the file's value with no reconnect) or from_acpmux/peer_lease {vmBoundary: true}, which is held with the lease and never saved.vmBoundarya client sends itself is dropped first.via: deviceso the peer never treats them as the owner's.Written for commit ce17613. Summary will update on new commits.