Skip to content

feat(runtime-host): accept WebRTC direct upgrades - #4404

Merged
M4n5ter merged 3 commits into
refactor/runtime-host-peer-attempt-lifecyclefrom
feat/runtime-host-webrtc-direct-upgrade
Sep 1, 2026
Merged

feat(runtime-host): accept WebRTC direct upgrades#4404
M4n5ter merged 3 commits into
refactor/runtime-host-peer-attempt-lifecyclefrom
feat/runtime-host-webrtc-direct-upgrade

Conversation

@M4n5ter

@M4n5ter M4n5ter commented Aug 31, 2026

Copy link
Copy Markdown
Member
English

Outcome

Add an experimental private-to-private WebRTC direct upgrade inside the existing Rust libp2p peer endpoint. Signaling runs over the already Noise-authenticated Circuit Relay v2 connection, and the resulting connection enters the same Swarm, PeerId, muxing, and Runtime Host application protocol.

Architecture boundary

  • Standard /webrtc-signaling/0.0.1; no Maka signaling service or private wire protocol.
  • The signaling connection's verified remote PeerId remains the identity authority; DTLS verifies the exchanged fingerprint before admission.
  • Bounded SDP, candidate, message, and attempt lifetimes.
  • Ordered DataChannel adapted to the existing libp2p stream contract.
  • Explicit teardown/cancellation; the existing relayed coordination path survives a failed upgrade.
  • No TURN, JS sidecar, second Swarm, second identity, durable ICE state, or UI.

The temporary dependency is pinned to immutable webrtc revision e132552fc67b84c30e63c5ce916a9a63e2484b6f, which contains the DataChannel readiness fixes documented in #4382. It never tracks a floating branch.

This is stack 2/4 for #4382.

Verification

  • Rust 1.98 cargo fmt --check, clippy with warnings denied, and native tests.
  • cargo deny --locked --exclude-dev check licenses.
  • Generated Cargo dependency inventory and third-party notices are current.
  • Focused loopback proves the existing application stream over an authenticated WebRTC connection.
  • Phase 0 reproduction and cross-implementation evidence: [Tracking] WebRTC ICE as a second Runtime Host direct path #4382.
中文

结果

在现有 Rust libp2p peer endpoint 内加入实验性的 private-to-private WebRTC 直连升级。Signaling 复用已经通过 Noise 认证的 Circuit Relay v2 connection;建立后的 connection 进入同一个 Swarm、PeerId、mux 与 Runtime Host 应用协议。

架构边界

  • 使用标准 /webrtc-signaling/0.0.1,不增加 Maka signaling service 或私有 wire。
  • 已认证 signaling connection 的 remote PeerId 仍是身份 authority;DTLS 在准入前验证交换的 fingerprint。
  • SDP、candidate、message 与 attempt 生命周期全部有界。
  • Ordered DataChannel 适配既有 libp2p stream contract。
  • 明确 teardown/cancel;升级失败不破坏已有 relay coordination path。
  • 不加入 TURN、JS sidecar、第二 Swarm、第二身份、持久 ICE 状态或 UI。

临时依赖精确固定到 webrtc revision e132552fc67b84c30e63c5ce916a9a63e2484b6f;它包含 #4382 记录的 DataChannel readiness 修复,且不会跟随浮动分支。

这是 #4382 的第 2/4 层。

验证

  • Rust 1.98 cargo fmt --check、clippy 零警告与 native tests。
  • cargo deny --locked --exclude-dev check licenses
  • Cargo 依赖清单与第三方 notices 已更新并通过检查。
  • 聚焦 loopback 证明已认证 WebRTC connection 能运行既有 application stream。
  • Phase 0 复现与跨实现证据见 [Tracking] WebRTC ICE as a second Runtime Host direct path #4382

AI use

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

Tool(s) and scope: OpenAI Codex implemented, qualified, and documented the native WebRTC transport under human direction. The human contributor owns review and merge decisions.

Checklist

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

@M4n5ter
M4n5ter force-pushed the feat/runtime-host-webrtc-direct-upgrade branch from 4f33795 to e1f2022 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/XL Over 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 e1f2022932cdd9d18698d26d9acdd4be1efa13a3 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 ce25d6b into main Sep 1, 2026
35 of 39 checks passed
@M4n5ter
M4n5ter deleted the feat/runtime-host-webrtc-direct-upgrade branch September 1, 2026 00:40
abhinav-phi pushed a commit to abhinav-phi/maka that referenced this pull request Sep 1, 2026
* feat(runtime-host): accept WebRTC direct upgrades

* fix(runtime-host): bound WebRTC substream resources

* fix(native): close discarded WebRTC transports
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/XL Over 1000 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants