Home / Projects / Orchestrata Ultimate / Decisions / ADR index / ADR-0116

ADR-0116: Staged source .py files enter the T21 env-key review at commit time

field value
Status Accepted — Accepted (ruling, Mohamed, 2026-10-20, verbatim: "Approve as follow-up packet (Recommended)")
Date 2026-10-20
Register factory (docs/adr, 4-digit ids)
Source docs/adr/0116-staged-source-py-files-enter-the-t21-env-key-review-at-commit-time.md — permalink at c239cdf83 (unchanged on master since that commit)
Wiki register entry ADR-0116 (wiki status: Accepted)

← ADR-0115 · ADR-0117 →

The record

Status: Accepted (ruling, Mohamed, 2026-10-20, verbatim: "Approve as follow-up packet (Recommended)") · Date: 2026-10-20

Context

The T17 packet (rule id T21 in scripts/test-review.py) exists because of a SOURCE-file incident: scripts/run_tests.py::_child_run_env stamped a fabricated env key (ORCH_TEST_DEADLINE while the observer reads TEST_DEADLINE_ENV = "ORCHESTRATA_TEST_DEADLINE") and set no sanctioned-runner stamp at all — the RUL-038 cap mechanism was dead on arrival and nothing mechanical caught it (commit 4a470482c fixed the code; the T17 packet makes the class checkable).

Measured routing (T17 run-1 verification, 2026-10-20): commit_review.pl's reviewer_tree facts send only tests/ and end2end/ files to test_review (src/orchestrata_ultimate/prolog/commit_review.pl:70-72); code_review gets src/; scripts/ reaches neither. The rule therefore never gates, at commit time, the file class that founded it — the RUL-023 built-but-not-wired shape.

Measured blast radius of wiring (2026-10-20): exact-key WARNINGs (which block at pre-commit by the hook's standing policy) would fire on 29 test files that inline declared registry keys (tests/conftest.py, tests/factories/real.py, tests/fixtures/redis.py, and 26 more) and on 6 sites in scripts/run_tests.py (the latter fixed inside the T17 run-2 fence, defect D7).

  1. Staged source .py files enter test-review's T21 env-key review at commit time.
  2. The wiring is a follow-up packet, dispatched after the T21 rule lands (run 2 of the T17 packet): extend the commit-gate routing — minimally reviewer_tree(test_review, 'scripts/') in commit_review.pl, with the src/ question measured and ruled inside the packet — and make T21 apply to any .py the gate hands it (the run-2 brief's D2 already binds the tool side).
  3. The 29-file exact-key worklist is made visible in the same packet: burn it down (files import their declared constants) or baseline it as an explicit ratchet, so unrelated commits touching those files are not blocked without a plan of record.
  4. The warnings-block policy is unchanged — the T17 brief ruled WARNING-and-up blocking at pre-commit intended; this ADR does not create a source-file exception.

Alternatives rejected

Consequences

Provenance

Mohamed's in-session ruling, 2026-10-20, on the coordinator's decision prompt (handoff §4 item 1 — "T17 routing: should staged SOURCE .py files enter test-review (a commit_review.pl policy change)?"), verbatim answer: "Approve as follow-up packet (Recommended)". Evidence: routing measurement in the T17 run-1 worker report (verified against commit_review.pl:70-72 by the coordinator); blast-radius grep (29 files, 2026-10-20); incident record: plans/briefs/t17-env-key-drift.md preamble and commit 4a470482c; run-2 defect corpus: plans/briefs/t17-env-key-drift-run2.md (D2, D7).

No other ADR is named in this record.

Rulings cited

Specs cited

None (or no spec page exists for the ones named).