refactor(runtime-host): fence peer connection attempts - #4403
Merged
Conversation
M4n5ter
marked this pull request as ready for review
September 1, 2026 00:00
jackwener
approved these changes
Sep 1, 2026
jackwener
left a comment
Member
There was a problem hiding this comment.
Approved at exact head 602cbb89a11f13879b8ddbb167c2816e17d11118 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.
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
Outcome
Give every outbound peer connection attempt one closed lifecycle before adding another direct transport. The attempt owns one immutable target PeerId, deadline, cancellation token, and winner commit; late or losing completions are discarded without disturbing the existing connection.
Scope
This is stack 1/4 for #4382 and intentionally has no WebRTC behavior or UI.
Verification
cargo fmt --checkcargo clippy --locked --all-targets -- -D warningscargo test --locked中文
结果
在加入第二种直连 transport 前,先让每次 outbound peer connection attempt 只有一个封闭生命周期。该 authority 固定 target PeerId、deadline、cancel 与唯一 winner;迟到或失败的 completion 不会污染现有连接。
范围
这是 #4382 的第 1/4 层;本 PR 不加入 WebRTC 行为或 UI。
验证
cargo fmt --checkcargo clippy --locked --all-targets -- -D warningscargo test --lockedAI use
Tool(s) and scope: OpenAI Codex implemented and verified the bounded attempt lifecycle under human direction. The human contributor owns review and merge decisions.
Checklist