Files
automaton/tasks/fix-verdict-pass-inference/SPEC.md
T
Lap Tran 81ccf548e5
CI / build (push) Has been cancelled
Fix 10 audit bugs: path prefix matching, verdict parsing, CORS, stale-task detection, phase mapping
Batch 1 (High severity):
- Bug 1: --audit cat3 now checks .automaton/tasks/ paths
- Bug 4: Verdict PASS/FAIL uses structured ## Status: line parsing
- Bug 5: register-guards.sh checks .json/.jsonc, writes plugin key, strips comments
- Bug 7: --can-edit/--scope-check path prefix uses os.sep boundary

Batch 2 (Medium/Low severity):
- Bug 2: migrate-project.sh find command parentheses for -prune binding
- Bug 3: vram_detect model prefix matching with known-suffix whitelist
- Bug 6: dashboard reads .state file before artifact heuristic fallback
- Bug 8: removed wildcard CORS, added security headers (nosniff, DENY)
- Bug 9: stale-task detection uses .state.lastedit instead of .state mtime
- Bug 10: TEST_PLAN.md maps to test_design (was implement)

249 tests pass (up from 235). All 10 tasks driven through full workflow to completion.
2026-06-22 10:40:58 -04:00

1.2 KiB

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