Repository navigation
fix(demo): the VR demo keeps its spatial mix through catalog estimate updates - #9744
Conversation
Quest-Claim: 863f3f3bb8122cb7
… updates A live fMP4 import republishes its catalog while its bitrate and sync estimates settle. The VR demo rebuilt its whole audio graph on each one, which dropped the test's meter tap mid-measurement, so `just test vr` threw on disconnect. The demo now rebuilds the picture and the mix only when a field they lay out by changes, and the test fails with a clear message if the mix is rebuilt under it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. WalkthroughThe VR demo now derives picture and audio placement separately, then uses those values to update scene layout and create the spatial listener. The interop test checks that listener output remains unchanged after audio sampling. A planning document adds an example of four live fMP4 catalog updates, and a prior catalog-rebuild investigation document is deleted. Merge Risk:
|
Finishes quest/m0/interop-green/vr-catalog-rebuild.md.
Summary
The scheduled Interop step
VR catalog fields(just test vr) threwInvalidAccessErroratoutput.disconnect(split)in run 45873739689. It reproduced locally 2 of 2.Why the catalog arrives four times: the publisher really sends four. Logging each update's JSON showed a live fMP4 import republishing its catalog while its estimates settle: video and audio
bitrateappear, audiobitraterises (111270, 118419, 118422), andsync.intervalappears. Neither the relay nor the JS reader repeats anything, so there is nothing to fix there.What broke the test:
demo/vrrebuilt its whole spatial audio graph (and the picture's layout) on every audio or video config change, so each estimate update closed the old mix. That dropped the test's meter tap, which then read a dead branch and threw on disconnect. It also glitched the demo's sound for real viewers.demo/vr/src/index.ts: the picture's layout and the sound's placement are now computed signals of only the fields they use (projection, stereo, layout). The signals' deep equality keeps them unchanged across estimate updates, so the mix and the layout rebuild only when something they lay out by changes.test/interop/clients/js/vr.ts:ears()checks the demo still holds the mix it tapped before disconnecting, and otherwise fails withthe demo rebuilt its spatial mix mid-measurementinstead of a bareInvalidAccessError.quest/m0/aac-resume-stall.md: notes that a live fMP4 import republishes its catalog as estimates settle, since that quest also saw repeated catalogs without a resubscribe.Public API: none. Wire: none.
Caused by
Decisions
Validation
just test vrfailed 2 of 2 locally with the sameInvalidAccessErroras CI.just test vrpassed 4 of 4 locally (aheadL 0.314 R 0.089, facingL 0.127 R 0.125).Spatial's constructor, one run built the mix once across three catalog updates.just checkpasses;tsc --noEmitpasses fordemo/vrandtest/interop/clients/js.Models
Size: S
Implementer: Claude Code, claude-opus-5-5, unknown (arm A)
(Written by Claude Opus 5.5)
Review
Rewritten by
quest reviewafter each round.The change touches only the VR demo (`demo/vr/src/index.ts`), an interop test (`test/interop/clients/js/vr.ts`), and quest plan docs; a bug could at worst break the demo's spatial audio or make the VR interop step fail, which affects no published consumer or peer and is fully undone by a revert.412622ce-d47e-4cf6-9473-48ab09d3adc1