Restore IsStreamingMode on recovery; guard superseded-load else-branch

RecoverFromFailedRefill now sets IsStreamingMode=true so the in-place
seek-retry route isn't wedged. The generic-catch unload path is gated on
the loadCts identity, so a superseded load no longer clobbers a newer
operation's state.
This commit is contained in:
daniel-c-harvey
2026-06-24 15:37:38 -04:00
parent e7762e35e8
commit cc9d20184d
2 changed files with 20 additions and 6 deletions
@@ -353,6 +353,8 @@ public class SegmentedStreamLoopTests
"a truncated segment while cursor < totalLength is a failure: scheduler must be halted via recovery");
Assert.That(player.IsLoaded, Is.True,
"recovery leaves the track loaded so the listener can retry — not torn down to unloaded");
Assert.That(player.IsStreamingMode, Is.True,
"recovery must restore IsStreamingMode=true so Seek() is not wedged (AC6 / Phase 21.3 retry contract)");
Assert.That(player.IsPaused, Is.True,
"recovery settles into a paused state, not playing");
Assert.That(player.ErrorMessage, Is.Not.Null.And.Not.Empty,
@@ -381,6 +383,8 @@ public class SegmentedStreamLoopTests
"a mid-stream fetch failure must halt the scheduler via recovery, not leave it to drain");
Assert.That(player.IsLoaded, Is.True,
"recovery leaves the track loaded so the listener can retry — not torn down to unloaded");
Assert.That(player.IsStreamingMode, Is.True,
"recovery must restore IsStreamingMode=true so Seek() is not wedged (AC6 / Phase 21.3 retry contract)");
Assert.That(player.IsPaused, Is.True,
"recovery settles into a paused state, not playing");
Assert.That(player.ErrorMessage, Is.Not.Null.And.Not.Empty,