Skip to content

feat(runtime-host): race WebRTC direct upgrades - #4405

Merged
M4n5ter merged 4 commits into
feat/runtime-host-webrtc-direct-upgradefrom
feat/runtime-host-webrtc-adaptive-direct
Sep 1, 2026
Merged

feat(runtime-host): race WebRTC direct upgrades#4405
M4n5ter merged 4 commits into
feat/runtime-host-webrtc-direct-upgradefrom
feat/runtime-host-webrtc-adaptive-direct

Conversation

@M4n5ter

@M4n5ter M4n5ter commented Aug 31, 2026

Copy link
Copy Markdown
Member
English

Outcome

Make WebRTC a second direct attempt under the same connection authority instead of a serial fallback or parallel networking product. QUIC/DCUtR and WebRTC can progress concurrently; the best authenticated direct connection commits once and closes the losing direct work, while approved member transit keeps its existing timing and admission rules.

Scope

  • Start the bounded WebRTC upgrade from eligible authenticated coordination connections.
  • Race direct paths without stacking their timeouts.
  • Keep application-stream admission on direct or explicitly trusted transit connections only.
  • Rank established direct candidates deterministically (QUIC, TCP, WebRTC, then other) before the single application-stream commit.
  • Classify the winning peer path as direct QUIC/WebRTC/TCP/other or approved member transit.
  • Project path metadata through the existing Runtime Host connection; do not add live migration or mutation replay.

This is stack 3/4 for #4382. STUN product policy and Desktop presentation are isolated in the next layer.

Verification

  • cargo fmt --check
  • cargo clippy --locked --all-targets -- -D warnings
  • cargo test --locked (20 focused native tests across the stack)
  • Runtime Host build and full Runtime Host test suite
中文

结果

WebRTC 成为同一 connection authority 下的第二条 direct attempt,而不是串行 fallback 或平行网络产品。QUIC/DCUtR 与 WebRTC 可以并行推进;最优的已认证 direct connection 只提交一次并关闭其余 direct work,获批成员转发的时机与准入规则保持不变。

范围

  • 从合格且已认证的 coordination connection 启动有界 WebRTC upgrade。
  • 竞速 direct path,不串行叠加 timeout。
  • Application stream 仍只允许 direct 或明确受信的 transit connection。
  • 在唯一 application-stream commit 前,按 QUIC、TCP、WebRTC、其他路径确定性选择已建立的 direct candidate。
  • 将 winning path 分类为 direct QUIC/WebRTC/TCP/other 或获批成员转发。
  • 通过既有 Runtime Host connection 投影 path metadata;不加入 live migration 或 mutation replay。

这是 #4382 的第 3/4 层。STUN 产品策略与 Desktop 呈现留在下一层。

验证

  • cargo fmt --check
  • cargo clippy --locked --all-targets -- -D warnings
  • cargo test --locked(整个 stack 共 20 个聚焦 native tests)
  • Runtime Host build 与完整 Runtime Host test suite

AI use

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: OpenAI Codex implemented and verified adaptive direct-path selection under human direction. The human contributor owns review and merge decisions.

Checklist

  • Tests cover the decision-relevant behavior
  • Formatting, lint, and affected tests pass locally

@M4n5ter M4n5ter changed the title feat/runtime host webrtc adaptive direct feat(runtime-host): race WebRTC direct upgrades Aug 31, 2026
@M4n5ter
M4n5ter force-pushed the feat/runtime-host-webrtc-adaptive-direct branch from 61c8688 to 51cf164 Compare August 31, 2026 22:46
@M4n5ter
M4n5ter marked this pull request as ready for review September 1, 2026 00:00
@github-actions github-actions Bot added the effort/L Under 1000 readable lines label Sep 1, 2026

@jackwener jackwener left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved at exact head 51cf164039fd476aab1e781fc9dc29073b5d4e65 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
M4n5ter merged commit 93a3fe2 into main Sep 1, 2026
20 checks passed
@M4n5ter
M4n5ter deleted the feat/runtime-host-webrtc-adaptive-direct branch September 1, 2026 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/L Under 1000 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants