Review finding
Composition navigation modes that truncate a composition to its head scene rebuild the composition context without carrying audioBed forward. mode=standalone intentionally suppresses beds, but mode=loop and mode=scrub are audible modes and should preserve the surrounding composition bed.
Evidence
src/runtime/scene-loader.ts:1561 applySingleSceneSlice() creates a new composition object with id, manifestSlice, sceneSlice, and startIndex, but omits audioBed.
src/runtime/scene-navigation.ts:492 truncateToHead() has the same omission for direct bridge callers.
src/runtime/scene-loader.ts:1315 passes a bed to createAudioService() only from resolved.composition?.audioBed, so once the slice transform drops it the bed cannot play.
Impact
A bed-carrying composition addressed with mode=loop or mode=scrub silently loses its bed. This makes composition playback differ from the declared composition and from present-mode behavior. Direct callers of loadSceneNavigationTarget() also get a truncated head slice without the bed.
Recommended fix
Preserve audioBed when head-only composition slices are rebuilt, and keep the existing bedSuppressed: mode === 'standalone' behavior as the explicit standalone suppression point.
Acceptance checks
applySingleSceneSlice() preserves resolved.composition.audioBed when rebuilding the head slice.
truncateToHead() preserves target.composition.audioBed for direct callers.
- Tests cover a composition with an
audioBed in mode=loop and mode=scrub and prove the bed is constructed/started.
- Existing standalone tests continue to prove
mode=standalone suppresses the bed.
Review finding
Composition navigation modes that truncate a composition to its head scene rebuild the composition context without carrying
audioBedforward.mode=standaloneintentionally suppresses beds, butmode=loopandmode=scrubare audible modes and should preserve the surrounding composition bed.Evidence
src/runtime/scene-loader.ts:1561applySingleSceneSlice()creates a newcompositionobject withid,manifestSlice,sceneSlice, andstartIndex, but omitsaudioBed.src/runtime/scene-navigation.ts:492truncateToHead()has the same omission for direct bridge callers.src/runtime/scene-loader.ts:1315passes a bed tocreateAudioService()only fromresolved.composition?.audioBed, so once the slice transform drops it the bed cannot play.Impact
A bed-carrying composition addressed with
mode=loopormode=scrubsilently loses its bed. This makes composition playback differ from the declared composition and from present-mode behavior. Direct callers ofloadSceneNavigationTarget()also get a truncated head slice without the bed.Recommended fix
Preserve
audioBedwhen head-only composition slices are rebuilt, and keep the existingbedSuppressed: mode === 'standalone'behavior as the explicit standalone suppression point.Acceptance checks
applySingleSceneSlice()preservesresolved.composition.audioBedwhen rebuilding the head slice.truncateToHead()preservestarget.composition.audioBedfor direct callers.audioBedinmode=loopandmode=scruband prove the bed is constructed/started.mode=standalonesuppresses the bed.