Files
automaton/tasks/complete/fix-verdict-pass-inference/SPEC.md
T
Lap Tran 4a2301b077
CI / build (push) Has been cancelled
Archive completed tasks, add cleanup commands, self-documenting dashboard UI
- Archive 79 completed framework-dev tasks from tasks/ -> tasks/complete/
- status.py: add --cleanup-done and --install-cleanup-schedule commands
- Add scripts/automaton-cleanup.sh for periodic task archiving
- Dashboard: rename 'Background' tab -> 'Agent', 'Cleanup' agent -> 'Completed Task Archiver', remove redundant group headers and pill badges, dim inactive agent placeholders
- .rules.md: add Self-Documenting UI Names rule
- New tests: test_cleanup_done.py, expanded test_app.py and test_task.py
2026-06-24 22:43:33 -04:00

16 lines
1.2 KiB
Markdown

# Spec: fix-verdict-pass-inference
## Problem
`_infer_state_from_artifacts()` in `scripts/status.py:311` uses `if "PASS" in content:` (substring search) to determine if a VERDICT.md is PASS. A FAIL or NEEDS_REVIEW verdict containing "PASS" in its body (e.g., "All unit tests PASS") is misclassified as `complete`.
The dashboard's `parse_verdict_status()` (`automaton/dashboard/core/task.py:63`) already has the correct structured-line parsing — status.py should use the same approach.
## Fix
Replace the substring check at `scripts/status.py:311` with structured-line parsing: look for `## Status:` or `- **Status**:` header lines and check the value after the colon. Return `"complete"` only for exact `PASS` match, `"human_intervention"` for `FAIL`/`NEEDS_REVIEW`, and keep the current fallback for unparseable verdicts.
## Acceptance Criteria
- A VERDICT.md with `## Status: FAIL` and "tests PASS" in the body is classified as `human_intervention`, not `complete`
- A VERDICT.md with `## Status: PASS` is classified as `complete`
- A VERDICT.md with no parseable status header falls through to the current behavior
- Add a test in `tests/test_status.py` covering the FAIL-with-PASS-in-body case