acpmux: a peer's _acpmux/resolve error names none of this host's peers
Follow-up to #26860. These are the two remaining findings from my Codex review of #26860, which #26860 landed without.
Leo's words, which the peer-state feed serves: "you can just not choose a project ... you just get a little green dot ... as if you were working on your own computer, but now it's remote."
Change
- P1:
_acpmux/resolvenamed this host's peers to a peer daemon. Its not-found error (hub/locate.rsunfound) listed every peer and each down peer's state, such ason <host> or its peers (gone); not connected now: gone (offline). #26860 emptiespeersonly in successful replies, so this error still reachedOrigin::Peerconnections, including pairedclientdevices.server/requests.rsnow passesnames_hosts: falseforOrigin::Peer, which is the answer a read-only device already gets: no host or peer names. Nothing on a peer reads this error's text. - P3: the lag assertion now proves the snapshot.
tests/peer_state_origin.rsasserted onlyheard.len() > 1, which the notes still in the feed satisfy even with no snapshot. Now peerychanges once, before a burst of 600 notes pushes its note out of the 256-slot feed. The unix-socket watcher must still gety, and only the snapshot carries it.
Test: fails before, passes after
The test now also checks that the _acpmux/resolve not-found error names gone on the unix socket and not to the peer.
- Before (the same test with the old
requests.rs), cmux-ci fast-checks 03fcb2639b0b:a peer's resolve named this host's peers: no session named, with the id or carrying the bead "no-such-session" on ip-172-31-73-130 or its peers (gone); not connected now: gone (offline) test result: FAILED. 0 passed; 1 failed - After, at head 4ab4b608, cmux-ci run https://github.com/manaflow-ai/cmux/actions/runs/40700431338:
- fmt passed, and
peer_state_originpassed 3 out of 3 runs. - Integration tests passed:
peer_state_events1,peer_origin4,peer_status4,peer_lease8,web_token_exposure6,peer_integration50. clippy -D warningswas clean.--libhad one failure, the unrelatedcli::codex_auth_brokerflake, which also fails on base. On rerun, https://github.com/manaflow-ai/cmux/actions/runs/40701234744,--libpassed 1637 out of 1637 andcodex_auth_brokerpassed 3 out of 3 runs.
- fmt passed, and
Review
An independent Codex review (gpt-6-astra, high effort, fast mode) at 4ab4b608 returned VERDICT: SHIP. It also named two older peer-name disclosures that this PR does not change, as follow-ups:
- an admission warning or
suggestedHostcan name another peer; - a
peer_down_forerror for aname/...session id carries that peer's state and connection error.
Takes back #25111: it does not undo it. #25111 added conn.auth != ConnAuth::ReadOnlyDevice to the _acpmux/resolve call; this PR extends that same condition with && conn.origin != Origin::Peer, so a read-only device keeps #25111's answer and a peer daemon now gets the same one.
Capture
No capture: no UI change. This touches the daemon's error text for peer connections only.
Risk
Low. The change only removes peer names from one error sent to Origin::Peer connections. The unix socket, the app and Web connections are unchanged.
Agent session: agent session
š¤ Generated with Claude Code