Skip to content

Add WebRTC cross-region and replay repository MVP#3177

Closed
xiaoyaoqilan wants to merge 7 commits into
dimensionalOS:mainfrom
xiaoyaoqilan:codex/webrtc-cross-region-mvp
Closed

Add WebRTC cross-region and replay repository MVP#3177
xiaoyaoqilan wants to merge 7 commits into
dimensionalOS:mainfrom
xiaoyaoqilan:codex/webrtc-cross-region-mvp

Conversation

@xiaoyaoqilan

@xiaoyaoqilan xiaoyaoqilan commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a source-runnable dimos webrtc-mvp CLI with local, publish, and subscribe commands
  • publish timestamped synthetic frames through a strict H.264 WebRTC path
  • report signaling, first-frame, P50/P95 latency, RTP loss, and sequence-gap metrics
  • fail explicitly on ICE timeout, missing RTP frames, invalid frame stamps, or unavailable H.264 encoding
  • add the foundational replay repository protocol and CLI for raw, manifest-based, and batch upload/download flows
  • validate manifests and content hashes on both upload and download
  • document local baseline and two-site hosted-SFU testing

Motivation

This is the transport and repository foundation for #3158. It validates WebRTC/SFU latency and first-frame behavior while providing the smallest usable artifact-sharing path before memory2, remote Go2 replay, object storage, regional selection, and production hardening are layered on top.

Validation

  • targeted pytest suites for WebRTC metrics, replay repository behavior, and repository CLI passed
  • ruff check and ruff format --check passed
  • targeted mypy checks passed
  • local H.264 WebRTC loopback: 46 decoded frames, 0 invalid timestamps, 0 sequence gaps, 0 packets lost, 82.31 ms media-to-first-frame, 72 ms P50, 87.75 ms P95
  • Alibaba Cloud smoke test uploaded and hash-verified a real H.264 MP4 through the repository service

Follow-up stack

This is PR 1 of the #3158 implementation stack. Follow-ups add S3-compatible storage, memory2 integration, remote unitree-go2 replay, China/US node selection, and operational hardening.

@codecov

codecov Bot commented Jul 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 70.05929% with 303 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
dimos/protocol/pubsub/impl/webrtc/mvp_cli.py 16.94% 195 Missing and 1 partial ⚠️
...s/protocol/pubsub/impl/webrtc/replay_repository.py 79.27% 59 Missing and 32 partials ⚠️
dimos/protocol/pubsub/impl/webrtc/mvp_metrics.py 88.46% 3 Missing and 3 partials ⚠️
...otocol/pubsub/impl/webrtc/replay_repository_cli.py 89.13% 4 Missing and 1 partial ⚠️
...otocol/pubsub/impl/webrtc/providers/video_track.py 42.85% 4 Missing ⚠️
...os/protocol/pubsub/impl/webrtc/providers/broker.py 83.33% 0 Missing and 1 partial ⚠️
@@            Coverage Diff             @@
##             main    #3177      +/-   ##
==========================================
+ Coverage   73.77%   73.96%   +0.18%     
==========================================
  Files        1109     1116       +7     
  Lines      104383   105389    +1006     
  Branches     9567     9658      +91     
==========================================
+ Hits        77013    77955     +942     
+ Misses      24695    24675      -20     
- Partials     2675     2759      +84     
Flag Coverage Δ
OS-ubuntu-24.04-arm 67.74% <70.05%> (+0.03%) ⬆️
OS-ubuntu-latest 69.78% <70.05%> (+<0.01%) ⬆️
Py-3.10 69.77% <70.05%> (+<0.01%) ⬆️
Py-3.11 69.77% <70.05%> (+<0.01%) ⬆️
Py-3.12 69.77% <70.05%> (+<0.01%) ⬆️
Py-3.13 69.78% <70.05%> (+0.01%) ⬆️
Py-3.14 69.78% <70.05%> (+0.01%) ⬆️
Py-3.14t 69.78% <70.05%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...os/protocol/pubsub/impl/webrtc/test_mvp_metrics.py 100.00% <100.00%> (ø)
...tocol/pubsub/impl/webrtc/test_replay_repository.py 100.00% <100.00%> (ø)
...l/pubsub/impl/webrtc/test_replay_repository_cli.py 100.00% <100.00%> (ø)
dimos/robot/cli/dimos.py 69.04% <100.00%> (+0.64%) ⬆️
...os/protocol/pubsub/impl/webrtc/providers/broker.py 49.85% <83.33%> (+13.99%) ⬆️
...otocol/pubsub/impl/webrtc/providers/video_track.py 31.25% <42.85%> (+4.58%) ⬆️
...otocol/pubsub/impl/webrtc/replay_repository_cli.py 89.13% <89.13%> (ø)
dimos/protocol/pubsub/impl/webrtc/mvp_metrics.py 88.46% <88.46%> (ø)
...s/protocol/pubsub/impl/webrtc/replay_repository.py 79.27% <79.27%> (ø)
dimos/protocol/pubsub/impl/webrtc/mvp_cli.py 16.94% <16.94%> (ø)

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@xiaoyaoqilan xiaoyaoqilan left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it's not finish。

@xiaoyaoqilan

Copy link
Copy Markdown
Contributor Author

我要做6个pr在这里:
仓储协议、CLI、批量传输、manifest。
对象存储后端:S3/R2/MinIO。
memory2 数据集索引和上传。
dimos --replay run unitree-go2 回放接入。
中美节点检测、健康检查和最优节点选择。
高可用、权限、TLS、CDN、监控、限额和故障恢复。

@autofix-ci

autofix-ci Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Hi! I'm autofix logoautofix.ci, a bot that automatically fixes trivial issues such as code formatting in pull requests.

I would like to apply some automated changes to this pull request, but it looks like I don't have the necessary permissions to do so. To get this pull request into a mergeable state, please do one of the following two things:

  1. Allow edits by maintainers for your pull request, and then re-trigger CI (for example by pushing a new commit).
  2. Manually fix the issues identified for your pull request (see the GitHub Actions output for details on what I would like to change).

@xiaoyaoqilan

Copy link
Copy Markdown
Contributor Author

Superseded by #3201. The implementation is consolidated into the dimos/hosted_data package and unified dimos data CLI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant