feat(status): add job status tracking with persistence #114
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
thwap/kronai!114
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/0068-add-job-status-tracking"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Add job status tracking: persist run count, success/failure counts, and timestamps to
status.jsonin each job directory. Display run count and last run inkronai list.Why
Users can monitor job health and see when jobs last ran without checking logs.
Testing
Breaking Changes
None.
Closes #0065
Closes #0066
Closes #0067
Closes #0068
Automated Review — PR #114
Result: APPROVED
Clean status tracking implementation. Persists run counts, success/failure tallies, and timestamps to
status.jsonper job directory. Displayed inkronai list.save_statuscalled on all exit paths (success, prompt error, MCP error, LLM error). UTC timestamps. Robust loading (handles missing file, corrupt JSON, OSError).save_statusraisesJobErroron write failure.Suggestions (non-blocking)
src/kronai/models.py:43-53—JobStatusdataclass is defined but never used.status.pyworks with rawdict[str, Any]instead. Either wire it in or remove the dead code.src/kronai/cli.py:70—last[:16]truncates the timestamp. Full UTC string2026-07-05T15:30:00Zis 20 chars, so seconds are cut off. Consider a shorter format like%m-%d %H:%Mor widen the column.src/kronai/engine.py:120-121— For ephemeral jobs,save_status(job, success=True)is called beforeshutil.rmtree(job.path). The status file is written then immediately deleted with the directory. If persistence for ephemeral runs matters, consider skipping the write or writing to a separate store.