feat(runtime-host): reconcile peer Mesh transit - #4144
Conversation
4ee83d8 to
3624e0d
Compare
3624e0d to
45ecbe9
Compare
45ecbe9 to
a4e24cc
Compare
jackwener
left a comment
There was a problem hiding this comment.
I reviewed exact head a4e24ccb4b014474ff0daf1b1e5e5a74c04ec69e against its stacked base 99fc779aedf69035dcad1e5170c78df6a549e07b.
The selected Mesh remains durable desired state, signed route records scope transit capability to active shared membership, native relay admission stays closed to the configured roster, and membership removal or Mesh closure withdraws routes, reservations, active connections, and pending transit attempts. Native retries resolve current relay addresses rather than persisting stale endpoints.
The Runtime Host build passed; its compiled test suite passed 1,357 tests with 9 platform/environment skips, the 18 focused peer tests passed, and Biome, Rust formatting, and git diff --check passed. Exact-head hosted CI, admission quality, Windows recovery, package validation, and native platform builds are green.
This approval is scoped to the stacked base. Current main has an independent Mesh-status change that conflicts in peer-mesh/node.ts; the stack must preserve that active-membership filter when it is rebased before landing.
Automated review notice: This comment was posted by an automated review agent operated by WAWQAQ. It is not an independent human review and does not replace one.
a4e24cc to
6cf2723
Compare
Persist one selected Mesh as transit desired state, advertise that scoped capability in signed routes, and reconcile native provider and reservation policy as membership changes. Refs #3842 Generated-by: OpenAI Codex
Require a transit route's peer to remain a current member of the advertised Mesh. Accept an identical roster already committed by concurrent reconciliation so invitation joins remain idempotent. Generated-by: OpenAI Codex <codex@openai.com>
Derive trusted relay identities from one canonical relay-address set and admit the full bounded Mesh roster. Native reservation and circuit limits continue to cap actual resource use. Generated-by: OpenAI Codex <codex@openai.com>
Carry relay candidates with their signed peer identity, bound the desired policy before native reconciliation, and keep automatic relay ownership independent. Treat a durable transit selection as desired state while convergence retries.
Reuse the canonical relay candidate normalization when resolving application routes so signed hints cannot substitute or poison relay identities.
Resolve application transit by reconciled relay identities instead of signed address strings, and derive reservation demand from the canonical transit address set.
Treat policy replacement as an in-flight boundary by aborting pending application connections that still reference a removed relay.
Keep cancellation, timeout, and transit revocation triggers distinct while routing their resource cleanup through one lifecycle owner.
Route native open failures through the same pending-connect cleanup owner used by cancellation, timeout, and transit policy replacement.
Resolve relay addresses from the current native policy on every retry. Preserve viable direct and relay paths when one transit candidate is revoked. Generated-by: OpenAI Codex
Assert the active-membership status contract after closing a transit Mesh instead of expecting an inactive record that the Host no longer projects. Generated-by: OpenAI Codex
6cf2723 to
d4f9923
Compare
English
Summary
Persist one selected Peer Mesh as the local transit desired state and reconcile it into the native Relay v2 policy. Signed route records scope transit capability to that Mesh, while membership removal or Mesh closure withdraws access and reservations automatically.
This PR is stacked on #4142.
Refs #3842
Verification
cargo test --manifest-path native/runtime-host-peer/Cargo.toml --locked --all-targets --all-featurescargo clippy --manifest-path native/runtime-host-peer/Cargo.toml --locked --all-targets --all-features -- -D warningsnpm --workspace @maka/runtime-host run typechecknpm --workspace @maka/runtime-host run buildAI use
Tool(s) and scope: OpenAI Codex assisted with implementation, tests, and validation.
Checklist
Does this PR entail a change in behavior?
中文
概要
将一个选定的 Peer Mesh 持久化为本机 transit desired state,并将其协调为 native Relay v2 策略。签名路由记录将 transit 能力限定在该 Mesh 内;成员被移除或 Mesh 关闭时,访问权限与 reservation 会自动撤销。
本 PR stack 在 #4142 之上。
Refs #3842
验证
cargo test --manifest-path native/runtime-host-peer/Cargo.toml --locked --all-targets --all-featurescargo clippy --manifest-path native/runtime-host-peer/Cargo.toml --locked --all-targets --all-features -- -D warningsnpm --workspace @maka/runtime-host run typechecknpm --workspace @maka/runtime-host run buildAI 使用
工具与范围:OpenAI Codex 协助实现、测试与验证。
检查清单
本 PR 是否改变行为?