Repository navigation
fix(subtitles): the pump's harvest anchor is stated on the source axis (#107, #416) - #575
Merged
superuser404notfound merged 1 commit intoSep 20, 2026
Conversation
#107, #416) A software VOD seek opened the pump's coverage run at the session-axis target while `subtitleDrainTick` reports that reader's progress from `sourceTime`. On a zero-based source the two coincide, so nothing was ever wrong. On a mid-stream-joined one the anchor sits the whole offset below every note that follows it, and `noteReach` has no unannounced-advance guard (only `noteProgress` does), so the first note stretches one run across ground nobody read. `SubtitleHarvestCoverage.covers` then answers yes to anything, and `subtitleLandingGroundIsRead` admits exactly the stale PGS arrival #416 exists to refuse. `SoftwarePlaybackHost.sourceSeconds(forSession:)` exposes the conversion `seek(to:)` already makes for everything inside the host, so the anchor and the notes name the same axis. Found while reviewing #573, which fixes the same axis confusion inside the host. swift test: 3163 swift-testing tests and the XCTest half green, exit 0. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015PM3xUJB6ZQyqnmGK1fp6F
superuser404notfound
deleted the
fix/subtitle-harvest-anchor-source-axis
branch
September 20, 2026 15:25
ijuniorfu
pushed a commit
to ijuniorfu/AetherEngine
that referenced
this pull request
Sep 21, 2026
… axis (superuser404notfound#107, superuser404notfound#416) `clock.sourceTime` rides the raw synchronizer clock on this path, so that the overlay drainer's playhead and the packet store's timestamps agree; the `$sourceClockSeconds` sink says so. The software live branch then wrote the session-relative target over it, and stated the pump's harvest anchor there too, which is the same confusion superuser404notfound#575 fixed for VOD. It does not wedge: the live branch never sets `seekInFlight`, so the host's own tick puts the raw clock back within 250 ms. Inside that window one drain tick reads the whole offset as an unannounced reposition, resets its cursor and scans a stretch the store has nothing at, and the tick after it sees the same offset in the other direction. Two resets and a dark tick for a seek that moved the playhead a few seconds, on any source whose PTS do not start at zero. `SoftwarePlaybackHost.sourceSeconds(forSession:)` now covers both session shapes (live anchors on `sessionStartPts`, VOD on the resolved `clockSessionZero`), and `liveScrubStill` and `seekLiveDVR` go through it instead of each holding their own copy of the addition. Behaviour there is unchanged; the mapping now exists once. The call site itself is not reachable from a unit test, so the guard is on the consequence: `SubtitleOverlayDrainerTests` pins that an axis change reads as a reposition twice and backscans below everything the store holds, while the carried value is the one reposition it really is. swift test: 3164 swift-testing tests and the XCTest half green, exit 0. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015PM3xUJB6ZQyqnmGK1fp6F
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.
Found while reviewing #573, which fixes the same axis confusion inside
SoftwarePlaybackHost. This is the one place outside it that the same target reaches.What happens
A software VOD seek states the pump's coverage anchor at the session-axis target:
but
subtitleDrainTickreports that same reader's progress fromsourceTime, the raw source clock. For a zero-based source the two axes coincide, so nothing was ever wrong. For a mid-stream-joined one (#107) the anchor sits the whole offset below every note that follows it, andnoteReachhas no unannounced-advance guard, onlynoteProgressdoes. The first note therefore stretches one run across the entire offset.SubtitleHarvestCoverage.coversthen answers yes to any span, andsubtitleLandingGroundIsReadadmits exactly the stale PGS arrival #416 exists to refuse. The doc comment onnoteProgressnames this as the one failure mode the type must not have.The change
SoftwarePlaybackHost.sourceSeconds(forSession:)exposes the conversionseek(to:)already makes for everything inside the host, and the call site uses it, so the anchor and the notes name the same axis. The identity for a zero-based source.Test plan
swift test: 3163 swift-testing tests and the XCTest half green, exit 0.Issue416LandingGroundTests: a session-axis anchor followed by a source-axis reach note covers the whole offset (the defect), and the carried anchor claims only what was read.Not device-verified: the effect is a claim in the ledger rather than something visible, and it needs a mid-stream-joined source with PGS.
🤖 Generated with Claude Code
https://claude.ai/code/session_015PM3xUJB6ZQyqnmGK1fp6F