Commit 4f591a1
committed
W3 Step 5: rc_oracle_self_test.sh — falsifier validator
Push 44 W3 Step 5 (final): self-test script that validates the W3 R4
oracle's diagnostic capability via 3 falsifiers + synthetic injection.
Per theologian 2026-04-22 02:30:08Z W3 spec falsifier:
"inject a synthetic refcount bug into the C path — scripts/
rc_diff_oracle.sh produces non-empty output. If diff is empty under
injection, oracle is non-functional and W3 has not delivered the
diagnostic capability it promised."
Script structure:
--check mode: pre-conditions only (3 nm-based assertions)
default: pre-conditions + Phase A (clean diff = empty) + Phase B
(injected diff = non-empty) + post-restore verification
FALSIFIERS validated:
python#1 — production python has 0 rc_oracle symbols (RC_ORACLE undefined,
dispatcher block ABSENT from compiled binary). VERIFIED via
--check mode at HEAD a99db92: 'PASS: production python has 0
rc_oracle symbols'.
python#2 — libphoenix_rc_oracle.a exports rc_oracle_run T-symbol. VERIFIED:
'PASS: scratch lib exports rc_oracle_run (C entry point)'.
python#3 — python_rc_cpp has rc_oracle_run T-symbol. PENDING — operator must
run out-of-band link via the recipe in scripts/build_oracle.sh
tail (per supervisor 02:51:14Z option (c)).
INJECTION mechanism:
Phase B comments out the FIRST 'phx_rc_emit_incref' call site in
Python/jit/hir/refcount_pass_c.c via sed. Rebuilds C path. Runs
rc_diff_oracle.sh and asserts non-empty diff. Restores via backup +
rebuild. Final verification: post-restore diff is empty.
Injection target chosen for stability: phx_rc_emit_incref is a
high-frequency call across all refcount_insertion paths; commenting
one removes one Incref → guaranteed runtime divergence under
Py_REF_DEBUG (under-count → leak) AND under PYDEBUG (use-after-free).
Injection is reversible: cp $INJECT_TARGET.oracle_backup back +
rebuild. trap EXIT ensures restore even on script error.
Per supervisor 02:51:14Z option (c): out-of-band link of python_rc_cpp
is operator-driven (not embedded in this script), since W3 is a
one-shot oracle resurrection; no permanent Makefile.pre.in touch.
Pre-commit verification:
bash -n: SYNTAX OK
scripts/rc_oracle_self_test.sh --check: pre-conditions python#1, python#2 PASS;
python#3 expected to FAIL until operator runs the link recipe.
Push 44 W3 batch is now 2 commits (per supervisor 02:51:14Z amended):
a99db92 — W3 Steps 1-4 bundled (scratch lib + dispatcher + adapter)
THIS COMMIT — Step 5 self-test
ABBA cap 15 → 17. MANDATORY ABBA + auto-compile re-experiment after
push 44 lands per pre-authorization.
Process lesson applied (per supervisor 02:51:14Z): explicit
'git add scripts/rc_oracle_self_test.sh' (single file) + 'git diff
--cached --stat' verification BEFORE commit, to avoid the over-broad
staging that produced a99db92's bundled scope.1 parent a99db92 commit 4f591a1
1 file changed
Lines changed: 192 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
0 commit comments