ADR-INFRA-002 — Development and Execution Workspace Strategy
Status: Accepted Date: 2026-10-20 Authors: Engineering & Security Architecture Team
Context
Contributors need OpenTofu, linters and helper utilities pinned to exact versions, without changing their computers and without version drift between people.
Touch ID, the Mac’s Secure Enclave approval, cannot be forwarded into an isolated container or a remote cloud environment such as a Codespace. The workspace used for editing therefore has to be separate from the place where credentials are unlocked and used. See BRD-INFRA-003, SR-INFRA-003 and, for secret release, BRD-INFRA-002.
Decision Drivers (FRs & NFRs)
- BR-1.1 — identical, version-pinned toolchain for everyone.
- BR-1.2, BR-1.3 — clean host, and a workspace that can be recreated or deleted on demand without losing state.
- BR-1.4 — no production-vault reach from remote hosting.
Options
Option 1 — Install the tools directly on each Mac
Pros:
- One context: editing, linting and
tofu applyhappen in one terminal. op runtriggers Touch ID natively, with no socket forwarding or process boundary.- No Docker needed, so less memory and CPU use.
Cons:
- Pollutes the host with package managers, system dependencies and background daemons (BR-1.2).
- Contributors drift to different patch versions of OpenTofu, plugins and linters, so results differ between machines (BR-1.1).
- Recovering a broken toolchain is manual troubleshooting, not a reset (BR-1.3).
- An AI assistant or any other program on the host shares one environment with the credentials.
Option 2 — GitHub Codespaces as the primary workspace
Pros:
- Nothing installed locally; works on low-spec hardware or a tablet.
- One image for everyone, and an administrator can observe and standardise it centrally.
- New contributors can start in about a minute from a browser.
Cons:
- Touch ID cannot reach it, so credentials would have to be stored as hosted secrets, which breaks ADR-INFRA-003 (BR-1.4).
- A long-lived stored value is visible to every extension and assistant running in the cloud IDE.
- Unusable offline or on a poor connection.
- Hosted usage can be billed.
Option 3 — Local dev container with host-run privileged commands (CHOSEN)
Pros:
- Everyone runs the same image built from the repository’s dev container definition, which pins OpenTofu, the linter and the git hooks (BR-1.1).
- The host OS stays clean, and a corrupted workspace is fixed by rebuilding the container (BR-1.2, BR-1.3).
- The container holds no cloud credential and no password-manager key, so an assistant inside it can read code but not secrets (BR-1.4).
tofu planandapplyrun in the Mac terminal throughop runand Touch ID, so every cloud change needs the administrator’s physical approval.- Editing, formatting and linting work offline.
Cons:
- Two places to work: edit and lint in the container, then switch to the Mac terminal for privileged commands.
- Needs Docker Desktop or an equivalent on the Mac, with its memory and CPU cost.
- The host terminal is outside the container’s isolation, so the administrator must run only reviewed code there.
Final Decision
Use a local dev container for editing and checks, and run privileged commands on the Mac host. Option 1 is rejected for host pollution and version drift, Option 2 for pushing credentials into a hosted environment. Codespaces remains an optional, unprivileged fallback, for example read-only code review. The cost accepted is the split between editing and applying.