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.5 KiB
1.5 KiB
infrastructure/artifacts-cas/
Purpose
Content-addressable artifact store backed by append-only segment files on disk and a SQLite index. Implements core:artifacts-store (ArtifactStore). Handles content hashing, segment layout, compaction, eviction, and crash-recovery tail scanning.
Ownership
Adapter for local filesystem artifact storage. No dependency on other infrastructure:* modules at runtime; infrastructure:persistence is a test dependency only.
Local Contracts
- Implements
ArtifactStorefromcore:artifacts-store. - Segment files are append-only;
SegmentWriter/SegmentReaderown the on-disk format (SegmentLayout). SqliteArtifactIndexmaintains the content-hash → segment offset index; the SQLite file lives alongside the segments in the configured root dir.TailScannerrecovers the index after a crash by scanning the tail of the most recent segment.LivenessScannerandEvictorhandle compaction and space reclamation.CasConfigis the only configuration surface; pass viaInfrastructureModule.createArtifactStore().- Environment observations (file existence, segment bytes) happen at call time and must not be re-read during replay — callers must record artifact content as events if replay correctness requires it (invariant #9).
Work Guidance
Standard adapter rules apply (see parent AGENTS.md). No domain logic beyond storage mechanics belongs here.
Verification
./gradlew :infrastructure:artifacts-cas:test --rerun-tasks
Child DOX Index
No child AGENTS.md (leaf module).