From fb006374d6b14ef9c2ab78b7349f8f69b58352dc Mon Sep 17 00:00:00 2001 From: Godopu Date: Wed, 30 Sep 2026 20:13:40 +0000 Subject: [PATCH] test(issue-26): test_bug4 checks the whole send_keys_safe body, not its first 2500 characters 34241d7 added a line near the top of send_keys_safe (SKS_QUIESCENT_TRIES normalisation), which pushed `agent prompt` from inside the 2500-character window to offset 2519. The order the test guards is unchanged (_pane_quiescent < _pane_dialog_open < agent prompt); it now slices up to the function's closing brace. Co-Authored-By: Claude Opus 5.5 --- tests/test_b19_headless_reconcile_fixes.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_b19_headless_reconcile_fixes.py b/tests/test_b19_headless_reconcile_fixes.py index 4f925cd..36c56c1 100644 --- a/tests/test_b19_headless_reconcile_fixes.py +++ b/tests/test_b19_headless_reconcile_fixes.py @@ -88,7 +88,12 @@ def test_bug4_send_keys_safe_gating_order(): sks_idx = content.find("send_keys_safe() {") assert sks_idx != -1 - sks_body = content[sks_idx:sks_idx + 2500] + # The whole function body (up to the closing brace at column 0), not a fixed + # number of characters: lines added earlier in the function must not push + # a later call out of view. + sks_end = content.find("\n}\n", sks_idx) + assert sks_end != -1 + sks_body = content[sks_idx:sks_end] quiescent_idx = sks_body.find("_pane_quiescent") dialog_idx = sks_body.find("_pane_dialog_open") prompt_idx = sks_body.find("agent prompt")