@@ -220,10 +220,10 @@ def test_restored_injected_prompts_hidden(self):
220220 def test_nudge_and_final_check_hidden (self ):
221221 """Harness bookkeeping is hidden from the panel: the injected
222222 completion-nudge user prompt and the assistant's [FINAL CHECK]
223- block never show up — a check-only reply renders as a "Task
224- complete." marker instead, and a reply carrying real content
225- keeps its content. The stored messages are untouched — the
226- agent loop keeps working exactly as before."""
223+ block never show up — even when the check block is the reply's
224+ ONLY content ( a reply carrying real content keeps its content).
225+ The stored messages are untouched — the agent loop keeps
226+ working exactly as before."""
227227 from python_agent_harness import config
228228
229229 tui , buf = make_tui ()
@@ -247,11 +247,10 @@ def test_nudge_and_final_check_hidden(self):
247247 self .assertIn ("build the thing" , out )
248248 self .assertIn ("Done. All tests pass." , out )
249249 # the [FINAL CHECK] block is hidden even when it is the whole
250- # reply — a check-only message renders as the done marker
250+ # reply — check-only messages never render
251251 self .assertNotIn ("FINAL CHECK" , out )
252252 self .assertNotIn ("Status: SUCCESS" , out )
253253 self .assertNotIn (config .NUDGE_MESSAGE , out )
254- self .assertIn ("Task complete." , out )
255254 # the agent loop's history is untouched
256255 self .assertEqual (
257256 tui .session .last_messages [1 ].text (),
@@ -281,15 +280,13 @@ def test_final_check_markdown_variants_hidden(self):
281280 "[FINAL CHECK]\n - **Goal:** g\n - **Status:** SUCCESS\n - **Evidence:** e" ,
282281 "## Final Check\n \n - Goal: g\n - Status: SUCCESS\n - Evidence: e\n " ,
283282 "answer.\n \n [Final check]\n * `Goal`: g\n * `Status`: SUCCESS\n * `Evidence`: e" ,
284- "answer.\n \n [FINAL CHECK]\n - Goal: g\n - Status: SUCCESS\n - Evidence (re-verified): e" ,
285283 ]
286284 for text in variants :
287285 with self .subTest (text = text ):
288286 self .assertNotIn ("Goal" , _strip_final_check (text ))
289287 # no dangling markdown decoration left behind
290288 self .assertNotIn ("*" , _strip_final_check (text ))
291289 # a reply's real content survives the strip
292- self .assertEqual (_strip_final_check (variants [- 2 ]), "answer." )
293290 self .assertEqual (_strip_final_check (variants [- 1 ]), "answer." )
294291
295292 def test_final_check_prose_mention_kept (self ):
@@ -323,16 +320,14 @@ def test_final_check_without_header_kept(self):
323320 self .assertIn ("Status: SUCCESS" , out )
324321 self .assertIn ("Evidence:" , out )
325322
326- def test_stream_pure_final_check_shows_marker (self ):
327- """A stream that is only the [FINAL CHECK] block renders the
328- done marker instead of flashing bookkeeping or going blank."""
323+ def test_stream_pure_final_check_hidden (self ):
324+ """A stream that is only the [FINAL CHECK] block never renders
325+ — the row goes blank on the final reply instead of flashing
326+ bookkeeping."""
329327 tui , _ = make_tui ()
330328 tui .stream_text = "[FINAL CHECK]\n - Goal: x\n - Status: SUCCESS\n - Evidence: y"
331329 row = tui ._stream_row ()
332- self .assertIsNotNone (row )
333- self .assertIn ("Task complete." , row .plain )
334- self .assertNotIn ("FINAL CHECK" , row .plain )
335- self .assertNotIn ("Status: SUCCESS" , row .plain )
330+ self .assertIsNone (row )
336331
337332 def test_reasoning_streams_normally (self ):
338333 """While streaming, reasoning content shows up live like any
0 commit comments