Orchestrata Ultimate › Plans › briefs › hotfix-batch-child-stamp

HOTFIX — batch children lack the SANCTIONED_RUNNER stamp: every push gate dies (P-CAP wiring gap)

Source: plans/briefs/hotfix-batch-child-stamp.md at 8a2cb42ad · last changed 2026-10-20 · first committed 2026-10-20 · 74 lines.

Prose pending.

Plan text

HOTFIX — batch children lack the SANCTIONED_RUNNER stamp: every push gate dies (P-CAP wiring gap)

Priority: URGENT — blocks every git push on this repo (the pre-push affected-gate's batch executor children are all guard-killed). Coordinator-diagnosed with full evidence; this packet is the minimal wiring fix + the owed end-to-end pin.

The defect (measured 2026-10-20, three failed pushes)

Fence

scripts/run_tests.py
tests/scripts/test_run_tests_cap.py

Do not touch pytest_live_observer.py / pytest_live_reader.py (the guard is correct as ruled) or test_executor.py (its env param plumbing at :188/:196-198 already forwards correctly).

The fix

  1. Batch execution path (:882-884): build the child env through _child_run_env — the same shape as the counting path: {**os.environ, **_child_run_env(deadline)}. Preserve the existing deadline is None semantics: if None is a real state there, extend _child_run_env to accept deadline: float | None (None → omit the TEST_DEADLINE key, STILL stamp SANCTIONED_RUNNER_ENV and ORCH_RUN_ID) — the 13 existing cap contract pins must stay green unchanged; if you must adjust a pin's call shape, report why (semantics may not weaken).
  2. Solo-retry path (:931): pass the same stamped env (cap consistency for retry rounds).
  3. E2E WIRING PIN (the owed "capped-exit end-to-end test pin", behavior-shaped, no mocks): drive the real run_tests.py batch path over TWO tmp fixture test modules (a 2-file selection is multi-file → the guard kills it iff unstamped) and assert the run COMPLETES with both modules' results (no RUL-038 refusal in the output/exit path). Proof-by-behavior: the pin fails if the stamp wiring regresses, which is exactly the defect class that shipped. If a full run_tests.py invocation is too heavy for the test, pin the next-best real seam (the child-env construction the execution path actually uses, asserted to carry SANCTIONED_RUNNER_ENV + TEST_DEADLINE) AND name the residual gap in your report — do not fake end-to-endness.

VERIFY (report verbatim)

.venv/bin/pytest tests/scripts/test_run_tests_cap.py -o addopts="" -q     # 13 pins + your new pin(s), all green
.venv/bin/python scripts/run_tests.py tests/scripts/test_flake_report.py tests/scripts/test_slot_lease.py --skip-gates   # 2-module batch run: completes, NO guard refusal (this exact shape died pre-fix)
.venv/bin/ruff check scripts/run_tests.py tests/scripts/test_run_tests_cap.py
.venv/bin/black --check scripts/run_tests.py tests/scripts/test_run_tests_cap.py
.venv/bin/python scripts/test-review.py tests/scripts/test_run_tests_cap.py --stdout   # 0 findings

(The 2-module run_tests.py invocation is the sanctioned runner — allowed and required here; it is the regression proof. Never bare multi-file pytest.)

Report

The diff summary (both call sites + any _child_run_env signature change), the pin's mechanism and what it proves, all VERIFY outputs verbatim, anything unfaithful named. Do not commit — the coordinator verifies, commits, and re-runs the push. RUL-037. Another coordinator session owns the PI-* fences (pyproject/uv.lock/codetools) — do not touch them.