Skip to content

SQLite state store: schema baseline, WAL mode, connection management #3

Description

@Ryan-Atkinson87

Spec: §2 (SQLite), §13 (SQLite → Postgres migration path), §18.3 (per-issue state markers), §15 (Postgres-switch trigger).

The durable state store for run state, blocker records, usage history, efficiency rollups, and per-issue crash-recovery markers. Schema starts minimal; the deliverable is the connection layer, WAL mode, and a migration baseline that keeps the Postgres path clean.

Acceptance criteria

  • SQLite database initialised with WAL mode enabled (§15: single async process with parallel sessions stays on SQLite).
  • Connection/session management with explicit open/close and error paths — no silent except: pass.
  • A schema-versioning / migration baseline so the §13 Postgres path stays clean.
  • Initial tables for at least run state and per-issue state markers (§18.3) — minimal columns acceptable, extended in later phases.
  • No assumption of multiple concurrent writers (§15).
  • Tests cover init/migrate and a write/read round-trip.

Dependencies

Depends on: #1

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions