diff --git a/conditioning.py b/conditioning.py index cf3a0d1b..9da9ccd5 100644 --- a/conditioning.py +++ b/conditioning.py @@ -3584,7 +3584,13 @@ _NO_LOVED_LABELS = { } V2_RATING_LABELS = _BASE_RATING_LABELS + [ l + "|loved" for l in _BASE_RATING_LABELS if l not in _NO_LOVED_LABELS -] + [MOVIE_EDITOR_CONTINUE_RATING, MOVIE_EDITOR_FRESH_PROMPT_RATING] +] + [MOVIE_EDITOR_CONTINUE_RATING, MOVIE_EDITOR_FRESH_PROMPT_RATING] + [str(n) for n in range(1, 11)] +# The "rating" node input is a COMBO the graph builder validates against this exact list +# (movie_editor/backend/builder.py's _live_value) -- a value that isn't in it gets silently +# swapped for the node's declared default ("Missing action") before Python ever sees it, the +# same protection that stops a saved-but-uninstalled LoRA from queuing a broken prompt. The +# H3 scale sends bare digit strings, so without them listed here every H3 rating was silently +# discarded and replaced with the same "Missing action" (+0.05) regardless of what was picked. V2_RATING_PROFILES = { "-Just forget it-": {"key": "forget", "reward": 0.0, "level": 0, "missing_axes": [], "skip_learning": True}, diff --git a/tests/test_v2_category_alignment.py b/tests/test_v2_category_alignment.py index 334b2151..9c3c5f37 100644 --- a/tests/test_v2_category_alignment.py +++ b/tests/test_v2_category_alignment.py @@ -2285,3 +2285,13 @@ def test_the_digit_scale_reward_is_monotonic(): rewards = [normalize_refiner_v2_rating(str(n))["reward"] for n in range(1, 11)] assert rewards == sorted(rewards) assert abs(rewards[0] - -0.9) < 1e-9 and abs(rewards[-1] - 1.0) < 1e-9 + + +def test_h3_scale_digits_are_valid_combo_choices(): + """The 'rating' node input is a COMBO the graph builder validates against this exact + list (movie_editor/backend/builder.py's _live_value) -- a value that isn't listed here + gets silently swapped for the node's declared default before Python ever sees it. Every + digit the H3 scale can send has to be a member, or every H3 rating silently becomes + whatever the default happens to be.""" + for n in range(1, 11): + assert str(n) in V2_RATING_LABELS