fix(peer): keep Mesh and shared-session routes live - #4444
Open
M4n5ter wants to merge 13 commits into
Open
Conversation
M4n5ter
force-pushed
the
fix/session-share-peer-route-liveness
branch
from
September 1, 2026 07:59
2badc5f to
ef5195a
Compare
M4n5ter
marked this pull request as ready for review
September 1, 2026 09:14
jackwener
approved these changes
Sep 1, 2026
jackwener
left a comment
Member
There was a problem hiding this comment.
Approved at exact head 62a7b3823dcb88225de30a4ecc47dd8f24831a5c at the explicit direction of M4n5ter. No technical review was performed as part of this action; M4n5ter requested the approval and accepts responsibility for subsequent handling.
Review notice: This approval was submitted by an automated review agent operated by WAWQAQ and is published at the direction of M4n5ter, who requested this action and is the human accountable for it.
M4n5ter
force-pushed
the
fix/session-share-peer-route-liveness
branch
7 times, most recently
from
September 1, 2026 16:28
3130765 to
06d7f7c
Compare
Generated-by: Codex
M4n5ter
force-pushed
the
fix/session-share-peer-route-liveness
branch
from
September 1, 2026 16:57
06d7f7c to
4a5598e
Compare
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.
English
Summary
Keep Peer Mesh and Session collaboration reachable through the running Runtime Host's live peer endpoint, recover idle connections promptly, and make durable Guest Turn requests visible wherever the Owner is working.
The failures came from independent liveness gaps that compounded:
This change:
host.status;Retained Guest mounts, grants, and Session identity survive Client shutdown. After restart, the existing reconnect lifecycle re-authenticates the mount and combines its durable invitation with current signed Mesh routes. A changed direct address or Relay reservation is republished and fetched rather than requiring the Session to be shared again. Recovery still requires at least one physically reachable direct, Circuit Relay v2, or approved member-transit path; mutations with an unknown outcome are never replayed.
Compatibility epoch 89 requires the Desktop Client and Runtime Host to be updated together because
host.statushas an exact wire shape and the Turn-request query now supports an Owner-wide inbox.Verification
origin/maingit diff --checkon the changed filescargo test --locked --manifest-path native/runtime-host-peer/Cargo.toml: 21/21 passedcargo clippy --locked --all-targets --manifest-path native/runtime-host-peer/Cargo.toml -- -D warnings中文
摘要
让 Peer Mesh 与 Session 协作始终使用正在运行的 Runtime Host 的实时 peer endpoint 保持可达,及时恢复空闲断连,并让持久化的 Guest 轮次请求在 Owner 当前工作的任何位置都可见。
此前有七个相互叠加的存活性缺口:
本次修改:
host.status发布有界的实时 peer endpoint;Guest Client 关机不会删除已保留的 mount、grant 或 Session identity。重新启动后,既有重连生命周期会重新认证,并把持久邀请码与当前签名 Mesh 路由合并;直连地址或 Relay reservation 变化后会重新发布和获取,无需再次分享 Session。恢复仍要求至少存在一条物理可达的 direct、Circuit Relay v2 或已批准成员转发路径;结果未知的 mutation 绝不会自动重放。
由于
host.status是严格 wire shape,且轮次请求查询新增 Owner 全局收件箱语义,本次将兼容 epoch 提升到 89;Desktop Client 与 Runtime Host 需要一起更新。验证
origin/main的 renderer architecture ratchetgit diff --checkcargo test --locked --manifest-path native/runtime-host-peer/Cargo.toml:21/21 通过cargo clippy --locked --all-targets --manifest-path native/runtime-host-peer/Cargo.toml -- -D warningsScreenshots
Owner-wide notification and persistent per-Session count while another Session is active:
Exact-intent approval at the target Session:
Invitation reachability carried by the exact copied code:
AI use
Tool(s) and scope: OpenAI Codex diagnosed the connection, route-liveness, catalog-classification, and approval-discovery paths, implemented the changes, and added focused tests under maintainer direction and review.
Checklist
Does this PR entail a change in behavior?