Skip to content

A landing line has to stand on ground somebody read (#416) - #417

Merged
superuser404notfound merged 2 commits into
mainfrom
fix/416-landing-claim-needs-read-ground
Aug 25, 2026
Merged

superuser404notfound merged 2 commits into
mainfrom
fix/416-landing-claim-needs-read-ground

Conversation

@superuser404notfound

Copy link
Copy Markdown
Owner

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 alignCueEnds closes 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

Measurement

aetherctl play on 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:

arm stale CUE 184.00-240.00 at the landing authored set at 240
before 5 / 5 5 / 5
after 0 / 5 5 / 5

Controls, 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.

Vincent Herbst and others added 2 commits August 25, 2026 06:31
…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
superuser404notfound merged commit 6f40bfa into main Aug 25, 2026
7 of 8 checks passed
@superuser404notfound
superuser404notfound deleted the fix/416-landing-claim-needs-read-ground branch August 25, 2026 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant