pub async fn build_desired_state(
config: &Config,
root_dir: &Path,
shadow_pool: &PgPool,
) -> Result<Catalog>Expand description
Build the desired-state catalog on a shadow database: clean it, apply the roles file and schema files, and return the managed catalog (the shadow branch inherits image substrate, which is outside the managed universe).
This is THE desired-state source. Every command that needs “what the schema
files describe” — apply, diff, migrate new/update/validate/diff, baseline —
goes through here, so settings like
schema.augment_dependencies_from_files apply uniformly.