@@ -1367,7 +1367,7 @@ def test_compact_first_substantive_retry_reuses_known_reference_structure( |
| 1367 | 1367 | ) |
| 1368 | 1368 | |
| 1369 | 1369 | |
| 1370 | | -def test_first_substantive_retry_activates_on_second_empty_turn( |
| 1370 | +def test_first_substantive_retry_activates_on_first_empty_turn( |
| 1371 | 1371 | temp_dir: Path, |
| 1372 | 1372 | ) -> None: |
| 1373 | 1373 | context = build_context( |
@@ -1431,7 +1431,7 @@ def test_first_substantive_retry_activates_on_second_empty_turn( |
| 1431 | 1431 | decision = repairer.handle_empty_response( |
| 1432 | 1432 | task="Create a multi-file nginx guide.", |
| 1433 | 1433 | original_task=None, |
| 1434 | | - empty_retry_count=2, |
| 1434 | + empty_retry_count=1, |
| 1435 | 1435 | max_empty_retries=4, |
| 1436 | 1436 | dod=dod, |
| 1437 | 1437 | ) |
@@ -1663,16 +1663,13 @@ def test_empty_response_retry_points_at_declared_child_file_within_incomplete_ou |
| 1663 | 1663 | |
| 1664 | 1664 | assert decision.should_continue is True |
| 1665 | 1665 | assert decision.retry_message is not None |
| 1666 | | - assert "Next missing planned artifact: `introduction.html`" in decision.retry_message |
| 1667 | 1666 | assert ( |
| 1668 | | - "Resume with this exact next step: continue `Write the introduction chapter` " |
| 1669 | | - "by creating `introduction.html`." |
| 1667 | + "Continue `Write the introduction chapter` by creating `introduction.html`." |
| 1670 | 1668 | in decision.retry_message |
| 1671 | 1669 | ) |
| 1672 | 1670 | assert "Next declared output under `chapters/`" not in decision.retry_message |
| 1673 | 1671 | assert ( |
| 1674 | | - f"Prefer one `write(content=...)` call for `{(chapters / 'introduction.html').resolve(strict=False)}` " |
| 1675 | | - "before more research." |
| 1672 | + f'Emit this tool shape now: `write(file_path="{display_runtime_path(chapters / "introduction.html")}", content="...")`.' |
| 1676 | 1673 | in decision.retry_message |
| 1677 | 1674 | ) |
| 1678 | 1675 | |
@@ -2374,15 +2371,18 @@ def test_empty_response_retry_names_next_file_from_observed_sibling_directory( |
| 2374 | 2371 | |
| 2375 | 2372 | assert decision.should_continue is True |
| 2376 | 2373 | assert decision.retry_message is not None |
| 2377 | | - assert "Next missing planned artifact: `01-introduction.html`" in decision.retry_message |
| 2378 | 2374 | assert ( |
| 2379 | | - "Resume with this exact next step: continue `Write the introduction chapter` " |
| 2380 | | - "by creating `01-introduction.html`." |
| 2375 | + "Continue `Write the introduction chapter` by creating `01-introduction.html`." |
| 2376 | + in decision.retry_message |
| 2377 | + ) |
| 2378 | + assert ( |
| 2379 | + f'Emit this tool shape now: `write(file_path="{display_runtime_path(chapters / "01-introduction.html")}", content="...")`.' |
| 2381 | 2380 | in decision.retry_message |
| 2382 | 2381 | ) |
| 2383 | 2382 | assert "Next observed output pattern under `chapters/`" not in decision.retry_message |
| 2384 | 2383 | assert ( |
| 2385 | | - "It mirrors the observed filename pattern from another `chapters/` directory " |
| 2386 | | - "you already inspected." |
| 2384 | + f"You already read `{display_runtime_path(reference_chapters / '01-introduction.html')}`; " |
| 2385 | + "reuse its overall structure as the starting pattern for this new file, then adapt the " |
| 2386 | + "content to the current target." |
| 2387 | 2387 | in decision.retry_message |
| 2388 | 2388 | ) |