States
Environments and instances share one status:degraded is soft — redeploying the failing component flips it back to healthy.
Primary instance
New environments enable the primary by default, and deploy it as soon as they’re created — both from Deploy a repo and from the composer (untick it there for a definition-only environment). With the primary off, an environment is a pure definition — it runs nothing until a PR spawns a preview or you press Deploy now. Turning the primary on later (Enable primary on the Deployments tab) brings up an always-on instance at the tracked refs immediately; turning it off tears it down. The primary is the one instance with no TTL — it stays up until you disable it. Each deploy first syncs it from the definition, so composition, variable, and domain edits ship on the next deploy.PR previews
Dev instances
A dev instance is a full copy of an environment spun up fromsw dev up to test a branch. It’s tied to the CLI session: the CLI heartbeats to keep it alive, Ctrl-C tears it down, and if the CLI dies it’s reaped within a few minutes. A hard cap (8 hours) limits it regardless.
Manual instances
A manual instance (Deploy now) is a disposable copy at the latest tracked commits. Pushes don’t touch it — use its Deploy latest to re-resolve every ref to HEAD and pull the environment’s current variables and secrets. It expires on a one-shot TTL (the plan’s deployment TTL, or 24 hours if the plan has none).TTL
An environment’s TTL comes from your plan, not the composer. The clock starts athealthy, so build time doesn’t eat your window. PR previews inherit the environment’s TTL; the primary has none; dev instances use a short rolling window refreshed by the CLI.
Refresh
Refresh on an instance re-resolves every sibling component (not the PR’s own) to the parent environment’s current tracked-ref HEAD and redeploys them. Use it when a sibling’smain has moved on since the PR opened.