You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fastZap's bounded start can serve a window shallower than the holdback it advertises, so AVPlayer joins with no cushion #594
fastZap's bounded start serves the first live manifest once two segments exist plus a short grace, and that window can be shallower than the holdback the same manifest advertises. On both captures in #524 it served a 9 s window against a 12 s holdback, so AVPlayer's initial seek to edge-minus-holdback lands at the very start of the window and the session joins with no cushion at all.
This is a trade rather than a defect, which is why it is filed on its own: zap latency was bought with join depth deliberately. What has never been measured is the price, and #524 is the wrong thread for it because that issue's own defect (the delivery meter reading a backlogged join as the source's rhythm) shipped in 6.81.0.
Where it sits
waitForFirstLiveSegment (Sources/AetherEngine/Video/VideoSegmentProvider.swift:2323) prefers the full gate, LiveEdgePolicy.startupCushionSatisfied, which holds until the window carries holdBackSeconds = 3 x TD of content (:333, :379). Below it, the bounded branch at :2348 arms a deadline once minStartupSegments = 2 segments exist (:99) plus fastZapDegradedGraceSeconds = min(2.0, max(0.5, maxSegmentDuration)) (:337), and when that deadline passes it serves whatever is there as long as two segments exist (:2373).
On a 6 s upstream that is 12 s of content required by the full gate and 12 s of holdback advertised, against a bounded start that can serve after two segments and up to 2 s of grace. The manifest then promises a holdback the window cannot honour.
What would settle it
A multi-channel A/B on aetherctl, at least three upstream cadences (1 s, 3 s, 6 s segments) and both profiles:
Arm A: the bounded start as it stands, two segments plus grace.
Arm B: a bounded start floored at 3 x TD of content or at the wall-clock deadline, whichever comes first.
Three readings per zap: time to first picture, whether a -16832 "restarting from end of live playlist" stall appears in the first 30 s, and the standing distance behind live at t+60 s.
The hypothesis worth testing is that the cost falls only on strict-realtime origins: the earlier HLSPlaylistTracker A/B showed a backlogged origin hands its whole window over at I/O speed, so arm B should reach the floor immediately there and cost nothing. If that holds, the floor is free on exactly the sources where the shallow join hurts least, and the trade is only real on origins that publish in lockstep.
Files: VideoSegmentProvider.swift:99, :333-341, :2323-2400, and LiveEdgePolicy.startupCushionSatisfied at :355.
Split out of #524, where it was named on 2026-09-11 and left as the one residual after the cadence fix shipped in 6.81.0.
The arm is merged as 202c1add (PR #601). The policy is unchanged: AETHER_BOUNDED_START_FLOOR=1 is a measurement arm, off by default.
The defect reproduces, and it grows with the cut
hlsfixture serving pre-cut GOP-aligned segments, play --live --fast-zap --seconds 45, two passes per cell (three for 6 s / A):
origin cut
arm
gate held
first manifest
first picture
-16832
1 s
A (bounded)
3.028 s
2 segs / 2.000 s < 3 s holdback
3.47 s
0
1 s
B (floored)
3.068 s
3 segs / 3.000 s >= 3 s holdback
3.26 s
0
3 s
A
8.252 s
2 segs / 6.000 s < 9 s holdback
9.64 s
0
3 s
B
9.458 s
3 segs / 9.000 s >= 9 s holdback
9.65 s
0
6 s
A
14.342 s
2 segs / 12.000 s < 18 s holdback
16.72 s
0
6 s
B
18.597 s
3 segs / 18.000 s >= 18 s holdback
18.79 s
0
Arm A serves short at every cadence, and the shortfall widens as the cut grows: 12 s of window against an 18 s holdback at a 6 s cut, worse than the 9-against-12 the issue quoted from the #524 captures.
The price has a closed form
One more segment minus the grace. The gate deltas are exactly that: +0.04 s at a 1 s cut, where the 1.0 s grace already covers the whole wait, +1.21 s at 3 s, +4.26 s at 6 s where the grace clamps to 2.0 s. At the picture, +0.00 / +0.01 / +2.07 s. So the floor is free at fine cadences and costs about two seconds of zap at a coarse one.
What is still not measured, and why the table must not be read as if it were
-16832 did not appear once, in either arm, at any cadence, across thirteen runs. That is not evidence that the shallow window is safe.
On this harness the session joins at the head of the served window: cur starts at the window's first sample and advances at 1x from there. It never performs the seek to edge-minus-holdback that this issue is about, so the state the floor would prevent is never entered. Adding --dvr-window 60 does not change it, and the per-tick fields cannot be used to check it either: edge= stays pinned at its first value for the whole run and behind= is derived from it, so both read 0.00 regardless of where the playhead actually is.
Two of the three readings named in "What would settle it" therefore landed, and the third did not. The hypothesis about strict-realtime versus backlogged origins did hold where it could be checked: a backlog origin satisfies the full cushion before the grace would ever fire, so the floor costs it nothing (testFloorIsFreeOnABacklogOrigin, 0.005 s).
Where that leaves the issue
Open, and narrowed to one question: does a window shallower than the advertised holdback actually cost anything on a client that performs the holdback seek? Settling it needs either a field capture from a real origin or a harness whose join reproduces that seek. Until then the trade stands, and the arm is in the tree to drive that repro with.
Measurement table and the limitation are written up in docs/cli.md.
The second-grace half of this question is answered on device in #686: the first-serve latch now covers engine-cut sources by default in 7.28.2 (637466fa), first picture about 1 s sooner on every bounded start, the session 0.5 to 1.5 s nearer the edge, no stall in 18 latched Apple TV launches. The first request's bounded start itself (arm B, AETHER_BOUNDED_START_FLOOR) is unchanged.
Activity
superuser404notfound commentedon Sep 22, 2026
Priced, half of it
The arm is merged as
202c1add(PR #601). The policy is unchanged:AETHER_BOUNDED_START_FLOOR=1is a measurement arm, off by default.The defect reproduces, and it grows with the cut
hlsfixtureserving pre-cut GOP-aligned segments,play --live --fast-zap --seconds 45, two passes per cell (three for 6 s / A):-16832Arm A serves short at every cadence, and the shortfall widens as the cut grows: 12 s of window against an 18 s holdback at a 6 s cut, worse than the 9-against-12 the issue quoted from the #524 captures.
The price has a closed form
One more segment minus the grace. The gate deltas are exactly that: +0.04 s at a 1 s cut, where the 1.0 s grace already covers the whole wait, +1.21 s at 3 s, +4.26 s at 6 s where the grace clamps to 2.0 s. At the picture, +0.00 / +0.01 / +2.07 s. So the floor is free at fine cadences and costs about two seconds of zap at a coarse one.
What is still not measured, and why the table must not be read as if it were
-16832did not appear once, in either arm, at any cadence, across thirteen runs. That is not evidence that the shallow window is safe.On this harness the session joins at the head of the served window:
curstarts at the window's first sample and advances at 1x from there. It never performs the seek to edge-minus-holdback that this issue is about, so the state the floor would prevent is never entered. Adding--dvr-window 60does not change it, and the per-tick fields cannot be used to check it either:edge=stays pinned at its first value for the whole run andbehind=is derived from it, so both read 0.00 regardless of where the playhead actually is.Two of the three readings named in "What would settle it" therefore landed, and the third did not. The hypothesis about strict-realtime versus backlogged origins did hold where it could be checked: a backlog origin satisfies the full cushion before the grace would ever fire, so the floor costs it nothing (
testFloorIsFreeOnABacklogOrigin, 0.005 s).Where that leaves the issue
Open, and narrowed to one question: does a window shallower than the advertised holdback actually cost anything on a client that performs the holdback seek? Settling it needs either a field capture from a real origin or a harness whose join reproduces that seek. Until then the trade stands, and the arm is in the tree to drive that repro with.
Measurement table and the limitation are written up in
docs/cli.md.superuser404notfound commentedon Sep 22, 2026
Released in 7.13.0 (
18a18aac). Both consumers are pinned to it.superuser404notfound commentedon Oct 6, 2026
The second-grace half of this question is answered on device in #686: the first-serve latch now covers engine-cut sources by default in 7.28.2 (
637466fa), first picture about 1 s sooner on every bounded start, the session 0.5 to 1.5 s nearer the edge, no stall in 18 latched Apple TV launches. The first request's bounded start itself (arm B,AETHER_BOUNDED_START_FLOOR) is unchanged.