Orchestrata Ultimate › Gates › env-subnet-scheme

Gate: env-subnet-scheme

At a glance

Purpose Refuse an address in env/{dev,test,prod}.env that is off its environment's octet (prod 10.53.1.x, test 10.53.2.x, dev 10.53.3.x).
Where it runs The scripts/gates.py battery (registered as env-subnet-scheme).
Trigger A battery run whose fingerprint changed, or whose last cached verdict was not ok.
Exact command python scripts/check_env_subnet_scheme.py
Blocks Exit 1 on violations, 2 on invalid invocation or a missing profile, 0 pass.
Ruling / ADR Backlog-413 ruling (Mohamed, 2026-08-15), quoted below; no RUL page names this gate.
Last recorded verdict ok: false in the primary checkout's .cache/gates.json (file last written 2026-09-22 10:01 local; the cause is not recorded there). wt-MAP-PRECOMMIT has no .cache/gates.json.

What it refuses

An address in env/{dev,test,prod}.env that does not sit on its environment's dedicated subnet octet — the drift that lets a test client silently aim at the prod fleet.

Why it exists

Module docstring, quoting the ruling:

"Env-subnet-scheme gate — the mechanism for the backlog-413 ruling (Mohamed, 2026-08-15): environment subnets are FORCED apart by a dedicated environment octet so they can never be confused.

Ratified scheme (plans/subnet-renumbering-design.md): all environments share the 10.53.<env>. frame — first two octets identical, third octet IS the environment: prod → 10.53.1.0/24, test → 10.53.2.0/24, dev → 10.53.3.0/24.

The old scheme (prod 10.92.53.x / test 10.93.53.x / dev 10.95.53.x) put the discriminating digit mid-address with no dedicated meaning; one mistyped digit aimed a test client at the prod kernel."

Scope rationale: "env/{dev,test,prod}.env — the authoritative endpoint layer … Enforcing the authoritative layer is enforcing the system; literal stragglers elsewhere are swept by the migration phases."

How it runs

Typical failures and how to fix them

Wiring