Skip to content

TASK-002C: Startup Hydration and Workflow Persistence Integration

AI Execution Profile

  • Model class: Balanced or High-capability
  • Reasoning effort: Medium to High

Scope

  • load history on startup into app state
  • persist terminal run summaries after terminal outcomes
  • keep ordering newest first
  • prevent duplicate history records for the same RunId
  • keep LastRunSummary aligned with the newest history item

Copy/Paste Prompt

text
Implement only TASK-002C: Startup Hydration and Workflow Persistence Integration.

Read first:
- docs/specs/SLICE-002-persistent-run-history.md
- docs/adrs/ADR-001-use-central-app-state-store.md
- docs/adrs/ADR-002-file-backed-run-history-store-before-database-persistence.md
- docs/tasks/slice-002/TASK-002C-startup-hydration-and-workflow-persistence-integration.md

Goal:
- Integrate persistent run history into startup and terminal workflow behavior.

Scope:
- Load persisted history on startup into canonical app state.
- Persist terminal run summaries after Completed, Stopped, Aborted, and Faulted outcomes.
- Ensure newest-first ordering.
- Prevent duplicate records for the same RunId.
- Keep LastRunSummary aligned with the newest history entry.

Do not:
- Build advanced UI
- Rework core workflow semantics that are already working

Important:
- Preserve the owned app-state mutation path
- Make failure to persist history non-fatal to the app runtime

Docs-first project memory for AI-assisted implementation.