Skip to content

[store] SqliteEventLog — persistent event log backend #128

@dgenio

Description

@dgenio

Context

Split from #41. Implements the SQLite-backed event log, the most complex of the 4 store types.

Depends on #40 (store protocols).

Acceptance Criteria

  • SqliteEventLog class in src/contextweaver/store/sqlite_event_log.py implementing EventLog protocol
  • Supports all EventLog methods: append(), all(), query(), children(), parent(), count(), tail()
  • Uses sqlite3 (stdlib) with WAL mode for concurrent read safety
  • Supports :memory: mode for testing
  • ContextItem stored via to_dict() / from_dict() in JSON columns
  • Deterministic query ordering (ORDER BY rowid)
  • Passes the same test suite as InMemoryEventLog via parameterized fixture
  • Exported from src/contextweaver/store/__init__.py
  • Full type hints, docstrings, from __future__ import annotations
  • Module ≤300 lines

File Paths

  • src/contextweaver/store/sqlite_event_log.py (new)
  • src/contextweaver/store/__init__.py (edit — export)
  • tests/test_store_event_log.py (edit — parameterize fixture for InMemory + SQLite)

Verification

make ci
pytest tests/test_store_event_log.py

Parent Issue

Part of #41 (SQLite-backed persistent stores).

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/storeData stores: event log, artifacts, episodic, factscomplexity/averageStandard effort, moderate familiarity neededenhancementNew feature or requestmilestone/v0.3v0.3 — Production readinesspriority/highHigh priority — closes a critical gap

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions