ReferenceGate transitions

For the conceptual overview of what gates are and why they exist, see Concepts: Gates. This page is the exhaustive reference: every state, every legal transition, and every blocker.

States

The deployment flow is a 7-state machine. Every session and resulting deployment moves linearly through gates 1 → 7. Going back is allowed up to a point (see “Going back” below).

GateNameWhat happensTypical duration
1IntentCustomer states what to deploy in natural languageConversational
2NamePick a name + tags for the resourceConversational
3Cloud targetPick the cloud account and regionConversational
4SizingAgent proposes a tier; customer confirms or adjustsConversational
5ReviewAgent renders the Terraform plan; admin approves (if approvals required)1 min – several hours
6Deployterraform apply runs2–25 min (resource-dependent)
7DoneResources live; agent enters monitor modePersistent

Allowed transitions

The agent advances gates when the user (or system) supplies the required input and validators pass.

FromToTriggerAllowed when
12User confirms intentAlways — gate 1 always accepts
23Name providedName passes the kebab-case + uniqueness validator
34Cloud account pickedCloud account is connected and the user has deploy permission on it
45Sizing confirmedTier is one of the agent’s offered options
56”Looks good” + approval (if required)If org requires approvals: an admin who is NOT the requester clicks Approve. Otherwise: skip the approval step
67Apply succeedsAll resources created without error

Going back

Users can revise an earlier gate by typing go back or revise gate N.

FromTo (back)AllowedSide effect
21AlwaysClears the name
31 or 2AlwaysClears cloud + name selections downstream
41, 2, or 3AlwaysClears sizing + downstream
51, 2, 3, or 4Always (before approval)Clears plan + downstream; if approval was already given, re-request needed
51–4Blocked after gate 6 startsApply may have begun; use destroy or roll back instead
65Blocked once apply startsApply is partially destructive — use roll back this deployment instead
7anyUse destroyResources are live; you can’t “go back” past gate 7. Run destroy this deployment to wind down

Forbidden transitions

The orchestrator refuses these — they are unsafe.

AttemptedWhy blocked
5 → 6 without admin approval (org has approvals enabled)Approval policy enforcement
Self-approving gate 5 (requester also tries to approve)An admin who is not the requester must approve
6 → 5 once terraform apply has startedApply mutates cloud state; you cannot rewind. Roll back or destroy instead
7 → 5 or 6Once gate 7 is reached, the path forward is destroy + re-create

Reverting from gate 6

After terraform apply has started, the orchestrator no longer permits “go back.” The available options are:

  • Roll back (roll back this deployment) — agent runs terraform destroy against the partial state. Best when apply errored mid-way.
  • Retry (retry apply) — agent re-runs terraform apply against the existing state. Use when the failure is transient (e.g., a cloud-side rate limit).
  • Destroy (destroy this deployment) — full teardown of all resources. Use when you want to start over from gate 1.

Idempotency

Each gate transition is idempotent — re-sending the same advance message produces the same state, not a duplicate transition. The agent’s response will reaffirm the current gate rather than advance twice.

Audit trail

Every gate transition emits an audit row (deployment.gate_advanced or equivalent). See Troubleshooting: Reading audit logs for how to query them.

See also

Was this page helpful?