Skip to content

fix(display): serve an unproven HDR master after the mode switch, not during it (#667) - #669

Merged
superuser404notfound merged 1 commit into
mainfrom
fix/667-master-after-switch
Sep 29, 2026
Merged

superuser404notfound merged 1 commit into
mainfrom
fix/667-master-after-switch

Conversation

@superuser404notfound

Copy link
Copy Markdown
Owner

Refs #667

What happened

The pre-flight gate releases the load at its 2 s cap while an HDR switch is still running, on purpose (#348). On a panel whose EDR headroom never proves HDR (#459), the route then offers the master and lets AVPlayer's acceptance stand in for the readout. Mid-switch, AVPlayer answers for the mode the panel is leaving: in the report (tvOS 27.0, HDR10 panel) the master failed with -11868 80 ms after it was served and 660 ms before modeSwitchEnd. The #535 guard only checks eligibleForHDRPlayback, which reads true on that box, so the refusal latched (#588) and every later HDR title went media-direct without its SUBTITLES/AUDIO renditions.

Change

  • unprovenMasterAwaitsSwitchEnd: when the route is an unproven master attempt and a switch this load was armed for has been seen to start but not end (DisplayCriteriaController.observedSwitchIsRunning), the load waits for that end (awaitObservedEnd, same 6 s ceiling as the play gate, record not consumed), re-reads the panel and routes again. The Load during the panel switch instead of behind it (the play gate serialises what could overlap) #348 overlap stays everywhere else. A switch nobody saw start is not waited on, so an unobservable DV switch cannot hold the load.
  • shouldLatchPanelRefusal also requires that no display mode switch is in progress. The item still falls back to media; only the latch is withheld.

Cost: the prep that used to overlap the switch's tail (about 140 ms in the report). The play gate held the first frame until the switch end anyway.

Verification

  • swift test: 3591 swift-testing tests pass, XCTest 0 failures. New Issue667MasterAfterSwitchTests; Issue535RefusalNeedsEligibilityTests updated for the new parameter.
  • tvOS generic build succeeds.
  • Not device-verified. The expected log on the reporter's box: unproven HDR master waits for the running switch ..., then switch settled via modeSwitchEnd, then the master served and readyToPlay with no -11868. If the master is refused after the switch has settled, the latch sets as before and the timing hypothesis is wrong.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS

… during it (#667)

The pre-flight gate releases the load at its 2 s cap while an HDR switch is
still running (#348). On a panel whose headroom never proves HDR (#459) the
route then offers the master and lets AVPlayer's acceptance answer, but
mid-switch AVPlayer answers for the mode the panel is leaving: on tvOS 27
the master failed with -11868 660 ms before the switch ended, and the
refusal latched (#588), so every HDR title went media-direct.

That route now waits for a switch it saw start to end, re-reads the panel
and routes then. A switch nobody saw start is not waited on, so an
unobservable DV switch cannot hold the load. A refusal raised while the
system reports a switch in progress still falls back for the item but no
longer latches.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
@superuser404notfound
superuser404notfound merged commit af81ca9 into main Sep 29, 2026
7 checks passed
@superuser404notfound
superuser404notfound deleted the fix/667-master-after-switch branch September 29, 2026 20:26
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