Skip to content

Commit 9cbf413

Browse files
committed
gate: item python#15 RC_ORACLE production-leak standing assertion
Per supervisor 2026-04-22 03:06:55Z + theologian 03:07:12Z + pythia python#58: push 44 introduces the W3 R4 oracle dispatcher in compiler.cpp behind #ifdef RC_ORACLE. The push-44 nm production-binary check is one-shot — need a STANDING gate assertion so future compiler.cpp edits cannot silently leak RC_ORACLE dispatch into production. Failure mode caught: Any future commit that drops, inverts, or accidentally hard-defines the #ifdef RC_ORACLE guard would leak the C++ rc_oracle dispatch path (linked from libphoenix_rc_oracle.a) into the production python binary. Without this assertion, the leak is invisible until the next manual nm audit. Same silent-failure class as the cp-||-true loophole (catch python#4, push 38) — accepted bad state silently. Implementation (5 LOC after BINARY_MATCH (clean) ✓): RC_ORACLE_LEAK=$(nm $PYTHON | grep -c 'rc_oracle') if [ $RC_ORACLE_LEAK -ne 0 ]; then echo BINARY_RC_ORACLE_LEAK_DETECTED ... exit 1 fi echo BINARY_RC_ORACLE_OK: production binary clean (0 rc_oracle symbols) Verbatim wording per gatekeeper item python#15 (03:07:25Z): - PASS: 'BINARY_RC_ORACLE_OK: production binary clean (0 rc_oracle symbols)' - FAIL: 'BINARY_RC_ORACLE_LEAK_DETECTED' + FATAL + exit 1 - Mirrors BINARY_DIRTY discipline (catch silent failure structurally) Verification (compile-clean pre-commit): bash -n scripts/gate_phoenix.sh: SYNTAX OK Inserted at line 120 (immediately after BINARY_MATCH block at line 119). Bundled into push 44 (rather than standalone push 45) because the dispatcher lands in this push — the leak-check guards it from day 1 instead of leaving a one-push window where item python#15 isn't enforced. Push 44 batch grows 3 → 4 commits: THIS COMMIT — gate item python#15 (RC_ORACLE leak assertion) 63568c0 — W3 Step 5 expansion (4 injection classes + invariant python#7) 4f591a1 — W3 Step 5 v1 (rc_oracle_self_test.sh) a99db92 — W3 Steps 1-4 (scratch lib + dispatcher) ABBA cap usage: 17 → 18 (4 commits this push).
1 parent 63568c0 commit 9cbf413

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

scripts/gate_phoenix.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,23 @@ if echo "$GATE_BINARY_LONG_VERSION" | grep -q -- "-dirty"; then
118118
fi
119119
echo "BINARY_MATCH: gate binary reports $COMMIT_HASH (clean) ✓" | tee -a "$RESULTS_FILE"
120120

121+
# Step 1a-2: RC_ORACLE production-leak check (gatekeeper item #15)
122+
# Per supervisor 2026-04-22 03:06:55Z + theologian 03:07:12Z + pythia #58:
123+
# the W3 R4 oracle dispatcher in compiler.cpp is #ifdef RC_ORACLE guarded.
124+
# Production builds MUST contain ZERO rc_oracle symbols. A standing assertion
125+
# in the gate transcript catches the silent failure mode where a future
126+
# compiler.cpp edit accidentally drops or inverts the #ifdef guard, leaking
127+
# RC_ORACLE dispatch into production undetectably. Mirrors BINARY_DIRTY
128+
# discipline — catch silent failures structurally, not via memory.
129+
RC_ORACLE_LEAK=$(nm "$PYTHON" 2>/dev/null | grep -c 'rc_oracle' || echo 0)
130+
RC_ORACLE_LEAK=$(echo "$RC_ORACLE_LEAK" | tr -d '[:space:]')
131+
if [ "${RC_ORACLE_LEAK:-0}" -ne 0 ]; then
132+
echo "BINARY_RC_ORACLE_LEAK_DETECTED: production binary contains $RC_ORACLE_LEAK rc_oracle symbols" | tee -a "$RESULTS_FILE"
133+
echo "FATAL: RC_ORACLE leaked into production build (review #ifdef RC_ORACLE guards in Python/jit/compiler.cpp)" | tee -a "$RESULTS_FILE"
134+
exit 1
135+
fi
136+
echo "BINARY_RC_ORACLE_OK: production binary clean (0 rc_oracle symbols)" | tee -a "$RESULTS_FILE"
137+
121138
# Step 1b: _reg usage policy gate (no-FS DeoptBase factories banned in simplify_c.c)
122139
echo "" | tee -a "$RESULTS_FILE"
123140
echo "--- Step 1b: _reg Usage Policy ---" | tee -a "$RESULTS_FILE"

0 commit comments

Comments
 (0)