tenseleyflow/loader / c968327

Browse files

Require reads for pattern study todos

Authored by mfwolffe <wolffemf@dukes.jmu.edu>
SHA
c968327ff2dfcfc5b2f9073833de96034f57fa36
Parents
a8b3bca
Tree
858947f

2 changed files

StatusFile+-
M src/loader/runtime/workflow.py 1 0
M tests/test_workflow.py 36 0
src/loader/runtime/workflow.pymodified
@@ -196,6 +196,7 @@ _CONTENT_EVIDENCE_HINTS = (
196196
     "format",
197197
     "cadence",
198198
     "depth",
199
+    "pattern",
199200
     "writing style",
200201
     "thorough",
201202
     "thoroughness",
tests/test_workflow.pymodified
@@ -1438,6 +1438,42 @@ def test_advance_todos_from_tool_call_does_not_complete_format_study_from_shallo
14381438
     assert "Create the main index.html file for nginx guide" in dod.pending_items
14391439
 
14401440
 
1441
+def test_advance_todos_from_tool_call_does_not_complete_pattern_study_from_shallow_glob() -> None:
1442
+    dod = create_definition_of_done("Create a multi-file nginx guide.")
1443
+    sync_todos_to_definition_of_done(
1444
+        dod,
1445
+        [
1446
+            {
1447
+                "content": "First, examine the existing fortran guide structure to understand the pattern",
1448
+                "active_form": "Working on: First, examine the existing fortran guide structure to understand the pattern",
1449
+                "status": "pending",
1450
+            },
1451
+            {
1452
+                "content": "Create the nginx directory structure",
1453
+                "active_form": "Working on: Create the nginx directory structure",
1454
+                "status": "pending",
1455
+            },
1456
+        ],
1457
+    )
1458
+
1459
+    assert (
1460
+        advance_todos_from_tool_call(
1461
+            dod,
1462
+            ToolCall(
1463
+                id="glob-reference-root",
1464
+                name="glob",
1465
+                arguments={"path": "~/Loader/guides/fortran", "pattern": "**"},
1466
+            ),
1467
+        )
1468
+        is False
1469
+    )
1470
+    assert (
1471
+        "First, examine the existing fortran guide structure to understand the pattern"
1472
+        in dod.pending_items
1473
+    )
1474
+    assert "Create the nginx directory structure" in dod.pending_items
1475
+
1476
+
14411477
 def test_advance_todos_from_tool_call_does_not_complete_deep_guide_study_from_root_index_read() -> None:
14421478
     dod = create_definition_of_done("Create a multi-file nginx guide.")
14431479
     sync_todos_to_definition_of_done(