SR-INFRA-004 — Environment Boundaries: System Requirements

By Engineering Team•October 20, 2026•3 min read
Metadata Details
System Name Environment boundaries
Document ID SR-INFRA-004
Author Engineering Team
Status Implemented

Traces back to BRD-INFRA-004. Implements workspace rule 10 sections 8 and 11.

Updated 2026-11-29: the earlier production workspace without assistants (SR-F-03) and production applied by an administrator from the Mac (SR-F-06) are replaced. There is no production workspace, and production is changed only by GitHub Actions. The decision is recorded as Option 5 in ADR-INFRA-004.


1. Functional System Requirements

ID Description Traceability (BRD)
SR-F-01 (Separate State and Credentials) Non-production and production each have their own state key in the one central state bucket, their own passphrase, vault and credentials, within one Cloudflare account and zone per ADR-INFRA-010 and SR-INFRA-009. BR-1.1
SR-F-02 (AI Assistants Only Where Production Cannot Be Reached) AI extensions (Claude Code) are installed only in dev containers, and every dev container is non-production or account-level (shared). No dev container can apply production: tofu-guard refuses INFRA_ENVIRONMENT=prod and any module folder ending in /prod, whatever folder or values are passed. BR-1.2
SR-F-03 (No Production Workspace) There is no production dev container and no production personal credential. No person or assistant holds a credential that can change production from a workstation. Production credentials exist only as GitHub environment secrets of the pipeline. BR-1.2, BR-1.4
SR-F-04 (Separate Values per Environment) Non-production and production each have their own vault. The non-production dev container reads its values from the non-production 1Password Environment; each workflow reads its environment’s vault through that environment’s own service account (SR-INFRA-002 SR-F-03, SR-F-09). BR-1.4
SR-F-05 (Non-Production Applied From Its Dev Container) Non-production plan and apply are started by a person on the host with tofu-in-container.sh. Values are released by op run with Touch ID, and the engine runs in the non-production dev container as the deployer user behind tofu-guard (SR-INFRA-010). The assistant never starts it. BR-1.3
SR-F-06 (Production Only Through the Pipeline) Production is changed only by GitHub Actions workflows running from main. A change reaches main only through a pull request, whose plan is read before it is merged. Where a project has more than one maintainer, branch protection requires a code review before merge. A site’s infrastructure and content are planned and built for an environment only when a person releases a commit of main there (infra.yml, app.yml), non-production first; production refuses a commit non-production has not taken (GitHub Workflow Architecture). Production project setup runs in setup-prod.yml: a manual dispatch only, in its own environment, which refuses any folder but src/prod and any environment but prod. BR-1.3, BR-1.4
SR-F-07 (Break-Glass Without a Credential) When the pipeline itself cannot run during a production incident, an administrator makes the smallest fix in the provider’s dashboard, signed in as themselves, and records it in an incident note. The same change is then committed and applied through the pipeline, and its plan must show no changes. BR-1.3

2. Non-Functional & Security Requirements

ID Specification Traceability (BRD)
SR-NF-01 (No Cross-Environment Authority) No credential, role or vault entry is valid in both environments. Where the provider cannot narrow a permission to one environment, the limit is accepted. BR-1.4
SR-NF-02 (Attributable Changes) Every production change is traceable to a pull request, a commit, a workflow run and the account that merged or dispatched it. Every non-production apply is traceable to the named person’s identity in the provider’s audit log. A break-glass change is traceable to the administrator’s own sign-in and the incident note. BR-1.3
SR-NF-03 (One Apply at a Time) Each workflow that applies holds a concurrency group, so two applies of the same root module never overlap. BR-1.3