Skip to content

test(cloudxr): real-browser OOB integration tests with fake adb and MockCloudXR - #1338

Closed
gareth-morgan-nv wants to merge 1 commit into
gmorgan/oob-hub-token-fragmentfrom
gmorgan/oob-token-e2e-test
Closed

gareth-morgan-nv wants to merge 1 commit into
gmorgan/oob-hub-token-fragmentfrom
gmorgan/oob-token-e2e-test

Conversation

@gareth-morgan-nv

@gareth-morgan-nv gareth-morgan-nv commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Real-browser integration tests for the OOB teleop path: the merged fake-adb test double plays the headset's adb, real Chrome opens the exact URL that am start receives, the real web client (MockCloudXR build) runs in it, and the real wss.run + OOBControlHub serve it. The first cases cover fragment token delivery from #1318; the harness is meant to host further end-to-end OOB cases. Based on #1318; the diff here is the new test only.

What changed

  • tests/python/core/cloudxr/test_oob_token_integration.py:
    • A fast /bin/sh test that the -d URL survives shell quoting with a token containing &, ?, #, +, a space and quotes. Always runs.
    • Browser cases (generated and awkward configured token): the launch URL carries the token only in the fragment after the route, the hub accepts the client, the page URL is cleaned, the mock session reports streaming, and no request target or Referer seen by the static server contains the token.
    • A wrong fragment token is rejected: the client logs the 1008 policy close and the hub has no headset.
  • The browser cases need Chrome and an npm build, so they run only with RUN_OOB_BROWSER_TESTS=1 (-m oob_browser); nothing runs them automatically. Chrome here ignores TLS errors, so certificate trust is bypassed, not covered.
  • Test dependency cryptography and the oob_browser marker in the leaf pyproject.toml.

Validation

  • RUN_OOB_BROWSER_TESTS=1 uv run --extra dev pytest test_oob_token_integration.py in tests/python/core/cloudxr: 4 passed locally.
  • Hand mutation checks (each made the tests fail): no token capture in the client, no sessionStorage persistence, token also in the URL query, hub accepting any token, URL not shell-quoted.
  • SKIP=check-copyright-year pre-commit run --all-files clean.
  • Browser cases in CI: not wired; they are opt-in and run locally only.

Known limitations / follow-ups

Test plan

  • CI checks pass on this PR.

🤖 Generated with Claude Code

…d a real browser

Real build_teleop_url -> run_oob_connect -> FakeAdb am start -> Chrome opens the
exact recorded URL -> the real web client (MockCloudXR build) registers with the
real wss.run + OOBControlHub. Covers a generated and an awkward configured
token, URL cleanup, no token in request targets or Referer, reload with a new
registration and no second am start, and rejection of a wrong fragment token.
Browser cases are opt-in (RUN_OOB_BROWSER_TESTS=1, -m oob_browser); a fast
/bin/sh test checks the -d argument survives shell quoting.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Gareth Morgan <gmorgan@nvidia.com>
@coderabbitai

coderabbitai Bot commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@gareth-morgan-nv gareth-morgan-nv changed the title test(cloudxr): end-to-end fragment token delivery through fake adb and a real browser test(cloudxr): real-browser OOB integration tests with fake adb and MockCloudXR Oct 24, 2026
@gareth-morgan-nv

Copy link
Copy Markdown
Contributor Author

🤖 Agent-generated (Claude Code · claude-sonnet-5-5)

Closing: these tests are combined into #1148, which now holds the whole real-browser OOB test suite.

This branch was successfully deployed

1 active deployment
dev — 09f276b3 Deployed Oct 24, 2026 by gareth-morgan-nv via publish-wheel #6001
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants