[codex] Backport relay web embedding#1930
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughAdded a shared 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@rs/moq-relay/tests/smoke.rs`:
- Around line 109-112: The server startup task in the smoke tests is swallowing
early failures by discarding the result of web.run() (and the related
web.serve(app) path), which can make later wait_for_http timeouts hide the real
error. Update the tokio::spawn block(s) in the smoke test helpers to capture the
run/serve result and surface any startup failure explicitly through the test
flow, using the existing web.run and web.serve(app) call sites so the task does
not silently exit on error.
- Around line 203-215: The smoke test relay_web_serves_merged_routes relies on
wait_for_http(), which uses sleep, so it should start with tokio::time::pause()
to make the async timing deterministic. Update this test near the tokio::test
setup so paused time is enabled before spawning the server or calling
wait_for_http(), keeping the rest of the flow unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: d506d5d3-9e69-4658-8a97-f390fa373f20
📒 Files selected for processing (5)
rs/moq-relay/src/auth.rsrs/moq-relay/src/connection.rsrs/moq-relay/src/web.rsrs/moq-relay/src/websocket.rsrs/moq-relay/tests/smoke.rs
Summary
Web::routes()andWeb::serve(app)so embedders can mount extra axum routes on the relay web listener.MtlsPeerand addAuth::verify_mtls(path)so embedded HTTPS handlers can use the relay's mTLS alias resolution and internal-tier decision.Validation
cargo fmt -p moq-relaycargo check -p moq-relaycargo test -p moq-relay(Written by Claude)