From a90e570f484611a0add5fa7cfd5575d835a2e0ee Mon Sep 17 00:00:00 2001 From: Marius Ciepluch <11855163+norandom@users.noreply.github.com> Date: Fri, 2 Oct 2026 15:25:21 +0200 Subject: [PATCH] fix(learn): v1 withholds verify.flag_b and ms.operation (plane-profile leak audit) Maintainer decision 2026-10-02. Not pushed with the release; main is otherwise at v2.0.0. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01EmM1j46qgKMh3zqD1QMwEo --- src/openultrasast/learn/schema.py | 7 ++++++- tests/test_learn_leaks.py | 10 ++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/openultrasast/learn/schema.py b/src/openultrasast/learn/schema.py index 3a48e5d..d34e10e 100644 --- a/src/openultrasast/learn/schema.py +++ b/src/openultrasast/learn/schema.py @@ -102,7 +102,12 @@ EXCLUDED_FIELDS = frozenset( # Entries name an instrument (all its state and values) or a single feature. v1 withholds the engine and the function # length: both separate fixed from vulnerable pair sides by construction (a fix removes a sink, a guard lengthens the # function), not by anything that holds on unseen code (leak audit 2026-10-01). -INPUT_PROFILES: Mapping[str, tuple[str, ...]] = {"v1": ("engine", "facts.function_lines"), "full": ()} +# The plane profile also withholds verify.flag_b and ms.operation in v1 (maintainer decision 2026-10-02 on the +# slice-2 leak audit: they separate pair sides because a fix removes the sink, which does not hold on unseen code). +INPUT_PROFILES: Mapping[str, tuple[str, ...]] = { + "v1": ("engine", "facts.function_lines", "verify.flag_b", "ms.operation"), + "full": (), +} DEFAULT_INPUTS = "v1" diff --git a/tests/test_learn_leaks.py b/tests/test_learn_leaks.py index a9b44a7..70a66f1 100644 --- a/tests/test_learn_leaks.py +++ b/tests/test_learn_leaks.py @@ -113,3 +113,13 @@ def test_v1_withholds_function_length_from_prompts_and_distance() -> None: assert "facts.function_lines: 42" in render_signals(a["x"], a["instruments"], "static", inputs="full") assert gower(a["x"], a["instruments"], b["x"], b["instruments"], "static") == 0.0 assert gower(a["x"], a["instruments"], b["x"], b["instruments"], "static", inputs="full") > 0.0 + + +def test_v1_withholds_the_plane_profile_leak_signals() -> None: + """Slice-2 leak audit (2026-10-02): verify.flag_b and ms.operation track the pair label in the plane profile; + v1 renders neither and the distance ignores both, while ``full`` keeps them.""" + from openultrasast.learn.schema import withheld + + hidden = withheld("v1") + assert {"verify.flag_b", "ms.operation", "engine", "facts.function_lines"} <= hidden + assert withheld("full") == frozenset()