Component: Manifest Store
What it is: a versioned, append-only artifact store (PostgreSQL) that persists each manifest version as an immutable pinned artifact.
What it does: on submission (POST /v1/agents or POST /v1/manifests), assigns the next
version number and inserts it — never updates a row in place. On read, serves an exact version
or the latest, immutably.
Why append-only, with a retry loop instead of a lock: version numbers are assigned inside
the transaction via SELECT max(version)+1, guarded by a UNIQUE(agent_id, version) constraint
and a savepoint-retry loop — so two concurrent submissions for the same agent never produce a
version gap or a lost write, without holding a row lock across the whole reconciliation flow.
A rejected or needs-review outcome is still committed as history, not rolled back; only a
manifest set with a delegation cycle rolls back its whole transaction, because that must leave
no trace at all.
Related
- Reconciler — runs before every write here
- Reference → Manifests API
- Register and reconcile a manifest