Repository navigation
feat(subtitles): generation-fenced subtitle-resolution statement (#250) - #251
Merged
superuser404notfound merged 2 commits intoJul 29, 2026
Merged
Conversation
An external conformance harness adjudicating seek-time subtitle correctness has to decide, from observable surfaces alone, whether the pipeline has DETERMINED the display state at the rendered position or has merely produced nothing yet. On a PGS track with no acquisition point those two are indistinguishable from outside, and no existing surface answers it: the memprobe prefetch fragment is playhead-relative and carries no generation, the #151 session lines state the harvest frontier rather than how far determination has advanced, and the drain tick logs nothing at all. Emits one line per active drain target: [AetherEngine] #250 subtitle-resolution loadGen= seekGen= stream= coveredFrom= resolvedThrough= via= decodedThrough= reason= Neither obvious candidate for resolvedThrough can be used. The drain window's lead edge (playhead + 60 s) claims determination over bytes nobody read, which is the ambiguity the line exists to remove; the drain cursor is the last actual cue, which on a sparse track stands still for minutes, so every dialogue pause would read as unresolved. So it is the decode window clamped to a harvest frontier, and the frontier's source travels with it: via=prefetch is exact (since #230 the side reader's banked position is the read position on the source axis), via=eof is the strongest state (the window is determined in full), via=pump is the weak one and says so (the producer tap has no read-position surface, so the claim collapses to the drain cursor). The fence is load-bearing rather than decorative. Since #240 the prefetch session SURVIVES a seek: the anchor box moves its cursor in place instead of rebuilding, so a position banked before the seek is still sitting in the gauge afterwards. The re-anchor request therefore carries the seek generation that asked for it, and the loop stamps it AFTER the reposition, so the gap between request and seek reads as unresolved instead of validating a pre-seek position. A frontier fenced to a superseded load or seek is not usable at all. Four emission points, chosen so the line marks transitions rather than ticks: post-seek reconstruction, the 30 s memprobe cadence, prefetcher EOF, and any change of frontier source (the #231 mid-session death is the case that otherwise passes silently). No published property, no behaviour change. Reported by cmcpherson274. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01At1agC2qU2Y2MX2BKLdT4N
`readPosition` was written in three places and read in none, and its comment claimed it fed the link arbitration's lead, which it has not since the arbiter took `yieldedSeconds` instead. The live position is banked in SubtitlePrefetchTelemetry, which is where #250 reads it from. The tvOS build has been warning about it. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01At1agC2qU2Y2MX2BKLdT4N
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: #250 stays open until cmcpherson274's harness has read the line.
What
One EngineLog line per active subtitle drain target, stating the absolute source-time span the subtitle path has decoded display state over, fenced by the engine's own generation counters:
The question it answers is the one no existing surface can: after a far seek lands, has the pipeline DETERMINED the display state at the rendered position, or has it merely produced nothing yet? On a PGS track with no acquisition point those two are indistinguishable from outside. The memprobe prefetch fragment is playhead-relative and ungated by generation, the #151 session lines state the harvest frontier rather than how far determination has advanced, and the drain tick logs nothing at all.
Why resolvedThrough is neither obvious candidate
playhead + 60 s): that claims determination over bytes nobody read. An empty window is ambiguous between "no cue here" and "not harvested yet", which is exactly the ambiguity the line exists to remove.So it is the decode window clamped to a harvest frontier, with the frontier's source travelling alongside:
viaprefetcheofpumpvia=pumpline is itself the answer "not determined"Why the fence is load-bearing, not decorative
Since #240 the prefetch session SURVIVES a seek: the anchor box moves its cursor in place instead of rebuilding it, so a position banked before the seek is still sitting in the gauge afterwards. A fence captured at session start would therefore go stale on the first in-place move, and go stale in exactly the superseded-seek case it exists to resolve.
So the re-anchor request carries the seek generation that asked for it, and the loop stamps it AFTER the reposition. The gap between request and seek reads as unresolved rather than validating a position the seek has not reached yet. A frontier fenced to a superseded load or seek is not usable at all.
Emission points
Four, chosen so the line marks transitions rather than ticks (the drainer runs at 2 Hz per channel):
reason=reconstruction)reason=tick)reason=eof)reason=frontier), which is how the #151 subtitle prefetcher can exit mid-playback and is never restarted #231 mid-session prefetcher death stops passing silentlyScope
No published property, no new public type, no behaviour change.
seekGenerationstays private with a read-only accessor: onlyseek(to:)may move it.Verification
swift test: 1287 tests, 198 suites, greenswift build -Xswiftc -strict-concurrency=complete: cleanxcodebuild -scheme AetherEngine -destination 'generic/platform=tvOS Simulator': cleanIssue250SubtitleResolutionTests, one per way the statement could lie (a diagnostic that over-claims is worse than none, since the harness would adjudicate on it)Second commit removes the prefetcher's dead
readPositionlocal, which the tvOS build had been warning about and whose comment claimed a role it lost when the arbiter changed signature.🤖 Generated with Claude Code
https://claude.ai/code/session_01At1agC2qU2Y2MX2BKLdT4N