d26f20c316
Root Child DOX Index assembled, plus a per-module AGENTS.md across the tree (core/*, infrastructure/*, apps/*, testing/*, and docs/examples/frontend/etc), each following the DOX section shape: Purpose, Ownership, Local Contracts, Work Guidance, Verification, Child DOX Index.
1.2 KiB
1.2 KiB
infrastructure/persistence/
Purpose
Event store adapters for the correx event log. Provides SqliteEventStore (durable, production) and InMemoryEventStore (tests/dev). Also contains LiveArtifactRepository, which projects artifact state from the event log via core:artifacts.
Ownership
Sole persistence adapter for core:events (EventStore). No other infrastructure module may write to the event log.
Local Contracts
SqliteEventStoreimplementsEventStorefromcore:events; the SQLite file is the authoritative event log.InMemoryEventStoreis for tests only — not suitable for production use.LiveArtifactRepositoryimplementsArtifactRepositoryfromcore:artifactsby replaying events; it never persists state independently (invariant #1).- Schema migrations are the responsibility of this module;
JDBCHelperowns connection utilities. - The event log is append-only: no updates or deletes to existing rows.
Work Guidance
Standard adapter rules apply (see parent AGENTS.md). All JDBC calls go in withContext(Dispatchers.IO).
Verification
./gradlew :infrastructure:persistence:test --rerun-tasks
Child DOX Index
No child AGENTS.md (leaf module).