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
1.4 KiB
1.4 KiB
Code Review: fix-stale-task-mtime-proxy
Reviewed Files
scripts/status.py(_get_edit_timestamp(),_touch_lastedit(),cmd_can_edit(),cmd_same_session(),cmd_touch(),NON_ARTIFACT_FILES)
Changes
- Added
.state.lasteditfile as the stale-task timer source _touch_lastedit()called on ALLOWED--can-editresponses_get_edit_timestamp()reads.state.lasteditwith fallback to.statemtime- Added staleness check to single-task
--can-edit --taskpath --touchnow touches.state.lasteditinstead of.state
Analysis
- Correctness: Using
.state.lastedit(touched on actual edit activity) is a better proxy for staleness than.statemtime (which only reflects phase transitions) - Backward compatibility: Falls back to
.statemtime when.state.lasteditdoesn't exist - Non-artifact:
.state.lasteditcorrectly added toNON_ARTIFACT_FILESto avoid being treated as a phase artifact - Single-task path: Adding staleness check to
--can-edit --taskmakes enforcement consistent across both code paths --touchcommand: Updated to touch.state.lastedit— consistent with the new activity tracking model
Verdict: PASS
The fix is well-structured, maintains backward compatibility, and correctly addresses the mtime proxy issue. Tests cover creation, staleness detection, and fallback behavior.