Manifests, Inventories, and Ownership
This page defines architecture and ownership boundaries for manifest data. Table-level schema contracts live in dedicated table-reference pages.
Architecture Invariants
- Download-state authority is
download_manifest.db. - Ingest-state authority is
ingest_manifest.db. - Coverage and reports are derived outputs, not primary source-of-truth state.
- Runtime pipeline code reads/writes through shared storage contracts.
- Runtime paths do not run schema/data migrations.
Completeness Model
Catalog size is not completeness. Completeness is asserted by checkpoint/run ledgers and successful window processing, not by the count of known acts alone.
Ownership Boundary
The ingest persistence stack has a strict split:
IngestRepositoryowns SQL primitives only.IngestManifestDbStoreowns orchestration and policy.- Runners call store intent methods, not repository methods directly.
Repository Owns
- Single-table primitives (or deterministic replace of fixed dependent rows).
- Inputs that are already normalized row payloads and resolved IDs.
- No policy decisions (no batching strategy, retries, or dedupe policy).
Store Owns
- Multi-step units of work across repository calls.
- Transaction scope, write ordering, and lock scope.
- Identity resolution and run-scope caches.
- Domain-facing intent APIs consumed by runners.
Placement Checklist
Put code in repository when all are true:
- It is a table-oriented primitive operation.
- Inputs are normalized rows / resolved IDs.
- No application policy is applied.
Put code in store when any are true:
- It coordinates multiple repository operations.
- It decides sequencing, transaction scope, or lock scope.
- It resolves identities or manages run-scope state.
- It is the domain-facing API used by runners.
Artifact Flow (High-Level)
- Download phase writes download inventory/catalog/checkpoint state to
download_manifest.dband artifacts to export storage. - Ingest phase writes ingest run/checkpoint/canonical-output state to
ingest_manifest.db. - Backfill consumes missing-interval hints and updates ingest state.
Where Table Contracts Live
- Download DB table contracts:
docs/download/download_manifest_db_tables.md - Ingest DB table contracts:
docs/ingest/ingest_manifest_db_tables.md
Related Architecture Docs
- Law/judicial hub separation ADR:
docs/development/adr-law-judicial-hub-separation.md - Law-judicial cross-link contract spec:
docs/development/spec-law-judicial-cross-link.md