Repository navigation
test_viewer_streaming: fix the false failure in the Shift-camera sandbox (missing AbortController) - #7063
test_viewer_streaming: fix the false failure in the Shift-camera sandbox (missing AbortController)#7063antoinecaputo wants to merge 1 commit into
Conversation
…box (missing AbortController)
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
No open issues 🎉
What changed in this PR
Fixes a Node v24 VM-sandbox test failure in test_viewer_streaming by aligning the Shift/Ctrl camera-speed sandbox globals with other sandboxes in the same file.
Changes:
- Inject
AbortController,setTimeout, andclearTimeoutinto the VM sandbox used by the “Shift speeds the camera up…” test case.
| File | Description |
|---|---|
| tests/test_viewer_streaming.cjs | Adds missing timer and abort globals to the one sandbox that lacked them, preventing AbortController is not defined in Node v24 tests. |
Review effort: Lite
|
Tested 4773b72 merged with main 8575d36 on Linux/Node v22.23.5 (no Python involved; tests/test_viewer_streaming.cjs only): pass
No viewer source changes in the PR. |
|
Independent Windows check with Node 24.22.3, the Node major used in CI. On main 26fdf41, the full viewer check ( |
|
Independent native Windows/Node 24.22.3 at 4773b72: node --test tests/test_viewer_streaming.cjs passes 57/57, no skips. Main 8575d36 baseline is 56 pass/1 fail with AbortController undefined in the Shift-camera VM. Overlap with #5692/#7085/#7409 should be resolved at merge time. Synthetic VM only, no browser/game files. AI-assisted (Codex). |
|
Independent check on Windows 11 with Node v26.13.0. On a fresh main snapshot, |
|
Independent check (Linux, Python 3.12.3, Node 24.13, CPU only, no game files): head
Fixes the red viewer test on main ( AI-assisted (Claude Code). |
|
Closing in favor of #5692 — it claimed this item first as TEST-1354 (issues/5581#issuecomment-7100079959), before my claim (issues/6910#issuecomment-7106040584). The bug and fix are the same (AbortController missing from the camera-speed vm context in tests/test_viewer_streaming.cjs); the five independent checks on my head (Windows ×3 on Node 22/24/26, Linux ×2, all 57/57 with main failing on |
node --test tests/test_viewer_streaming.cjsfailed 1 of 57 on main on Node v24.21.0 (the major CI tests): theShift speeds the camera up and Ctrl slows it downcase died withReferenceError: AbortController is not defined. The vm sandbox built for that one case (tests/test_viewer_streaming.cjs:391-416) injects neitherAbortControllernorsetTimeout/clearTimeout, while every sibling sandbox in the same file (lines 17, 356, 453) does; the code under test callsnew AbortController()(viewer/index.html,loadWorld).The fix adds the three globals, copied verbatim from the sibling sandbox at line 356. No expectation or production change.
Tested:
node --test tests/test_viewer_streaming.cjs— 57/57 pass, twice, Node v24.21.0 on macOS; 56/57 before the change. CPU only; no browser, no network, no game data.Claim: #6910 (comment)
AI-assisted.