Repository navigation
cmux-next: a peer-route chat's card says "Enroll this Mac on HOST" and enrolls it (peer-route approvals 5/5) - #26202
Conversation
|
Owned by an agent session · session |
|
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)
Passes: CI passes on CI passes on Written by |
f7ae4ce to
74c19a8
Compare
46b435c to
3976a04
Compare
…d enrolls it (peer-route approvals 5/5) A peer of this Mac's acpmux that has not enrolled this Mac refuses its signed one-time Allow and names itself (acpmux `data.peer`). The pane's notice now says "Enroll this Mac on HOST to allow from here" instead of "Remote approvals are off on the other machine", with an Enroll this Mac button that runs the app's own `cmux-tui acp host approvals enroll HOST` (the public key goes to that machine over the person's ssh). Once it is enrolled the notice goes away and Allow on the same prompt counts. An always-allow on a peer's prompt says only a one-time Allow works from this Mac. docs/remote-agents-and-cloud.md: the peer-route bullet says how it works now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-1288bbb2b5d2f5c6b66a
… out signed Review of part 5: the pane counted unsigned peer allows in one counter and read refusals in arrival order, so an Allow that went out unsigned because signing failed offered a useless Enroll, an unsigned answer that failed some other way left the counter stale (hiding a later signed Allow's hint), and replies out of order could name the wrong peer. Each permission answer now records, by its page request id, whether it went out with this Mac's signed allow (AcpmuxDecisionContexts.sent); its reply is read against that and retires it whatever it says. Only a signed Allow's person_required refusal shows "Enroll this Mac on HOST". The counter is gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-1288bbb2b5d2f5c6b66a
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-1288bbb2b5d2f5c6b66a
… out-of-order reply apart Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-1288bbb2b5d2f5c6b66a
…nroll keeps the daemon it was clicked on Review of part 5: the proof state was noted before the request id was admitted, so a second answer under an in-flight page id overwrote the first's, and a failed send left an entry behind; the Enroll task read the pane's socket when it ran, so a reconnect could enroll through another daemon, and a pane with no daemon passed an empty environment. - AcpmuxDecisionContexts.sent is called after ids.begin and every local check, right before the frame goes; a failed send retires it (notSent). - Enroll snapshots the daemon environment on the click and does nothing without a daemon. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-1288bbb2b5d2f5c6b66a
…eer notice; docs say which Allow counts Review of part 5: a permission reply that matched no answer this connection sent (a late one of the connection before a reconnect) was still read as counted and could take the new notice away; now only a reply to an answer recorded since the last reset is read. The docs said the card offers no Allow for this chat; a single prompt's card may still offer an always-allow, which this Mac does not sign. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-1288bbb2b5d2f5c6b66a
bd02c5f to
0c56334
Compare
|
Bead |
|
Found 2 test failures on Blacksmith runners: Failures
|
|
Shipped in:
|
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Peer-route approvals, part 5 of 5: a peer-route chat's card says "Enroll this Mac on HOST to allow from here", and its button enrolls this Mac. This replaces "Remote approvals are off", which gave no way forward. Parts 1 to 4 (#26131, #26133, #26198, #26201) have landed; this PR is on
feat-cmux-next.Leo (2026-10-27): "Why wouldn't you just split it up? ... get the proper reasonable features in. Period. You know? Good, reasonable UI, good reasonable features."
permission.person_requiredwithdata.peer, parts 2 and 3). The pane then shows "Enroll this Mac on HOST to allow from here", a line that says how it works, and an Enroll this Mac button. HOST is the local daemon's name for that peer.cmux-tui acp host approvals enroll HOST --json(part 2) against the daemon this pane talks to (itsACPMUX_HOME/ACPMUX_SOCKET, recorded when the app registered its key there), over the person's ssh environment, the same one Connect to Machine uses.okorfixedthe notice goes away, and the next Allow goes through.acpmux host update HOSTfor a host too old).docs/remote-agents-and-cloud.mdreplaces the "Peer-route approvals are in progress" bullet with what works now, how to enroll and unenroll, and the DEV-build caveat.Localizable.xcstrings, +655); the code and tests are about 500 lines.The five conditions
This PR changes only what the card says and how the Mac enrolls. What it signs and what the peer accepts are unchanged from parts 1 to 4.
allow_once, and now says so on the card.host approvals unenrollandrm. After an unenroll the next Allow is refused, and the hint comes back.Tests (they fail before the fix and pass after)
Swift suites ran on the build fleet (
scripts/ci/package-test-lane.sh).AgentPaneRelayedAllowTests.aPeersRefusalOffersToEnrollThisMacTherechecks that a peer's refusal gives.notEnrolled(peer: "far"), not the generic off notice.anAllowForAPeersPromptCarriesThisMacsSignedOneTimeAllowchecks that an always-allow gives.onceOnly, andaGroupAllowForAPeersPromptsSignsEachMemberthat Allow for this chat does too.anUnsignedAllowsRefusalOffersNoEnroll,eachRefusalIsReadAgainstItsOwnRequestandanAnswerRefusedBeforeItGoesLeavesTheSignedOnesHintcheck that only a signed Allow's refusal offers Enroll: not an unsigned one's, not after an unsigned answer failed some other way, not out of order, and not when a duplicate page id is refused before it goes.AgentPanePeerApprovalsNoticeTests(new): a new reason replaces the notice and a counted answer removes it; Enroll hides the notice once enrolled and says what failed otherwise, does nothing without a daemon, and keeps the daemon it was clicked on through a reconnect; Enroll goes to the daemon the pane talks to; closing the pane takes the notice away; a late reply of the connection before a reconnect says nothing.Before (this PR's tests on the code before this PR):
Review fixes, each test red on the code before its fix:
After (head
bd02c5f, the same commits as this head before the rebase ontofeat-cmux-next):cmux-ci compile-check --appat this head (0c56334): passed (86 s).Captures
Fleet-built app of this stack at
9492ba8(cmux-ci build; the review fixes after it change which refusals show the hint, not how it draws), two acpmux daemons on a capture mini: this Mac's daemon A and a peer B nameddevbox; the chatdevbox/demoruns on B, opened through A. Native clicks on the card.On the capture mini B is a second daemon on the same machine reached at
127.0.0.1, sodevboxis no ssh host and the button'shost approvals enroll devboxfails at ssh, as shown (on a real peer it runs over the person's ssh). The capture then enrolled this Mac on B by hand (host approvals addwith A'sthisMackey) and clicked Allow again; B's pending list was empty afterwards and its turn ended withpermission_decisionyes. The page's own "Only the cmux app can approve this…" line still shows under the card beside the native notice; that line is the page's, unchanged here.No capture:
cmux-ci capturedrives one acpmux daemon, and a peer-route card needs two (this Mac's and the peer's), so it cannot draw this scene; itstour:agent-panerun at this head was refused by the privacy check (the tour shows the capture mini's name). The captures above come from a hand-driven run of a fleet build on a capture mini, as described.Takes back #26201: on purpose. #26201's flush told the pane "remote approvals are off" on any peer refusal; this PR reads each answer's reply against its own request (
takeAnswers), so a signed Allow's refusal shows "Enroll this Mac on HOST" and a counted answer clears it.Review (Codex gpt-6-astra xhigh): SHIP at 0c56334
Agent session: agent session
🤖 Generated with Claude Code