Repository navigation
diag(live): the first live manifest names the interval it held (#374) - #383
Merged
Merged
Conversation
A loopback live session's entire join latency is one withheld `/media.m3u8` response. The first serve holds until the window carries the live-edge holdback (`3 x TARGETDURATION`, #189) of content behind the edge, and everything else the engine does for that session is finished before the gate is entered. Measured against a paced raw-MPEG-TS origin on 6.27.0, the startup ladder reached `sessionConstructed` at +0.19 s in every arm, while the first `readyToPlay` landed at 18.66 s, 12.70 s, 6.75 s and 0.43 s for 0, 6, 12 and 30 s of origin backlog: the wait is the runway being filled at whatever rate the origin hands it over, and nothing else. Only a FAILED gate logged. A successful eighteen-second hold left no trace at all, so a downstream host measuring a slow live start had no way to tell this apart from a slow probe without instrumenting from the outside. Every exit now names what it held, the window it served and the holdback it was measured against: first live manifest served after 18.154s: 5 segments / 20.000s >= 18.000s holdback (TARGETDURATION 6s) Two of those exits change more than their wording. The bounded `.fastZap` start reported its grace alone, which is the last leg of the wait rather than the wait, so a start that had held 10.284 s described itself as 2.000 s. And the exit where no segment was ever cut returned in silence, which from a host's side is the one outcome indistinguishable from a merely slow origin. The interval is monotonic, because it is a measurement; the deadline stays on `Date` because `NSCondition.wait(until:)` takes one. One account per session, latched under `firstSegmentCondition`, since every `/media.m3u8` without an `_HLS_msn` re-enters the gate and a steady session would otherwise repeat the line at its refresh interval. `docs/api.md` gains the paragraph that says where a live start's seconds go, and how `startupProgress` stalling at `sessionConstructed` separates this wait from the demux probe and the display handshake. Raised by ksktech-dev while measuring AetherEngine against libVLC across their device matrix (#374). Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01E5UztmCZtNYPQpzdmSdmWG
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.
A loopback live session's entire join latency is one withheld
/media.m3u8response, and until now only a failed gate said so.What the gate does
The first serve holds until the window carries the live-edge holdback (
3 x TARGETDURATION, #189) of content behind the edge, because serving earlier puts AVPlayer's opening seek inside its own stall-danger zone and it restarts in a loop instead of playing. Everything else the engine does for that session finishes before the gate is entered.Measured on 6.27.0 with
aetherctl liveagainst a paced raw-MPEG-TS origin, same machine and fixture, varying only the backlog the origin holds at join:readyToPlayThe startup ladder reached
sessionConstructedat +0.19 s in every one of them. The wait is the runway being filled at whatever rate the origin hands it over, and nothing else.What changes
Every exit from the gate now names what it held, the window it served and the holdback it was measured against:
Two exits change more than their wording:
.fastZapstart reported its grace alone, which is the last leg of the wait rather than the wait. The third line above described itself as2.000sbefore this change, having held for10.284s.The interval is monotonic, because it is a measurement; the deadline stays on
DatebecauseNSCondition.wait(until:)takes one. One account per session, latched underfirstSegmentCondition, since every/media.m3u8without an_HLS_msnre-enters the gate.docs/api.mdgains Where a live start's seconds go: the mechanism, the fact thatstartupProgressstalls atsessionConstructedfor the whole wait (which separates it fromstreamsProbedandrouted), andliveJoinProfileas the lever with the honest caveat that the win belongs to the source GOP rather than to the flag.Test plan
Issue374FirstServeAccountTests, 7 tests, all seen red first: four pin the account line (interval, holdback derived from TD rather than taken on trust, the>=/<verdict, and that a free runway still gets a line), three drive the gate itself (exactly one account across repeated requests, the bounded start naming the whole wait, the never-cut exit speaking).** BUILD SUCCEEDED **.aetherctl live, all three shapes above, against the paced fixture origin at--preroll 0and--preroll 30plus a long-GOP seed under--fast-zap.Raised by @ksktech-dev while measuring AetherEngine against libVLC across their device matrix (#374).