feat(runtime-host): manage peer meshes from Desktop - #4092
Conversation
jackwener
left a comment
There was a problem hiding this comment.
I reviewed exact head c1615f761e613c50843fca43bac3b91bc4bf5b1a and found no blocking issue.
The new management surface preserves the important authority boundaries: Peer Mesh operations are absent from the closed remote-owner grant list, managed SSH connects through the Host's local-owner channel, and one-time invitation material is sent over stdin rather than process arguments. Persistent state is namespaced by the native peer identity, the protocol change advances the compatibility epoch to 61, inputs and projections are bounded, and the current-main synthetic merge is clean.
One non-blocking follow-up: peer.mesh.reconcile currently maps every thrown error to “could not reach any current route.” Reconciliation can also persist route or roster updates, so PeerMeshPersistenceError and PeerMeshPostCommitError should retain the same persistence_failed / commit_outcome_unknown classification used by the other Mesh mutations. The operation is fail-closed and reconciliation is idempotent, so I do not consider this an approval blocker, but the current message can misdiagnose a storage failure as network unavailability.
The exact-head hosted workflows were still running when I submitted this review.
Posted by an automated review agent operated by @WAWQAQ. This is not an
independent human review and does not satisfy the committer review required by
CONTRIBUTING.md. A human is accountable for this comment — please push back if
anything here is wrong.
简体中文
本条评论由 @WAWQAQ 运行的自动化审查程序发出。它不构成 CONTRIBUTING.md
所要求的独立人类审查,也不能替代人类审查。有人类对本条评论负责,如有错误请直接指出。
Add owner-only Mesh management operations and expose them through the CLI and Desktop local or SSH-managed endpoints. Preserve Mesh state by peer identity and keep invitations out of command arguments. Generated-by: OpenAI Codex
Validate the managed target before requesting a one-time invitation. Commit Mesh creation atomically, preserve durable failure outcomes, and connect resident owner failure to Host shutdown. Keep optional Desktop Mesh state from blocking Direct peer startup and use one wire invitation contract. Generated-by: OpenAI Codex
9bc882a to
3823f48
Compare
Return authoritative post-operation snapshots, keep invitation I/O line-safe, and bound reconciliation work. Propagate terminal Mesh persistence failures while preserving Direct peer fallback where Mesh is optional. Generated-by: OpenAI Codex
English
Summary
Complete the operator and Desktop management slice for experimental Runtime Host Peer Meshes:
Remote principals do not receive these operations. Manual direct-peer listeners remain direct-only; managed peer services opt into resident Mesh state explicitly.
Refs #3842
Verification
npm run buildnpm run typechecknpm run lintnpm run format:checknpm run astryx:surface-inventorynpm run check:asf-headersnpx knip --workspace apps/desktopnpx knip --workspace packages/uiScreenshots
Two-member cross-machine Mesh after reconciliation:
The same Desktop Mesh persisted after restart:
简体中文
概要
完成实验性 Runtime Host Peer Mesh 的 operator 与 Desktop 管理闭环:
Remote principal 不会获得这些操作。手动 direct-peer listener 仍保持 direct-only;只有 managed peer service 会显式启用 resident Mesh state。
关联 #3842
验证
npm run buildnpm run typechecknpm run lintnpm run format:checknpm run astryx:surface-inventorynpm run check:asf-headersnpx knip --workspace apps/desktopnpx knip --workspace packages/ui截图
英文部分中的截图分别展示了真实跨机器的双成员 Mesh,以及 Desktop 重启后的 Mesh 持久化结果。
AI use
Select exactly one:
Tool(s) and scope: OpenAI Codex assisted with implementation, tests, cross-machine verification, and pull request preparation under the contributor's direction. Human review and merge approval remain pending.
Checklist
Does this PR entail a change in behavior?