Skip to content

ADR-0002: Config lives in Postgres

Status: Accepted

Superseded by: —

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.

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.

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.