Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,9 @@ pre-commit install --hook-type commit-msg
- **`--all-files` means all *tracked* files.** pre-commit enumerates through
`git ls-files`, so a file you have created but not yet `git add`ed is skipped
and the run passes for the wrong reason — REUSE and `ruff format` alike.
Stage first (`git add -A`), then run the hooks.
Stage first (`git add -A`), then run the hooks; read `git status` first so a local
artifact (a `node_modules` symlink, a log) is not staged with it — a symlink whose
target exists only on your machine passes locally and fails CI's `check-symlinks`.
- Format touched Python source with `ruff format` before staging. If the
pre-commit hook rewrites a file, restage it and rerun the hooks.
- **REUSE:** files covered by the REUSE hook need **`SPDX-FileCopyrightText`** and **`SPDX-License-Identifier`** in the form the repo already uses (for example the HTML comment block at the top of `README.md` also applies to **`AGENTS.md`** and similar docs).
Expand Down
8 changes: 5 additions & 3 deletions deps/cloudxr/webxr_client/tests/mock/cloudxr-mock-alias.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,17 @@ export function createSession(

declare global {
interface Window {
__mockCloudXRFail?: (message?: string) => void;
__mockCloudXRFail?: (message?: string, code?: number) => void;
__mockCloudXRConnectDelayMs?: number;
__mockCloudXRVideoFrame?: (frameId: number) => void;
}
}

if (typeof window !== 'undefined') {
window.__mockCloudXRVideoFrame = frameId => activeSession?.videoFrameReceived(frameId);
window.__mockCloudXRFail = (message = 'Mock transient server/tunnel outage') => {
activeSession?.triggerFailure({ name: 'StreamingError', message });
// Without a code the failure is recoverable and reconnects silently; a code in the
// server-disconnect range (0xc0f22300-0xc0f223ff) is terminal and shows the error banner.
window.__mockCloudXRFail = (message = 'Mock transient server/tunnel outage', code) => {
activeSession?.triggerFailure({ name: 'StreamingError', message, code });
};
}
6 changes: 4 additions & 2 deletions deps/cloudxr/webxr_client/webpack.app-mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ const { merge } = require('webpack-merge');
const common = require('./webpack.common.js');

module.exports = merge(common, {
mode: 'development',
devtool: 'eval-source-map',
// Production React semantics: StrictMode's development effect replay would create
// duplicate mock sessions.
mode: 'production',
devtool: 'source-map',
resolve: {
alias: {
// Exact match ($) only: the shim itself (and MockCloudXR.ts) reach the real SDK via the
Expand Down
5 changes: 5 additions & 0 deletions tests/python/core/cloudxr/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ dev = [
"pytest-asyncio>=1.3.0",
"numpy",
"websockets>=17.3",
"cryptography>=3.0",
]
test = [
"pytest",
"pytest-asyncio>=1.3.0",
"numpy",
"websockets>=17.3",
"cryptography>=3.0",
]

[tool.pytest.ini_options]
Expand All @@ -27,5 +29,8 @@ python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
asyncio_mode = "auto"
markers = [
"oob_browser: real Chrome + npm build; needs RUN_OOB_BROWSER_TESTS=1",
]
# Prevent pytest from recursing into parent directories
norecursedirs = [".git", ".venv", "build", "dist", "*.egg", "__pycache__"]
Loading
Loading