Repository navigation
A landing line has to stand on ground somebody read (#416) - #417
Merged
superuser404notfound merged 2 commits intoAug 25, 2026
Merged
Conversation
…416) A PGS display set has no end of its own, so the reconstruction pass at a seek landing decides which set is still on screen by the store holding nothing between it and the playhead. Over a stretch nobody read, that silence proves nothing. A run re-aimed just after it harvested a set leaves that set's own clear on the far side of the skipped ground: the set decodes at the landing looking unclosed, becomes the landing's active line, and takes its end from the next stored packet, which is the far side of the authored silence rather than its own successor. The reporter's asset shows a two-second sound-effect caption standing over a scene ten seconds later, on an Apple TV 4K and on a Mac. #362 round 2 established that the packets alone cannot show this and named the ledger as the precise signal: a reader restarted BEHIND leaves a descending harvest sequence at the boundary, but one re-anchored FORWARD hangs its packets in ascending order behind the stretch it skipped, so the pair is indistinguishable from an authored silence. It was left unbuilt for want of a reproducible defect. This is that defect. So the readers state what they read. `SubtitleHarvestCoverage` keeps one span per run in the packet store, anchored where a reader positioned and extended as it goes: the forward prefetcher reports its own read position and every re-anchor, the pump's run begins where the producer opens or restarts (both paths) and reaches at least the playhead, since playback is rendering there. A set whose ground up to the playhead is not covered cannot be the landing's active line, and the same rule closes the #100 hold's door onto the same claim. A store nobody reports to answers every span with yes, so a harvest path without notes behaves exactly as before. The cost is the landing line in the case where a set really is still up and the proof is missing, which takes an authored dwell long enough to span the whole unread stretch; the alternative was paying it for every normally authored set that ends inside one. A refusal says so as `landingWithheld=` on the delivery line, beside `endsWithheld=`. Measured with `aetherctl play` on a 500 s H.264 + PGS fixture whose sets are scheduled (set at 184, authored clear at 190, then silence to 240), over a loopback origin, seeking from 100 to 197 so the initial run's park edge falls between the set and its clear and the restarted pump opens at 192, above it: before, 5 of 5 runs published `CUE 184.00-240.00` at the landing; after, 0 of 5, with `landingWithheld=1` on the runs that met the condition and the authored set at 240 published in every run. Controls unchanged in both arms: a far seek into fresh ground landing inside an authored dwell still publishes its line (292.00-295.50), and a plain playthrough delivers the same four cues. 2053 tests green, tvOS + iOS Simulator builds green. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01RbWZLwBVLGM1xUVXa9NeJ1
A step-size rule cannot bound the pump's claim, and applying one broke the case it matters most in. The pump does not report from its loop: its coverage comes from playback rendering at the playhead, which cannot happen unless it read everything from where it opened up to there. Selecting a subtitle track an hour into a film makes the drain's first note an hour-long step over ground the pump certainly read, and the unannounced-reposition guard turned that into a fresh run, so the very landing the selection asks for had no proof behind it. `noteReach` states a run's reach from its anchor however far one note carries; `noteProgress` keeps the guard for a reader whose notes ARE steps (the forward prefetcher's loop). The guard's protection is replaced, for the pump, by every reposition being announced: `makeProducer` has exactly two callers on the native path and the software path repositions through `host.seek`. The store also notes a harvested packet as a position its writer demonstrably read, which gives the pump the lookahead past the playhead its own note cannot state: the region a backward seek into already-produced content lands in. 2055 tests green. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01RbWZLwBVLGM1xUVXa9NeJ1
superuser404notfound
deleted the
fix/416-landing-claim-needs-read-ground
branch
August 25, 2026 04:57
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.
Fixes the shape rrgomes reported in #416: after a re-aimed restart, a PGS set whose authored clear is stranded below the new producer floor is published as the landing's active line and closed at the far side of the authored silence.
Mechanism
The reconstruction pass seeds the landing's active line from the newest set decoded behind the playhead. A set is that line only if nothing on its stream happened in between, and the store's silence is read as that proof. Over a stretch nobody read it proves nothing: a run re-aimed just after it harvested a set leaves the set's own clear inside the skipped ground, so the set decodes at the landing looking unclosed, publishes over the new scene, and
alignCueEndscloses it at the next stored packet, which is the far side of the silence rather than its successor.#362 round 2 measured that the packets alone cannot show this (a reader re-anchored FORWARD leaves an ascending sequence at the boundary, exactly like an authored silence) and named the coverage ledger as the precise signal, then left it unbuilt for want of a reproducible defect.
The change
SubtitleHarvestCoveragein the packet store: one span per harvest run, anchored where a reader positioned and extended as it goes.PGSStaleArrivalGate.admit(..., groundIsRead:): a cue behind the playhead is eligible to be the landing's active line only where the ground between the two was read. The same rule closes the PGS cues arriving after a reader stall flash through the overlay one by one — each inserts with an open-ended endTime (start + 2^32 ms) and only its successor's trim removes it #100 hold's door onto the same claim.landingWithheld=on the PGS overlay cue delivery permanently starves after a few seeks (loopback-HLS VOD) — subtitle-resolution keeps pace with every landing but applySubtitleEvent never fires again, and the last cue's open-ended endTime pins it on screen #357 delivery line, besideendsWithheld=.Measurement
aetherctl playon a 500 s H.264 + PGS fixture with a scheduled sup (set at 184, authored clear at 190, silence to 240), served over a loopback origin, seeking from 100 to 197 so the initial run's park edge falls between the set and its clear and the restarted pump opens at 192, above it:CUE 184.00-240.00at the landingControls, unchanged in both arms: a far seek into fresh ground landing inside an authored dwell still publishes its line (
CUE 292.00-295.50), and a plain playthrough delivers the same four cues.2053 tests green (14 new), tvOS + iOS Simulator builds green.