Overview
A snapshot is the derived, evaluation-ready document for one environment. Postgres owns definitions; KV holds only this blob. SDKs never see audit logs, secrets, tags, ormanagedBy.
Shape
version is environment.snapshot_version — monotonic per environment, independent of per-flag versions.
How it gets there
- Control-plane mutation + audit commit
snapshot_outboxrow- Materialize → KV
snapshots/{environmentId}/current.json - Notify
ws-gateway(snapshot.updated) - Mark outbox processed
shipd snapshots publish or wait for the drain interval.
SDK rules
- Fetch current snapshot only (no replay of versions 11–14 if you jumped 10 → 15)
- Ignore HTTP bodies with
version < local(no rollback) - After notify, retry while
version < notified(KV lag), then keep last good - Unsupported
schemaVersion→onError, keep last good
ETag: "snapshot-<version>". Send If-None-Match to get 304.
Next
- How-to: Publish a snapshot
- Edge API
- Architecture