Appendix
Environment Matrix
Live, preview and dev side by side
The three environments a request can run in, and what each one resolves to.
| Live | Preview | Dev | |
|---|---|---|---|
| What it is | The promoted release | A branch build | A person's working copy |
| Release row | The one the app's live pointer names | The branch's release with status preview | A dev release per workspace, resumed rather than recreated |
| Host | {slug}.{app apex} and custom domains | {label}--{slug}.{app apex} | The dev box's preview host {sessionId}.{sandbox apex}, through the sandbox proxy |
| Host resolution | The app's own origin serves live | A double-hyphen label names a preview release | None; dev is reached by refinement from a session or a hook token |
| Data plane key | The live release id | The preview release id | The dev release id |
| Databases | The live files | A clone taken at build | A clone taken at session start; reset, truncate, and lift available |
| Code | The compiled bundles for the release | The compiled bundles for the preview release | Transpiled per request on the dev box or the laptop |
| Runs on | A release sandbox | A release sandbox | The dev box, or the CLI tunnel |
| Secrets | Prod values | Prod values | Dev values |
| Who reaches it | Anyone the app admits | Workspace members with a session, and share-link holders | The person, through their own preview and control channel |
| Gate | The app's own auth | Required before any of the /_/ surface answers | The person's platform session |
| Realtime channel scope | live | preview | dev |
| Request log and metrics label | live | preview | dev |
| Precedence when a credential is present | The host wins outright over any session token | Session beats a validated dev-session header, which beats the host |
The environment is decided once, by one of three resolution paths: from a host, from a request carrying an interface session, or from a callback carrying a hook token. Each yields a resolved environment that every handler receives as a required parameter and asks, rather than re-deriving the decision downstream.