@@ -2249,7 +2249,7 @@ async def test_tool_batch_runner_missing_artifact_nudge_names_next_file_after_se |
| 2249 | 2249 | |
| 2250 | 2250 | |
| 2251 | 2251 | @pytest.mark.asyncio |
| 2252 | | -async def test_tool_batch_runner_first_file_handoff_stays_persistent( |
| 2252 | +async def test_tool_batch_runner_first_chapter_handoff_becomes_ephemeral_after_first_file( |
| 2253 | 2253 | temp_dir: Path, |
| 2254 | 2254 | ) -> None: |
| 2255 | 2255 | async def assess_confidence( |
@@ -2351,8 +2351,9 @@ async def test_tool_batch_runner_first_file_handoff_stays_persistent( |
| 2351 | 2351 | consecutive_errors=0, |
| 2352 | 2352 | ) |
| 2353 | 2353 | |
| 2354 | | - assert persistent_messages |
| 2355 | | - message = persistent_messages[-1] |
| 2354 | + assert persistent_messages == [] |
| 2355 | + assert ephemeral_messages |
| 2356 | + message = ephemeral_messages[-1] |
| 2356 | 2357 | assert "Confirmed progress:" in message |
| 2357 | 2358 | assert "Next step: create `01-introduction.html`." in message |
| 2358 | 2359 | assert ( |
@@ -2360,7 +2361,6 @@ async def test_tool_batch_runner_first_file_handoff_stays_persistent( |
| 2360 | 2361 | in message |
| 2361 | 2362 | ) |
| 2362 | 2363 | assert "Do not reread reference material or spend the next turn on bookkeeping." in message |
| 2363 | | - assert ephemeral_messages == [] |
| 2364 | 2364 | |
| 2365 | 2365 | |
| 2366 | 2366 | @pytest.mark.asyncio |
@@ -2477,7 +2477,7 @@ async def test_tool_batch_runner_softens_first_file_handoff_after_recovery_promp |
| 2477 | 2477 | assert persistent_messages == [] |
| 2478 | 2478 | assert ephemeral_messages |
| 2479 | 2479 | message = ephemeral_messages[-1] |
| 2480 | | - assert "Resume by creating `01-introduction.html` now." in message |
| 2480 | + assert "Next step: create `01-introduction.html`." in message |
| 2481 | 2481 | |
| 2482 | 2482 | |
| 2483 | 2483 | @pytest.mark.asyncio |
@@ -2932,13 +2932,10 @@ async def test_tool_batch_runner_mutation_handoff_points_at_next_missing_artifac |
| 2932 | 2932 | consecutive_errors=0, |
| 2933 | 2933 | ) |
| 2934 | 2934 | |
| 2935 | | - assert persistent_messages |
| 2936 | | - message = persistent_messages[-1] |
| 2935 | + assert persistent_messages == [] |
| 2936 | + assert ephemeral_messages |
| 2937 | + message = ephemeral_messages[-1] |
| 2937 | 2938 | assert "Next step: create `01-getting-started.html`." in message |
| 2938 | | - assert ( |
| 2939 | | - f"Prefer one `write(file_path=..., content=...)` call for `{chapter_one.resolve(strict=False)}` now." |
| 2940 | | - in message |
| 2941 | | - ) |
| 2942 | 2939 | assert "refresh `TodoWrite`" not in message |
| 2943 | 2940 | assert "Do not reread reference material or spend the next turn on bookkeeping." in message |
| 2944 | 2941 | |
@@ -3062,7 +3059,7 @@ async def test_tool_batch_runner_large_plan_does_not_claim_completion_early( |
| 3062 | 3059 | ) |
| 3063 | 3060 | |
| 3064 | 3061 | assert any( |
| 3065 | | - "Resume by creating `06-performance-tuning.html` now." in message |
| 3062 | + "Next step: create `06-performance-tuning.html`." in message |
| 3066 | 3063 | for message in ephemeral_messages |
| 3067 | 3064 | ) |
| 3068 | 3065 | assert not any( |
@@ -3188,8 +3185,8 @@ async def test_tool_batch_runner_uses_compact_missing_artifact_nudge_after_subst |
| 3188 | 3185 | |
| 3189 | 3186 | assert ephemeral_messages |
| 3190 | 3187 | message = ephemeral_messages[-1] |
| 3191 | | - assert "Resume by creating `05-advanced-features.html` now." in message |
| 3192 | | - assert "No TodoWrite, no verification, no rereads until that artifact exists." in message |
| 3188 | + assert "Next step: create `05-advanced-features.html`." in message |
| 3189 | + assert "Do not reread reference material or spend the next turn on bookkeeping." in message |
| 3193 | 3190 | assert "refresh `TodoWrite`" not in message |
| 3194 | 3191 | |
| 3195 | 3192 | |