From 825d68c653fa795cb90cb7165be0e429b4a8e06a Mon Sep 17 00:00:00 2001 From: Ben Stull Date: Sun, 7 Jun 2026 22:53:40 -0700 Subject: [PATCH] refactor(player): state.py tests track discrete Restyle.variant Co-Authored-By: Claude Opus 4.8 (1M context) --- player/state.py | 4 ++-- tests/test_player_state.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/player/state.py b/player/state.py index 6ffa6bc..0b14e27 100644 --- a/player/state.py +++ b/player/state.py @@ -5,8 +5,8 @@ desired Playback (which neutral base clip, how it is altered, what audio plays, at what levels) and returns the Transition from the previous Playback. The transition KIND encodes design ยง4.3: the Dark/Light grade and the Left overlay are continuous runtime ops (LIVE_UPDATE), whereas swapping the clip or the -pre-baked Right v2v variant needs a CROSSFADE, and toggling video on/off -fades to/from black. +pre-baked Right restyle variant (a discrete index) needs a CROSSFADE, and +toggling video on/off fades to/from black. Knobs no longer *select* a clip (the base library is neutral by construction); they *transform* it. Which neutral base to show is an injected policy diff --git a/tests/test_player_state.py b/tests/test_player_state.py index fe9b25b..49bb109 100644 --- a/tests/test_player_state.py +++ b/tests/test_player_state.py @@ -56,7 +56,7 @@ def test_overlay_change_is_a_live_update(): p.update(_controls(content="video", left=0)) t = p.update(_controls(content="video", left=4)) assert t.kind == TransitionKind.LIVE_UPDATE - assert t.playback.plan.overlay.intensity == 1.0 + assert t.playback.plan.overlay.level == 4 def test_restyle_change_crossfades_the_substrate(): @@ -65,7 +65,7 @@ def test_restyle_change_crossfades_the_substrate(): p.update(_controls(content="video", right=0)) t = p.update(_controls(content="video", right=4)) assert t.kind == TransitionKind.CROSSFADE - assert t.playback.plan.restyle.blend == 1.0 + assert t.playback.plan.restyle.variant == 4 def test_volume_only_change_is_a_live_update():