tenseleyflow/loader / 99fb65a

Browse files

Move starter cues earlier

Authored by mfwolffe <wolffemf@dukes.jmu.edu>
SHA
99fb65a1a953117d088ea3f73b3cf56fdab307ec
Parents
56f1959
Tree
43bca0c

2 changed files

StatusFile+-
M src/loader/runtime/repair.py 1 1
M tests/test_repair.py 6 0
src/loader/runtime/repair.pymodified
@@ -1486,7 +1486,7 @@ class ResponseRepairer:
14861486
         require_first_substantive_output: bool,
14871487
         retry_number: int,
14881488
     ) -> str | None:
1489
-        if not require_first_substantive_output or retry_number < 2:
1489
+        if not require_first_substantive_output or retry_number < 1:
14901490
             return None
14911491
         if target.suffix.lower() not in {".html", ".htm"}:
14921492
             return None
tests/test_repair.pymodified
@@ -1253,6 +1253,12 @@ def test_empty_response_retry_reuses_known_reference_structure_for_first_substan
12531253
         "as the starting pattern for this new file, then adapt the content to the current target."
12541254
         in decision.retry_message
12551255
     )
1256
+    assert (
1257
+        "For this first HTML content file, a minimal acceptable starter is: "
1258
+        "matching `<title>` and `<h1>`, one introductory paragraph, a few section "
1259
+        "blocks, and a back link to `../index.html`."
1260
+        in decision.retry_message
1261
+    )
12561262
 
12571263
 
12581264
 def test_compact_first_substantive_retry_reuses_known_reference_structure(