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
17 lines
1.1 KiB
Markdown
17 lines
1.1 KiB
Markdown
# Spec: fix-dashboard-read-state
|
|
|
|
## Problem
|
|
`automaton/dashboard/core/task.py:462` (`determine_task_state`) infers task phase purely from artifact files, never reading the `.state` file. This contradicts `prompts/workflow.md` which declares `.state` as the "single source of truth." The dashboard cannot reflect the actual enforced state.
|
|
|
|
## Fix
|
|
Read the `.state` file first in `determine_task_state()`. If `.state` exists, parse the phase and map it to a `TaskState`. Fall back to artifact heuristics only if `.state` doesn't exist (pre-v2.0 tasks).
|
|
|
|
The phase string in `.state` may include substates like `research:awaiting_approval` — map these to their base phase (`research`).
|
|
|
|
## Acceptance Criteria
|
|
- A task in `implement` phase (per `.state`) shows as `IMPLEMENT` in the dashboard even without IMPLEMENTATION.md
|
|
- A task in `test_design` phase shows as `TEST_DESIGN`, not `IMPLEMENT`
|
|
- A task without `.state` still uses artifact heuristics (backward compat)
|
|
- Existing dashboard tests in `test_task.py` still pass
|
|
- Add test verifying `.state` takes precedence over artifacts
|