Introduce an explicit environment concept so the same config repo drives eqrm-dev (rehearsal) and prod (real), Terraform-workspace-style. Part of the Phase 6 epic. Foundation already in place: the state file is host-bound and loading against a different host throws (src/state/state.ts) — this issue builds the ergonomics and the promotion workflow on top.
Depends on portable configs (logical references) — without them the same config cannot target two instances at all.
Scope
Acceptance criteria
Introduce an explicit environment concept so the same config repo drives eqrm-dev (rehearsal) and prod (real), Terraform-workspace-style. Part of the Phase 6 epic. Foundation already in place: the state file is host-bound and loading against a different host throws (
src/state/state.ts) — this issue builds the ergonomics and the promotion workflow on top.Depends on portable configs (logical references) — without them the same config cannot target two instances at all.
Scope
(host, token reference, state file path)triple, e.g. in a smallct.envs.json/ config-repo file;ct plan --env prod,ct apply --env dev. No env flag → current single-host behavior unchanged.src/auth/tokenStore.tsstores a singlecredentialsblob (one host+token pair). Extend to per-host keychain accounts (account name keyed by host); until then multi-env runs must passCT_HOST/CT_LOGINTOKENper invocation, which CI does anyway.ct-state.dev.json/ct-state.prod.json), both committed to the config repo.--auto-approve, or a distinct--yes-prod— decide and document.src/api/version.ts) — envs may run different CT versions; surface both inct planoutput.Acceptance criteria
ct plan --env devand--env prodboth work in the same checkout with no file edits.