Repository navigation
Report measured display-criteria settle times and name the switch's ordering - #279
Merged
Merged
Conversation
…ring The Stage 2 settle logs summed `startGrace.ticks * 10 + stage2Ticks * 50`. The first term is Stage 1's blind-poll budget, not the time spent in it: Stage 1 breaks out the moment it sees a switch, and the loop index was discarded. A switch the gate saw immediately and that settled on Stage 2's first tick therefore logged `~1050ms` under the .full budget when it had taken about 50 ms. Every settle time in every log collected so far is inflated by up to a second, which makes them useless for the one question they get read for: how long a panel really takes to switch. #274 sized the play-gate Stage 1 budget down to 200 ms for sessions no dynamic-range switch can reach, resting on the premise from d87b54d that rate-only switches are sub-second. The logs that would confirm or refute that premise could not, and still cannot, be read that way. This does not change the budget, it makes the measurement that decides it trustworthy. The line now reports Stage 1 and total separately, both measured, plus which signal ended Stage 1. That last bit is the ordering question Sodalite#49 was filed on: the observers are registered on entry, so a switch already running can only be seen through the in-progress flag (`pre-gate`, meaning the panel was switching while the AVPlayerItem was built) while a start notification means it began inside the gate (`in-gate`). No log line distinguished the two before. Second defect from the same logs: the Stage 2 cap explained every unobservable switch as "likely DV", including an engine SDR rate-only write, which is the same misattribution #274 fixed one branch over. The cap now reads `criteriaAttribution` (renamed from `switchEndOutcome`, since both a switch that ended and one still pending ask the same question) and an engine rate-only write that never reports an end is logged as its own event. Two of the reporter's five runs sat here for the full two seconds on SDR content. Timing helpers and attribution are pure and unit-tested. Verified on the tvOS build: the changed body is inside `#if os(tvOS)` and a macOS `swift build` does not compile it. Measured from logs supplied by @nathanpiper on Sodalite#49. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01HX5zV3Fcf7Nzq4DYGdXvQE
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.
The Stage 2 settle logs summed
startGrace.ticks * 10 + stage2Ticks * 50. The first term is Stage 1's blind-poll budget, not the time spent in it, so a switch the gate saw immediately and that settled on Stage 2's first tick logged~1050msunder the.fullbudget when it had taken about 50 ms.That makes every settle time in every log collected so far unusable for the question they get read for. #274 sized the play-gate Stage 1 budget down to 200 ms for sessions no dynamic-range switch can reach, on the premise from d87b54d that rate-only switches are sub-second; the logs that would confirm or refute it could not be read that way. This changes no budget, only the measurement that decides it.
What the line reports now
start pre-gatevsstart in-gate: the observers are registered on entry, so a switch already running is only visible through the in-progress flag.pre-gatetherefore means the panel was switching while the AVPlayerItem was built,in-gatemeans it started inside the gate. This is the ordering question Sodalite#49 was filed on, and no log line distinguished the two.Second defect from the same logs
The Stage 2 cap explained every unobservable switch as "likely DV", including an engine SDR rate-only write. That is the same misattribution #274 fixed one branch over. The cap now reads the same attribution helper (
switchEndOutcomerenamed tocriteriaAttribution, since a pending switch and an ended one ask the same question), so a rate-only write that never reports an end is logged as its own event. Two of the reporter's five runs sat at the cap for the full two seconds on SDR content.Verification
swift test --filter DisplayCriteria: 23 tests, 3 suites, green. Timing helpers and attribution are pure and covered, including that the reported total no longer contains the budget.xcodebuild -scheme AetherEngine -destination generic/platform=tvOS build: succeeded. Required, the changed body is inside#if os(tvOS)and a macOSswift buildnever compiles it.swift build -Xswiftc -strict-concurrency=complete: clean.Measured from logs supplied by @nathanpiper on Sodalite#49.
🤖 Generated with Claude Code
https://claude.ai/code/session_01HX5zV3Fcf7Nzq4DYGdXvQE