From 3ecbc17cfce76850f35848f030459b8d0cfea77d Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 30 Oct 2026 11:06:18 +0000 Subject: [PATCH] =?UTF-8?q?research:=20D=C3=BCtsch=20=E2=80=94=20fix=20int?= =?UTF-8?q?-key=20dict=20test,=20emit=20conservative=20pass=20per=20compar?= =?UTF-8?q?ison?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- research/duetsch_re100_kc5/analyze.py | 4 ++++ tests/unit/test_duetsch_protocol.py | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/research/duetsch_re100_kc5/analyze.py b/research/duetsch_re100_kc5/analyze.py index c479f54..96f07fc 100644 --- a/research/duetsch_re100_kc5/analyze.py +++ b/research/duetsch_re100_kc5/analyze.py @@ -161,6 +161,10 @@ def main(argv): profile=max(entry.get("profile_max_vs_finest", {}).values(), default=math.inf) + drift["profile"], morison_cme=dm + drift["morison"]) + bands = p.DOMAIN if ref_path else p.CROSS # domain runs name the 60 D reference + c = entry["conservative"] + entry["pass"] = (c["wave"] <= bands["wave"] and c["profile"] <= bands["profile"] + and ("morison" not in bands or c["morison_cme"] <= bands["morison"])) print(json.dumps(report, indent=1, default=float)) diff --git a/tests/unit/test_duetsch_protocol.py b/tests/unit/test_duetsch_protocol.py index 9fea3b1..c600d52 100644 --- a/tests/unit/test_duetsch_protocol.py +++ b/tests/unit/test_duetsch_protocol.py @@ -32,14 +32,14 @@ def test_phase_and_cycle_bookkeeping(): def test_settling_and_common_window(): passes = {k: True for k in range(3, 12)} assert p.settled_start(passes) == 7 # pairs 3->4, 4->5, 5->6 - late = dict(passes, **{5: False}) + late = {**passes, 5: False} assert p.settled_start(late) == 9 # pairs 6->7, 7->8, 8->9 assert p.common_window([7, 9], [passes, passes]) == (9, 10, 11) assert p.common_window([7, 10], [passes, passes]) is None # K + 2 = 12 beyond the cap assert p.common_window([7, None], [passes, passes]) is None - assert p.common_window([7, 7], [passes, dict(passes, **{8: False})]) is None # must stay settled + assert p.common_window([7, 7], [passes, {**passes, 8: False}]) is None # must stay settled # a case settled early must keep passing while waiting for the common K - assert p.common_window([7, 9], [dict(passes, **{8: False}), passes]) is None + assert p.common_window([7, 9], [{**passes, 8: False}, passes]) is None def test_solid_aware_bilinear():