- 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
1.1 KiB
Adversarial Bug Report: State File Enforcement
Deep Review
The .state file format and transition rules are robust. Approval sub-states create a hard gate that cannot be bypassed via --transition. Atomic writes via tmp+rename prevent corruption on crash.
Potential Issues
-
Race condition on create: Two concurrent
--create-taskcalls for the same name could both pass the "doesn't exist" check before one creates the directory. The atomic rename pattern mitigates this for .state writes but not formkdir. -
Manual .state tampering: A user or agent could directly edit
.stateto write an invalid phase name.status.pyhandles this ("Unknown phase" error), but the error path could be clearer about what phases are valid. -
Stale .state after crash: If an agent crashes after producing an artifact but before transitioning
.state, the.statelags behind artifacts. The artifact heuristic fallback in--auditCategory 2 catches this, but it's a recovery scenario not a normal path.