@@ -19,6 +19,7 @@ from .dod import ( |
| 19 | 19 | derive_verification_commands, |
| 20 | 20 | ensure_active_verification_attempt, |
| 21 | 21 | planned_artifact_target_satisfied, |
| 22 | + sanitize_verification_commands, |
| 22 | 23 | synthesize_todo_items, |
| 23 | 24 | ) |
| 24 | 25 | from .events import AgentEvent, TurnSummary |
@@ -354,8 +355,12 @@ class TurnFinalizer: |
| 354 | 355 | and dod.verification_plan |
| 355 | 356 | and Path(dod.verification_plan).exists() |
| 356 | 357 | ): |
| 357 | | - dod.verification_commands = extract_verification_commands_from_markdown( |
| 358 | | - Path(dod.verification_plan).read_text() |
| 358 | + dod.verification_commands = sanitize_verification_commands( |
| 359 | + extract_verification_commands_from_markdown( |
| 360 | + Path(dod.verification_plan).read_text() |
| 361 | + ), |
| 362 | + dod=dod, |
| 363 | + project_root=self.context.project_root, |
| 359 | 364 | ) |
| 360 | 365 | |
| 361 | 366 | if ( |
@@ -363,15 +368,23 @@ class TurnFinalizer: |
| 363 | 368 | and dod.implementation_plan |
| 364 | 369 | and Path(dod.implementation_plan).exists() |
| 365 | 370 | ): |
| 366 | | - dod.verification_commands = extract_verification_commands_from_markdown( |
| 367 | | - Path(dod.implementation_plan).read_text() |
| 371 | + dod.verification_commands = sanitize_verification_commands( |
| 372 | + extract_verification_commands_from_markdown( |
| 373 | + Path(dod.implementation_plan).read_text() |
| 374 | + ), |
| 375 | + dod=dod, |
| 376 | + project_root=self.context.project_root, |
| 368 | 377 | ) |
| 369 | 378 | |
| 370 | 379 | if not dod.verification_commands: |
| 371 | | - dod.verification_commands = derive_verification_commands( |
| 372 | | - dod, |
| 380 | + dod.verification_commands = sanitize_verification_commands( |
| 381 | + derive_verification_commands( |
| 382 | + dod, |
| 383 | + project_root=self.context.project_root, |
| 384 | + task_statement=dod.task_statement, |
| 385 | + ), |
| 386 | + dod=dod, |
| 373 | 387 | project_root=self.context.project_root, |
| 374 | | - task_statement=dod.task_statement, |
| 375 | 388 | ) |
| 376 | 389 | else: |
| 377 | 390 | for command in derive_verification_commands( |
@@ -382,6 +395,11 @@ class TurnFinalizer: |
| 382 | 395 | ): |
| 383 | 396 | if command not in dod.verification_commands: |
| 384 | 397 | dod.verification_commands.append(command) |
| 398 | + dod.verification_commands = sanitize_verification_commands( |
| 399 | + dod.verification_commands, |
| 400 | + dod=dod, |
| 401 | + project_root=self.context.project_root, |
| 402 | + ) |
| 385 | 403 | |
| 386 | 404 | await self.set_workflow_mode( |
| 387 | 405 | ModeDecision.transition( |