Skip to content

Complete browser-session launch and signaling recovery - #49

Merged
capy-ai[bot] merged 3 commits into
mainfrom
capy/audit-webrtc-launch-recovery
Oct 29, 2026
Merged

capy-ai[bot] merged 3 commits into
mainfrom
capy/audit-webrtc-launch-recovery

Conversation

@zortos293

@zortos293 zortos293 commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Follow up on the deeper audit of #47 after #48 corrected the CloudMatch client identity.

  • Prefer valid WebRTC descriptors while retaining validated legacy signaling only as a last-resort fallback. Never use RTSP control as UDP media or invent signaling from management hosts. Reject placeholder/malformed addresses, keep browser media-hint ports separate from WSS, and preserve protocol-4 mapped signaling ports and explicit secure endpoint ports.
  • Learn trusted assigned CloudMatch control endpoints for poll/stop/ad updates. Validate response session IDs and statuses, wait boundedly for a fresh usable ready allocation, preserve recovery markers on failed API deletion, and recover markers from backups.
  • Report unsupported queue-ad playback truthfully with action: 6, adAction: 5, FAILED_TO_REQUEST_ADS, and zero playback durations. Deduplicate successful reports, bound transient retries, and best-effort clean up a seat when its initial ad response fails.
  • Normalize complete /sign_in URLs, escape query values, deliver binary/fragmented signaling messages, and surface transport/server failures. Retry transient failures before the first offer at most three times within the original 30-second deadline. Reconnects retain the peer and PeerConnection; normal post-offer signaling closure does not reset media or redial.

Fresh signaling remains version 2 and gamepad launch mode remains 2. This does not alter codecs, public input formats, persisted product paths, or vendored libraries.

Verification:

  • Complete host regression suite passed with 154 PASS entries. Compiled allocation and production signaling regressions reproduce the pre-fix faults and pass after correction. Lifecycle tests cover assigned routing, ads, response validation, backup recovery, and cleanup.
  • Focused CloudMatch, signaling, and WebSocket ASan/UBSan checks passed.
  • Actual native queue interaction checks passed for cancellation, minimize/restore, account changes, frozen settings, and handoff.
  • Full SwitchNOW.nro build passed in the CI-pinned devkitPro Docker image. The cross-build caught and corrected a libnx strict-C++20 IPv6-type portability issue; the final build source hashes match this change.

Real NVIDIA-account launches and physical Switch gameplay still need hardware validation. No playback completion is fabricated, and no release is published by this PR.

Open in Capy

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 2 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 81f4a351-fc22-4ced-99a2-986e17bce552
Commits

Reviewing files that changed from the base of the PR and between 4ae25f7 and ac3f8de.

Files selected for processing: 23
  • app/src/WebSocketClient.cpp
  • app/src/WebSocketClient.hpp
  • app/src/gfn/cloud_session.cpp
  • app/src/gfn/cloud_session_internal.hpp
  • app/src/gfn/cloud_session_protocol.cpp
  • app/src/gfn/cloud_session_state.cpp
  • app/src/gfn_client.hpp
  • app/src/models.hpp
  • app/src/signaling_client.cpp
  • app/src/signaling_client.hpp
  • app/src/ui_helpers.cpp
  • app/src/webrtc/negotiation.cpp
  • app/src/webrtc/session.cpp
  • app/src/webrtc/signaling.cpp
  • app/src/webrtc/startup_timeout_policy.hpp
  • app/src/webrtc_session.hpp
  • scripts/test-host.sh
  • scripts/test-streaming-host.sh
  • tests/cloud_session_allocation_test.cpp
  • tests/cloud_session_recovery_test.cpp
  • tests/webrtc_signaling_test.cpp
  • tests/websocket_client_test.cpp
  • tests/websocket_test_transport.hpp
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

zortos293 and others added 2 commits October 29, 2026 19:31
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
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