tests: give the camera vm context the globals the viewer uses at load #13
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!13
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/13/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@wavehs on GitHub · 2026-11-24 01:39 UTC · original
wavehs:tests-viewer-vm-globals→main· +5 −0 · 1 files · 1 commits · merged 2026-11-24 02:26 UTCClaimed in the coordination issue as: none — the original project's coordination issue was lost with its repository, and this repository has no such issue yet. No open pull request touches
tests/test_viewer_streaming.cjs.Depends on: none.
What and why
viewer/index.htmlcallsloadWorld()at module scope; it creates anAbortControllerand arms asetTimeout. The Shift/Ctrl camera test runs the viewer in avmcontext whose sandbox does not provide either, so the context throws before the camera is returned:On Node 20 it then fails on
setTimeoutonceAbortControlleris added. This is why theviewer-testsjob fails on every pull request, including #5-#11, whose diffs do not touch the viewer:A
vmcontext has only what the sandbox gives it, on Node 24 as on Node 20, so the test now provides the two globals. The timers never fire: the manifest this context gets has no chunks to stream, and the test only steps one frame explicitly.Tested
macOS 15 arm64 (Apple M3 Pro), Node 20.20.2, no browser and no game data:
node --test tests/test_*.cjsmain@30daa6958Node 24 is what CI runs; the missing globals are the same there (the CI log above is Node 24). Not run: a browser, any GPU or game data.
AI-assisted: yes.
Checklist
docs/design.md, with how it was confirmed. (Not applicable: test-only.)@wavehs on GitHub · 2026-11-24 02:18 UTC · original
Batch note for my six open fix pull requests (#13, #20, #21, #22, #23, #26): stacked on
main@9ec34cdffthey make the whole local run green, so they can be merged in any order without waiting for each other's CI to go green first — each one alone leaves the other red files in place, and the Linux/macOS loops stop at the first failure (python -I "$t" || exit 1).Stacked tree, macOS 15 arm64 / CPython 3.15.2, CPU only, no game files:
The one remaining translator file,
test_exec_computed, is SHADER-1264 and is fixed by #24 (ddddddddwp), not by any of mine; I verified their branch separately (that file passes, the suite is then down totest_image_atomics_guard, which #20 fixes).