Skip to content

0024. Environments: first-class with protection rules

  • Status: Accepted
  • Date: 2026-07-12
  • Deciders: thulasi.ram (architect)

An Environment (staging/prod) is the natural convergence point for deployment governance, and several primitives we built already meet there: gate (approval/timer), env-scoped secrets, env OIDC subject, concurrency groups, RBAC approvers, and the forge deployments API.

Environment is a first-class entity (in scarab-projects) carrying protection rules:

  • required approvers + wait timer → realized via gate (0008)
  • allowed refs/branches
  • concurrency policy → concurrency group (0011)
  • env secret scope → (0014)
  • OIDC subject template → (0015)
  • deployment history + forge deployments link

One coherent governance/security surface — a credible deploy system, not just a build runner.

  • The security features get an auditable home; policy attaches in one place.
  • Secrets/OIDC/gates/concurrency are designed to plug into Environment.
  • Timing: implemented in roadmap Slice 4; the concept is modeled now.
  • Thin named scope (secrets + OIDC + optional gate only) — fewer concepts, governance reinvented per team.
  • No Environment concept — maximal minimalism, no cohesive deploy-safety surface.