Repository navigation
Description
Found while running a counter-measurement for #418, on the fixture harness rather than on a report. It is the #418 symptom (the clock ahead of the picture by the re-aim, cues early) with a trigger the ten rounds there never hit, because in a seek burst it heals within a second or two and here it does not heal at all.
The arm
tc-cues-lie.mkv from Scripts/timecode-fixture.sh plus Scripts/mkv-cue-fixture.py, served over Scripts/slowrange.py, and the seek that re-anchors is the LAST one:
python3 Scripts/slowrange.py /tmp/ae418/tc-cues-lie.mkv 8879 600 0.3 &
aetherctl play --seconds 62 --start-position 53 --picture-probe \
--seek-every 2 --seek-count 5 --seek-pattern 65,60,70,58,75 \
http://127.0.0.1:8879/tc-cues-lie.mkv
What happens
The resume re-aims 9 s below its boundary, which is the normal #418 shape, and the session publishes it once:
#418 seg13 placed (advertised 52.000s, worth -9.000s, sitting 0.000s below its axis): axis shift 0.000s -> -9.000s from item 52.000s
VOD shift published: -9.000s (prev 0.000s, delta -9.000s, changed=YES) seamAt=52.000s seams=1 ...
#418 seg13 placement confirmed: AVPlayer holds it from item 52.000s, base 0.000s as published
That publication is correct where it was measured: at t=16 the picture reads axisErr=-9.000 and capErr=+0.000, so a host placing a cue is exact.
Then the seek to 75 lands, and from the next tick the picture and the session disagree by the whole axis, for the rest of the session:
t=21 ... cur=75.90 pic=84.917 picItem=84.9 axisErr=-0.000 capErr=+9.017
t=48 ... axisErr=-0.000 capErr=+9.042
t=62 ... axisErr=-0.000 capErr=+8.949
axisErr=-0.000 is the picture saying the timeline carries no shift where the playhead now is. The session still maps with -9.000, so its clock runs 9 s ahead of the picture and every cue placed from it is 9 s early, permanently.
| link | runs | error appears | at the end of the run |
|---|---|---|---|
| 600 kbps / 300 ms | 2 of 2 | t=21 | still +9.0 at t=50 and t=62 |
| 1200 kbps / 200 ms | 1 of 1 | t=13 | still +9.0 at t=48 |
| 3200 kbps / 100 ms | 0 of 1 | never | axis honest, capErr 0.025 |
Why nothing corrects it
Nothing looks. Across that seek the log has no producer restart (producer restarted count is 0 for the whole session), so no epoch opens, so no placement is composed and no #418 segN placed line is printed. The round 7 verification is armed by a placement and only by a placement:
func verifyPlacementAgainstLoadedRanges(session: HLSVideoEngine) {
placementVerificationTask?.cancel()
guard session.hasPlacementAwaitingMeasurement else { return }and the only landing-time axis rule covers the sub-second case, on an assumption this arm contradicts (HLSVideoEngine.swift:2737):
AVPlayer discards a sub-second axis offset at a seek and snaps back to the playlist; a larger one survives.
Nine seconds did not survive. In the 24-seek arms of #418 the next seek composes a placement whose reading comes off the changed timeline and puts the axis back within a second or two, which is exactly why ten rounds of measurement never saw this standing.
What is established and what is not
Established: the disagreement, its size (the whole standing axis), its permanence, its dependence on the link, and that no mechanism in the session re-examines the axis without a placement.
Not established: why the region the playhead lands in carries no shift. The producer's own ledger writes every segment of that epoch at its source start (#65 ledger seg-19 base=13 itemAxis=79.417s sourceStart=79.417s planSource=76.000s drift=3.417s shift=0.000s), while the epoch's first segment is the one that opened 9 s low, so the shift may belong to a stretch rather than to everything after seamAt. That is the next thing to measure, and it decides whether the fix is a second seam or a landing-time reading.
Fix direction
The oracle already exists and is trusted (loadedTimeRanges, rounds 3 to 9); what is missing is a trigger that does not depend on a placement. A seek landing that inherits a composition measured somewhere else is exactly the moment to re-read it.
Activity
Merge pull request #482 from superuser404notfound/fix/ae481-landing-a…
superuser404notfound commentedon Sep 4, 2026
Fixed and merged as
50f1eebb(PR #482, merge93d114a0), not released yet; a release note follows when it ships.What the mechanism turned out to be
The open question in the report is answered, and by the picture. Mapping
pic - picItemacross the whole run says the axis is narrower than the seam it is published at:pic - picItemThe offset belongs to the RUN
seg13opened, not to the timeline from item 52.000 onward. Every later segment of that epoch is written on its planned position (#65 ledger seg-19 ... itemAxis=79.417s sourceStart=79.417s), so a seek that opens a NEW run there lands on a source-true stretch. Round 2's arm is the same rule from the other side: a seek that stays inside the run keeps the offset, which is why "an axis above a second survives a seek" measured true for ten rounds.The fix
A seek landing now takes round 7's reading, anchored on the segment the local server answered first after the seek, which is the one whose content opens the run the landing sits in. That segment goes into a timeline carrying an axis at the seam that axis predicts, and into a timeline carrying nothing at its own playlist position: the two admissible answers, asked at a landing instead of at a placement. A wrong candidate matches neither and publishes nothing, so a misidentification costs silence rather than an axis.
The first version asked the PLAN rather than one segment ("does this run open on a playlist position"), and the fixture refuted it inside one arm: 31 boundaries over 120 s against a half-second tolerance is a coincidence, and it wrote a 0.000 axis into a timeline carrying -27.875 s, taking
capErrfrom +0.092 to -27.883 in a single tick. That case is pinned in the suite now.Measured
Same build, same arms, the link as the only variable:
capErr9.037 to the end of the sessionNo correction moves the picture:
capErrstays under a frame across every publication (+0.008 to +0.017). Seek accuracy on the failing arm goes with it, since the axis is what converts a target: the seek to 75 landed at picture 84.9 before and at 75.9 after. The first mis-seek stays, because the landing is what reveals the run, but it is one seek now instead of the rest of the session.swift test: 2629 swift-testing in 360 suites and 606 XCTest, both green; CI green on all five jobs.docs(cli): the picture probe's two errors do not have the same resolu…
fix(video): a seek landing reads what its run carries, instead of inh…
Merge PR #533: a rebuilt VOD run still carries the normalization its …
fix(axis): what composes is AVPlayer's displacement, not the axis (PR #…
feat(hls): the VOD axis is read in band, not predicted