Fix verdict parsing + plug stale-task enforcement hole
CI / build (push) Has been cancelled

- task.py: remove naive substring fallback from parse_verdict_status(),
  only parse ## Status: header; no header → ambiguous (REFEREE)
- status.py: add _auto_update_verdict_on_complete() — when transitioning
  human_intervention→complete, auto-update VERDICT.md to PASS
- status.py: add stale-task detection to --can-edit — deny edits if
  all edit tasks have .state mtime >30 min old (reason: stale_task)
- status.py: add --touch command to reset task activity clock
- guard plugin: handle stale_task reason with specific error message
- Update test to match new verdict parsing behavior
This commit is contained in:
2026-06-15 21:55:17 -04:00
parent cc412a51bb
commit 21f16b7da2
18 changed files with 124 additions and 20 deletions
+1 -1
View File
@@ -184,7 +184,7 @@ class TestVerdictParsing:
ver = "# Verdict\nEverything looks good, PASS!"
task_dir = _make_task(tmp_path, "no-status-line", {"SPEC.md": "# Spec", "VERDICT.md": ver})
state, _ = determine_task_state(task_dir)
assert state == TaskState.DONE
assert state == TaskState.REFEREE # no structured ## Status: header → ambiguous
def test_verdict_no_status_no_keywords(self, tmp_path: Path) -> None:
ver = "# Verdict\n\nNeeds further discussion."