Archive completed tasks, add cleanup commands, self-documenting dashboard UI
CI / build (push) Has been cancelled
CI / build (push) Has been cancelled
- 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
This commit is contained in:
@@ -1 +0,0 @@
|
||||
complete
|
||||
@@ -1,34 +0,0 @@
|
||||
# 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)
|
||||
@@ -1,25 +0,0 @@
|
||||
# Doc Review: fix-verdict-parsing
|
||||
|
||||
## Summary
|
||||
Documentation review of the code changes for verdict parsing and state machine alignment.
|
||||
|
||||
## Documentation Plan Compliance
|
||||
- N/A — No DESIGN.md existed for this task (it went straight from SPEC to implementation).
|
||||
|
||||
## Documentation Completeness
|
||||
- `automaton/dashboard/core/task.py`: `parse_verdict_status()` has docstring explaining structured-first parsing and fallback behavior. ✓
|
||||
- `tests/test_task.py`: New test classes `TestVerdictParsing`, `TestStateMachineAlignment`, `TestTaskNameValidation` are self-documenting. ✓
|
||||
- No README or user-facing docs need updating (the state names displayed in the dashboard come from `COLUMN_HEADERS` and haven't changed). ✓
|
||||
|
||||
## Documentation Accuracy
|
||||
- `CHANGELOG.md`: Needs an entry under `[unreleased]`. ✓ (to be added)
|
||||
- `automaton/dashboard/core/task.py` docstring for `parse_verdict_status` accurately describes the structured-vs-fallback behavior. ✓
|
||||
|
||||
## Issues Found
|
||||
### Issue 1: Verdict format not documented in referee prompt
|
||||
- **Severity**: Medium
|
||||
- **Description**: The referee prompt (`prompts/referee.md`) doesn't require a specific `## Status:` format, which means agents could produce unstructured verdicts
|
||||
- **Suggested Fix**: Add a note to `prompts/referee.md` requiring the `## Status: PASS|FAIL|NEEDS_REVIEW` format. This is R6 in the SPEC.
|
||||
|
||||
## Score
|
||||
+5 (documentation is complete and accurate; one medium issue in referee prompt noted)
|
||||
@@ -1,24 +0,0 @@
|
||||
# Implementation: Fix Verdict Parsing and State Machine Alignment
|
||||
|
||||
## Summary
|
||||
- Added `parse_verdict_status()` function to `task.py` that uses structured status-line parsing (`## Status:`, `- **Status**:`) before falling back to substring search
|
||||
- Fixed `determine_task_state()` to use structured verdict parsing, eliminating false-BLOCKED classification when PASS verdicts discuss failures
|
||||
- Aligned state machine with orchestrator spec: IMPLEMENTATION.md alone → BUG_FIND (not IMPLEMENT), ADVERSARIAL_BUG_REPORT alone → BUG_FIND (not ADV_BUG_FIND)
|
||||
- Added filesystem-sourced task name validation in `discover_tasks()` and `parse_sub_tasks()` — directories with characters outside `[A-Za-z0-9_-]` are skipped
|
||||
- Added comprehensive test classes: `TestVerdictParsing`, `TestStateMachineAlignment`, `TestTaskNameValidation`
|
||||
- Updated existing `test_implementation_state` to reflect new state machine behavior
|
||||
|
||||
## Changes
|
||||
- `automaton/dashboard/core/task.py`: Added `parse_verdict_status()`, `_VALID_TASK_NAME_CHARS`, rewrote `determine_task_state()`, added name validation to `discover_tasks()` and `parse_sub_tasks()`
|
||||
- `tests/test_task.py`: Added 16 new tests, updated 1 existing test
|
||||
|
||||
## Test Results
|
||||
90 passed in 0.06s (full suite)
|
||||
|
||||
## Decisions
|
||||
- Kept substring fallback for unstructured verdicts for backward compatibility
|
||||
- ADVERSARIAL_BUG_REPORT alone now maps to BUG_FIND (not ADV_BUG_FIND) per orchestrator spec clarification
|
||||
- State machine checks are: DOC_REVIEW → both bug reports → BUG_REPORT alone → ADV alone → IMPLEMENTATION alone → TEST_PLAN → DESIGN → DECOMPOSITION → SPEC → BACKLOG
|
||||
|
||||
## Blockers
|
||||
None
|
||||
@@ -1,4 +0,0 @@
|
||||
# Review
|
||||
- **Status**: approved
|
||||
- **Timestamp**: 2026-06-14T20:30:14.605637
|
||||
- **Comment**:
|
||||
@@ -1,60 +0,0 @@
|
||||
# Fix Verdict Parsing and State Machine Alignment
|
||||
|
||||
## Goal
|
||||
|
||||
Fix the critical verdict-parsing bug that causes PASS verdicts to be falsely classified as BLOCKED, and align the dashboard's `determine_task_state()` with the orchestrator's state machine specification.
|
||||
|
||||
## Requirements
|
||||
|
||||
### R1. Use structured status-line parsing instead of substring search
|
||||
|
||||
`automaton/dashboard/core/task.py:159-169` currently uses substring search for FAIL/NEEDS_REVIEW/PASS. This means a PASS verdict that *mentions* a previous failure (which `referee.md` explicitly requires when comparing bug finder outputs) gets misclassified as BLOCKED.
|
||||
|
||||
**Fix**: Parse the actual status line (`## Status: PASS`, `**Status**: FAIL`, etc.) extracted from the verdict content, falling back to substring search only when no structured status line is found.
|
||||
|
||||
### R2. Fix verdict check ordering
|
||||
|
||||
The current code checks FAIL/NEEDS_REVIEW substrings *before* PASS. A correctly parsed status line makes this irrelevant for structured verdicts — only fall back to substring search for unstructured verdicts, using the same check order (check FAIL/NEEDS_REVIEW first, then PASS) but document the limitation.
|
||||
|
||||
### R3. Use same parsing in `parse_sub_tasks`
|
||||
|
||||
`task.py:215-220` has the same substring-search issue for sub-task verdicts. Apply the same fix.
|
||||
|
||||
### R4. Align `determine_task_state()` with `orchestrate.md` state machine
|
||||
|
||||
Four concrete divergences between `orchestrate.md:266-282` and `task.py:135-198`:
|
||||
|
||||
| Orchestrator says | Dashboard does | Fix |
|
||||
|---|---|---|
|
||||
| `IMPLEMENTATION.md` → Bug Find | `IMPLEMENTATION.md` → Implement | Match orchestrator: show Bug Find when IMPLEMENTATION.md exists but no BUG_REPORT.md or ADVERSARIAL_BUG_REPORT.md |
|
||||
| `BUG_REPORT.md` + `SPEC.md` (no ADV) → Adversarial Bug Find | `BUG_REPORT.md` alone → Bug Find | Match orchestrator: BUG_REPORT.md → Bug Find, ADVERSARIAL_BUG_REPORT.md alone → Adversarial Bug Find. When both exist, advance to Doc Review or Referee. |
|
||||
| `ADVERSARIAL_BUG_REPORT.md` alone → not specified | `ADVERSARIAL_BUG_REPORT.md` alone → ADV_BUG_FIND | Follow orchestrator's intent: a lone ADVERSARIAL_BUG_REPORT without BUG_REPORT technically doesn't reach Adversarial Bug Find per spec. Treat ADV alone same as BUG alone for the dashboard (Bug Find). |
|
||||
| `SPEC.md` alone → Design or Implement | `SPEC.md` alone → Research | **Keep dashboard behavior.** The orchestrator spec says "Design or Implement" meaning those are the *next* steps the orchestrator would drive. The dashboard should show the task in its *current* state (Research). No change needed. |
|
||||
|
||||
### R5. Update `parse_sub_tasks` to match the same logic
|
||||
|
||||
Sub-task state determination uses the same function, so these fixes propagate automatically. Verify that sub-tasks with only PARENT_SPEC.md or VRAM_CONFIG.md correctly show as BACKLOG.
|
||||
|
||||
### R6. Document the minimal verdict schema
|
||||
|
||||
Add a note in `prompts/referee.md` requiring that VERDICT.md include `## Status: PASS` / `## Status: FAIL` / `## Status: NEEDS_REVIEW` as a structured machine-parseable field. The dashboard relies on this for correct classification.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- [ ] `## Status: PASS` verdict mentioning the word "FAIL" in findings → DONE (not BLOCKED)
|
||||
- [ ] `## Status: PASS` verdict mentioning "NEEDS_REVIEW" in body → DONE (not BLOCKED)
|
||||
- [ ] `## Status: FAIL` verdict → BLOCKED
|
||||
- [ ] `## Status: NEEDS_REVIEW` verdict → BLOCKED
|
||||
- [ ] `IMPLEMENTATION.md` alone (no BUG_REPORT, no ADVERSARIAL_BUG_REPORT) → BUG_FIND (not IMPLEMENT)
|
||||
- [ ] `BUG_REPORT.md` + `SPEC.md` (no ADVERSARIAL_BUG_REPORT) → BUG_FIND
|
||||
- [ ] `ADVERSARIAL_BUG_REPORT.md` + `BUG_REPORT.md` + `SPEC.md` → ADV_BUG_FIND (or higher if DOC_REVIEW/VERDICT present)
|
||||
- [ ] `SPEC.md` alone → RESEARCH (unchanged, confirmed as correct)
|
||||
- [ ] Existing tests in `tests/test_task.py` still pass
|
||||
- [ ] New tests cover: PASS-verdict-mentions-FAIL, unstructured-verdict-fallback, implement-to-bug-find transition
|
||||
- [ ] `parse_sub_tasks` correctly parses structured sub-task verdicts
|
||||
|
||||
## Non-Goals
|
||||
|
||||
- Not removing substring fallback entirely (backward compat for unstructured verdicts)
|
||||
- Not changing orchestrator.md (that spec is the authority)
|
||||
- Not modifying `ui/app.py` verdict display logic
|
||||
@@ -1,23 +0,0 @@
|
||||
# Verdict: fix-verdict-parsing
|
||||
|
||||
## Status: PASS
|
||||
**Completion Date**: 2026-06-14
|
||||
|
||||
## Summary
|
||||
Fixed the critical verdict parsing bug and aligned the state machine with the orchestrator specification. All 90 tests pass. The false-BLOCKED issue where PASS verdicts mentioning "FAIL" or "NEEDS_REVIEW" were misclassified is resolved. The state machine now correctly maps IMPLEMENTATION.md alone to Bug Find and ADVERSARIAL_BUG_REPORT alone to Bug Find (matching the orchestrator spec).
|
||||
|
||||
## Findings
|
||||
- All 29 task state tests pass (16 new + 13 existing, 1 updated)
|
||||
- Full suite: 90/90 passed
|
||||
- `py_compile` clean, `bash -n` clean
|
||||
- Structured verdict parsing with substring fallback works correctly for all edge cases tested
|
||||
- Filesystem task name validation added (skips directories with invalid characters)
|
||||
|
||||
## Tasks for Review / Tie-Breaks
|
||||
- None
|
||||
|
||||
## Remaining Issues
|
||||
- `prompts/referee.md` should document the required `## Status:` format (noted in DOC_REVIEW, to be addressed in fix-prompt-consistency task)
|
||||
|
||||
## Score
|
||||
+10
|
||||
Reference in New Issue
Block a user