TASK-002B: File-Backed History Store
AI Execution Profile
- Model class:
Balanced - Reasoning effort:
Medium
Scope
- implement file-backed JSON history storage in infrastructure
- make the file path configurable
- support load-all and append-or-upsert behavior by
RunId - define safe behavior for missing files and corrupted content
Copy/Paste Prompt
text
Implement only TASK-002B: File-Backed History Store.
Read first:
- docs/specs/SLICE-002-persistent-run-history.md
- docs/adrs/ADR-002-file-backed-run-history-store-before-database-persistence.md
- docs/tasks/slice-002/TASK-002B-file-backed-history-store.md
Goal:
- Implement the infrastructure-side JSON file-backed run history store.
Scope:
- Implement configurable-path file storage.
- Support loading existing history.
- Support append or upsert by RunId.
- Handle missing files gracefully.
- Surface corrupted or unreadable content as a recoverable failure path.
Do not:
- Wire startup hydration yet
- Wire workflow persistence yet
- Build UI yet
Important:
- Keep the implementation behind the application abstraction
- Keep behavior testable with temporary files