Skip to content

Accept NVIDIA region names and show session recovery progress - #31

Open
ducktailgoat wants to merge 2 commits into
OpenCloudGaming:mainfrom
ducktailgoat:fix/region-names-with-spaces
Open

ducktailgoat wants to merge 2 commits into
OpenCloudGaming:mainfrom
ducktailgoat:fix/region-names-with-spaces

Conversation

@ducktailgoat

Copy link
Copy Markdown

Summary

serverInfo keys regions by display name ("France 1", "United Kingdom 2", "Northern California (USA)"), but validRegionName only allowed [A-Za-z0-9_-]. 18 of the 24 current regions were rejected, including the usual local region, and each rejection marks region discovery incomplete. With a saved session profile and no live session, every launch then fails with "Could not check every cloud region. Retry session recovery before launching", and retrying can never succeed. Manual region selection also only offered single-word regions.

 validRegionName (src/region.hpp)
-  [A-Za-z0-9_-]
+  [A-Za-z0-9_-] plus space, "(" and ")"     # "https://..." and "../west" still rejected
 Cloud::recover (src/cloud.cpp)
-  stop checking regions after 9 s
+  stop checking regions after 20 s          # 25 sequential checks take 8.4 to 9.3 s from Europe
 recoverSession, Play / Try again (src/main.cpp)
+  publish CloudState::starting "Checking for an existing cloud session..." before the blocking check

The last change fixes a UI glitch the longer check made visible: Play went back to the game list for the whole check, then jumped to the connecting screen. The normal launch path already publishes the starting state first; the silent check at catalog load is unchanged.

Evidence

Measured on a PS5 in France with temporary per-region logging (not part of this PR):

  • Before:
    RECOVERY serverInfo http=200 discovered=6 discoveryIncomplete=1 regions=7 incomplete=1
    RECOVERY region 1/7 prod http=200 code=1 sessions=0
    ...                (all 7 checked regions answered http=200 code=1)
    RECOVERY result remote=0 incomplete=1      -> "Could not check every cloud region", retry fails
    
    After:
    RECOVERY serverInfo http=200 discovered=24 discoveryIncomplete=0 regions=25 incomplete=0
    RECOVERY region 25/25 ap-japan http=200 code=1 sessions=1 ms=8449
    RECOVERY result remote=1 incomplete=0 ms=8449     (a second run took 9284 ms)
    START / OFFER / ANSWER, 2560x1440, 0 decode errors
    
    The second run would have exceeded the old 9 s budget.
  • UI: with the change, Play shows the launch screen with "Checking for an existing cloud session..." instead of the game list (checked on the console).
  • Host tests: a new tests/cloud_test.cpp case recovers with NVIDIA-style names and asserts RecoveryResult::none, all three regions listed, and selectable names. It failed before and passes after. URL and path names are still rejected. tests/settings_file_test.cpp treated "EU WEST" as corrupt, which contradicts NVIDIA's data: NVIDIA-style names now round-trip, and a tab-separated name is the whitespace rejection case. The rest of tools/test-port.sh gives the same results as main.
  • serverInfo returns the same 24 regions with the native and browser client identities, so this is independent of Request WebRTC rigs with the CloudMatch browser identity #28. The console builds also contained Request WebRTC rigs with the CloudMatch browser identity #28, Let FTP read diagnostics logs in the storage root #29 and Backport OpenNOW-Switch #49 signaling and allocation hardening #30.

Merge Danger

Door: mostly two-way. One way: a settings file saved with a region such as "France 1" is rejected as corrupt by older builds, which then reset stream settings to defaults.

Blast Radius: session recovery and region selection.

Recovery can now block for up to 20 s instead of 9 s, behind a progress screen. Each region's /v2/session returned the same account-wide list (sessions=1 from all 25 endpoints), so checking only the global endpoint would take about 0.1 s. I left the check-every-region design unchanged; your call.

serverInfo keys regions by display name ("France 1", "United Kingdom 2",
"Northern California (USA)"), but validRegionName only allowed
[A-Za-z0-9_-]. 18 of the 24 current regions, including the usual local
region, were rejected, which marks region discovery incomplete. Session
recovery then fails with "Could not check every cloud region" whenever
no existing session is found, so every launch after a saved session
profile fails and retrying cannot succeed. Manual region selection also
only offered single-word regions.

Allow spaces and parentheses. URL and path characters stay rejected, so
"https://..." and "../west" are still refused as region names and
settings records.
With every region accepted, recovery checks all 24 regions plus the
global endpoint sequentially. On a PS5 in France that took about 8.4 s,
against a 9 s budget, so a slower connection would again fail with
"Could not check every cloud region" when no session exists. Raise the
budget to 20 s.

Recovery triggered by Play or Try again also blocked without publishing
any state, so the UI fell back to the game list for those seconds before
the connecting screen appeared. Publish the starting state with a
"Checking for an existing cloud session..." message first, as the
normal launch path already does. The silent check at catalog load is
unchanged.
@coderabbitai

coderabbitai Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

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 12 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: 264c7213-f9a9-4235-bd2a-3bf310ff5306
Commits

Reviewing files that changed from the base of the PR and between b980681 and 9c07358.

Files selected for processing: 5

  • src/cloud.cpp
  • src/main.cpp
  • src/region.hpp
  • tests/cloud_test.cpp
  • tests/settings_file_test.cpp
  • 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

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