Repository navigation
fix(seek): carry transport intent through a superseded reposition (#292) - #299
Merged
Merged
Conversation
A scrub during playback on the software path landed the session paused while the engine reported `.playing`: the audio clock re-armed at `rate=0.0`, the demux and feeder loops parked, and only a manual pause plus play brought it back. `SoftwarePlaybackHost.seek` and `AudioPlaybackHost.seek` park their loops by clearing `isPlaying`, then await the demuxer reposition off the main actor (#254). A second seek entering that window therefore read the flag its predecessor had cleared, took it for "was paused", and anchored the clock at rate 0 with `pausedByHost` set. The reporter's log is exactly that interleave: seek#1 began, superseded, seek#2 began, seekClock rate=0.0. Before #254 the reposition ran inline, so no seek could overlap another. The intent now lives in a stash that the seek owning the window keeps, whoever supersedes it inherits, and `pause()` / `play()` rewrite, so it is read at the landing rather than at entry. That closes two siblings of the same defect along with the reported one: a `pause()` issued during a reposition was swallowed and playback continued, and a `play()` issued during one landed at rate 0 under a running loop, freezing exactly like the report. The engine's seek finalize no longer defaults to `.playing` for the software and audio hosts either. They carry the durable intent now, so it reads their transport state, which is the other half of "AetherEngine still reports playing" in the report title. AVPlayer-backed audio keeps the default. Verified with `aetherctl play --sw --host-calls overlapseek` (three drills, each healed to a known state first) before and after: superseded scrub rate=0.0 and a frozen clock -> rate=1.0 and +2.98s; pause during the reposition kept playing -> lands paused and resumes on play; play during the reposition rate=0.0 -> rate=1.0 and +2.91s. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01HX5zV3Fcf7Nzq4DYGdXvQE
…292) `seektest` awaits every seek, so its bursts are strictly serial and can never produce the interleave #292 is about. `play --sw --host-calls overlapseek` makes a transport call while a reposition is still in flight: a second same-target seek (the report), a pause, and a play from paused. Each drill heals the session with pause plus play first, so a defect one provokes is not inherited by the next (before the fix each leaves the session wedged, and back-to-back drills on a wedged session are unattributable). `inWindow` is the precondition: a call that arrived after the landing reports INCONCLUSIVE instead of a green PASS. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01HX5zV3Fcf7Nzq4DYGdXvQE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes nothing yet: #292 stays open for the reporter's retest.
What broke
A scrub during playback on the software path landed the session paused while the engine reported
.playing. The audio clock re-armed atrate=0.0, the demux and feeder loops parked, and only a manual pause plus play brought it back.SoftwarePlaybackHost.seekandAudioPlaybackHost.seekpark their loops by clearingisPlaying, then await the demuxer reposition off the main actor (#254). A second seek entering that window read the flag its predecessor had cleared, took it for "was paused", and anchored the clock at rate 0 withpausedByHostset. The reporter's log is that interleave verbatim:Before #254 (released in 6.1.1) the reposition ran inline, so no seek could overlap another.
The fix
The intent lives in a stash that the seek owning the window keeps, whoever supersedes it inherits, and
pause()/play()rewrite. It is read at the landing rather than at entry, which closes two siblings of the same defect along with the reported one:pause()issued during a reposition was swallowed and playback continued;play()issued during one landed at rate 0 under a running loop, freezing exactly like the report.The engine's seek finalize no longer defaults to
.playingfor the software and audio hosts either. They carry the durable intent now, so it reads their transport state. That is the other half of "AetherEngine still reports playing" in the report title. AVPlayer-backed audio keeps the default.Verification
aetherctl play --sw --host-calls overlapseekruns three drills, each healed to a known state first so one drill's damage is not inherited by the next. Same fixture, same binary, only the engine sources swapped:seekClock rate=0.0, clock frozen,state=playingrate=1.0, +2.98 s in 3 spause()during the repositionplay()resumes from the targetplay()during the repositionseekClock rate=0.0, clock frozen,state=playingrate=1.0, +2.91 s in 3 sseektestcannot reach any of this: it awaits every seek, so its bursts are strictly serial and never interleave. Full suite green (1483 tests).🤖 Generated with Claude Code
https://claude.ai/code/session_01HX5zV3Fcf7Nzq4DYGdXvQE