ADR-0002: Config lives in Postgres
Status: Accepted
Superseded by: —
Context
Section titled “Context”The operator must edit gates, triage, flows, constitution and domain from a browser and see the next session behave differently without a redeploy. Render’s filesystem is ephemeral. In-place file edits would be lost on every deploy.
Decision
Section titled “Decision”Config is stored as versioned rows in config_files. On first boot, seed from /config in the repo. Thereafter Postgres is authoritative. Saving creates a new version, flips is_current, and invalidates the middleware cache. The repo files are the initial state only.
Consequences
Section titled “Consequences”Tuning does not require a deploy. This doc site generates from the repo copies of those files, not from live Postgres. The admin console is the source of truth for what is running. Revert is an operator action on config_files, not git checkout.