Files
Timmy-time-dashboard/scripts
kimi cca979d30b
Some checks failed
Tests / lint (pull_request) Has been cancelled
Tests / test (pull_request) Has been cancelled
feat: pre-cycle state validation for stale cycle_result.json
Add validate_cycle_result() to loop_guard.py that runs before each cycle:
1. Age check — removes cycle_result.json if older than 2× CYCLE_DURATION
2. Issue check — removes cycle_result.json if referenced issue is closed
3. Graceful degradation — keeps file when Gitea API is unreachable

Also adds _load_cycle_result() and _is_issue_open() helpers, plus 15 unit
tests covering all validation paths.

Fixes #661

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 23:00:13 -04:00
..