Files
automaton/tasks/fix-verdict-parsing/BUG_REPORT.md
T
gitea 05c76852a2
CI / build (push) Has been cancelled
v2.0: state enforcement, project scoping, harness integration
State Enforcement (v2.0):
- .state file as single source of truth for task phase
- Approval gates for research, decomposition, design, test_design
- status.py --transition refuses illegal phase transitions
- status.py --validate-folder detects out-of-order artifacts
- status.py --audit checks all tasks for violations
- status.py --create-task is the only valid way to create tasks
- Pre-v2.0 tasks without .state are UNTRACKED -- all commands refuse them
- New --upgrade command bootstraps .state files for existing tasks

Project Scoping:
- --project flag added to all status.py commands across 16+ files
- _find_project_dir errors instead of silently falling back to ~/.automaton/
- --scope-check marks framework files OUT_OF_SCOPE when working on a project
- Dashboard handlers use stored project_root instead of re-detecting from CWD
- Prompts reference ~/.automaton/scripts/vram_detect.py (not {project}/.automaton/)

Harness Integration:
- status.py --can-edit now supports project-level checks (no --task required)
- --can-edit --file checks file scope without --task
- --json output for machine-readable harness integration
- opencode plugin (plugins/automaton-guard/plugin.ts) intercepts edit/write
- Git pre-commit hook (scripts/git-hooks/pre-commit) blocks commits without task
- Formal integration contract (contracts/harness-integration.md)

Other:
- upgrade.sh delegates to status.py --upgrade instead of manual heuristics
- Phase prompts reference --project {project} for multi-project scoping
- 200 tests passing (14 new)
2026-06-15 14:16:46 -04:00

34 lines
2.1 KiB
Markdown

# Bug Report: fix-verdict-parsing
## Summary
Critical: PASS verdicts that discuss past failures (FAIL/NEEDS_REVIEW) were falsely classified as BLOCKED due to substring-based verdict parsing. State machine had 4 divergences from orchestrator spec.
## Bugs Found
### Bug 1: False-BLOCKED verdict parsing — CRITICAL
- **Severity**: Critical
- **Location**: `automaton/dashboard/core/task.py:159-169`
- **Description**: Substring search for FAIL/NEEDS_REVIEW checked before PASS. A verdict like "## Status: PASS — the previous FAIL finding was resolved" was classified as BLOCKED.
- **Reproduction**: Create a VERDICT.md with `## Status: PASS` that mentions the word "FAIL" anywhere in the body.
- **Suggested Fix**: Parse structured status lines (`## Status:` / `**Status**:`) first, fall back to substring only for unstructured verdicts. **Fixed.**
### Bug 2: IMPLEMENTATION.md alone shows "Implement" instead of "Bug Find"
- **Severity**: Medium
- **Location**: `automaton/dashboard/core/task.py:181`
- **Description**: A task with only IMPLEMENTATION.md (no BUG_REPORT) showed as "Implement" instead of "Bug Find". The orchestrator spec says this should be Bug Find phase.
- **Suggested Fix**: Align state machine with orchestrator. **Fixed.**
### Bug 3: ADVERSARIAL_BUG_REPORT alone shows "Adversarial Bug Find" instead of "Bug Find"
- **Severity**: Low
- **Location**: `automaton/dashboard/core/task.py:179`
- **Description**: Without a BUG_REPORT present, an ADVERSARIAL_BUG_REPORT artifact shouldn't trigger ADV_BUG_FIND per orchestrator spec (which requires BUG_REPORT + SPEC first). Mapped to BUG_FIND for consistency.
- **Suggested Fix**: Map ADV alone to BUG_FIND. **Fixed.**
### Bug 4: Filesystem task names bypass validation
- **Severity**: Medium
- **Location**: `automaton/dashboard/core/task.py:248`
- **Description**: Directory names with special characters (quotes, spaces) are served to JS and interpolated into HTML onclick attributes.
- **Suggested Fix**: Skip directories with invalid names in `discover_tasks()` and `parse_sub_tasks()`. **Fixed.**
## Score
+10 (all critical and medium bugs fixed)