From 216d125a3bddd08027d95aba94926bfbe1288b17 Mon Sep 17 00:00:00 2001 From: Jer Miller Date: Fri, 24 Jul 2026 17:21:21 -0600 Subject: [PATCH] test(segment-completion): correct daily-gate harness comments Follow up on the daily-gate harness audit with comments and a docstring only; no executable code changes.\n\nThe explanatory comment above the post-repair assertions described the real sense-repair pre-phase. The test now simulates that side effect in-process, so the prose is corrected to say so and to point at the focused data-state, sense, and describe-promote tests as the proof of the real re-entry path.\n\n_IsolationBreach gains a docstring recording why its base is BaseException: run_bounded_phase catches bare Exception, so narrowing the base would silently restore the bypass this sentinel exists to catch. --- tests/test_segment_completion.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/tests/test_segment_completion.py b/tests/test_segment_completion.py index 759bdf007..b83ebf7c2 100644 --- a/tests/test_segment_completion.py +++ b/tests/test_segment_completion.py @@ -49,7 +49,7 @@ SEGMENT_E = "094000_300" class _IsolationBreach(BaseException): - pass + """Bypass run_bounded_phase's bare Exception handler when run_task leaks.""" @dataclass @@ -1002,13 +1002,12 @@ def test_classifier_stats_and_gate_agree_on_all_gate_states( assert not (health / "daily.updated").exists() - # The gate's sense-repair pre-phase re-enters SEGMENT_B's header-only - # record-less output and its record terminalizes, clearing that one - # not_sensed blocker; the three not_thought segments still withhold the - # day. Classifier and gate must therefore agree on the *post-repair* - # classification. Comparing the gate's log to the pre-gate snapshot only - # held while sense repair was a no-op, which is the absorbing state this - # scope removes -- the agreement property itself is unweakened. + # This test simulates the daily gate's sense-repair outcome for SEGMENT_B + # via an exact-command callback: the record-less header terminalizes + # in-process, clearing that one not_sensed blocker. The real re-entry path + # is covered by the focused data-state, sense, and describe-promote tests; + # this test owns the daily gate's post-repair classification and marker + # withholding behavior. post_repair = classify_segment_completion( cluster_segments(day), read_segment_progress(day), -- 2.51.2