@@ -828,7 +828,7 @@ def test_advance_todos_from_tool_call_tracks_plan_progress() -> None: |
| 828 | 828 | in dod.completed_items |
| 829 | 829 | ) |
| 830 | 830 | |
| 831 | | - assert advance_todos_from_tool_call( |
| 831 | + assert not advance_todos_from_tool_call( |
| 832 | 832 | dod, |
| 833 | 833 | ToolCall( |
| 834 | 834 | id="glob-chapters", |
@@ -838,7 +838,7 @@ def test_advance_todos_from_tool_call_tracks_plan_progress() -> None: |
| 838 | 838 | ) |
| 839 | 839 | assert ( |
| 840 | 840 | "List and read all HTML files in the chapters directory to extract chapter information" |
| 841 | | - in dod.completed_items |
| 841 | + in dod.pending_items |
| 842 | 842 | ) |
| 843 | 843 | |
| 844 | 844 | assert advance_todos_from_tool_call( |
@@ -849,6 +849,19 @@ def test_advance_todos_from_tool_call_tracks_plan_progress() -> None: |
| 849 | 849 | arguments={"file_path": "/tmp/fortran/chapters/01-introduction.html"}, |
| 850 | 850 | ), |
| 851 | 851 | ) |
| 852 | + assert ( |
| 853 | + "List and read all HTML files in the chapters directory to extract chapter information" |
| 854 | + in dod.completed_items |
| 855 | + ) |
| 856 | + |
| 857 | + assert advance_todos_from_tool_call( |
| 858 | + dod, |
| 859 | + ToolCall( |
| 860 | + id="read-second-chapter", |
| 861 | + name="read", |
| 862 | + arguments={"file_path": "/tmp/fortran/chapters/02-setup.html"}, |
| 863 | + ), |
| 864 | + ) |
| 852 | 865 | assert "Parse chapter titles from each HTML file" in dod.completed_items |
| 853 | 866 | |
| 854 | 867 | assert advance_todos_from_tool_call( |
@@ -1077,6 +1090,42 @@ def test_advance_todos_from_tool_call_does_not_complete_content_examination_from |
| 1077 | 1090 | assert "Develop the main index.html file for the nginx guide" in dod.pending_items |
| 1078 | 1091 | |
| 1079 | 1092 | |
| 1093 | +def test_advance_todos_from_tool_call_does_not_complete_format_study_from_shallow_glob() -> None: |
| 1094 | + dod = create_definition_of_done("Create a multi-file nginx guide.") |
| 1095 | + sync_todos_to_definition_of_done( |
| 1096 | + dod, |
| 1097 | + [ |
| 1098 | + { |
| 1099 | + "content": "First, examine the existing fortran guide structure to understand the format", |
| 1100 | + "active_form": "Working on: First, examine the existing fortran guide structure to understand the format", |
| 1101 | + "status": "pending", |
| 1102 | + }, |
| 1103 | + { |
| 1104 | + "content": "Create the main index.html file for nginx guide", |
| 1105 | + "active_form": "Working on: Create the main index.html file for nginx guide", |
| 1106 | + "status": "pending", |
| 1107 | + }, |
| 1108 | + ], |
| 1109 | + ) |
| 1110 | + |
| 1111 | + assert ( |
| 1112 | + advance_todos_from_tool_call( |
| 1113 | + dod, |
| 1114 | + ToolCall( |
| 1115 | + id="glob-reference-root", |
| 1116 | + name="glob", |
| 1117 | + arguments={"path": "~/Loader/guides/fortran", "pattern": "**"}, |
| 1118 | + ), |
| 1119 | + ) |
| 1120 | + is False |
| 1121 | + ) |
| 1122 | + assert ( |
| 1123 | + "First, examine the existing fortran guide structure to understand the format" |
| 1124 | + in dod.pending_items |
| 1125 | + ) |
| 1126 | + assert "Create the main index.html file for nginx guide" in dod.pending_items |
| 1127 | + |
| 1128 | + |
| 1080 | 1129 | def test_advance_todos_from_tool_call_does_not_complete_deep_guide_study_from_root_index_read() -> None: |
| 1081 | 1130 | dod = create_definition_of_done("Create a multi-file nginx guide.") |
| 1082 | 1131 | sync_todos_to_definition_of_done( |