Commit a642405
committed
test: call-shape falsifier extension for emitCallExceptionHandler D1-D3
Per pythia python#77 python#3 [chat L1937] gap + supervisor [chat L1939] authorization +
theologian [chat L1942] spec: extend test_phoenix_jit_inline_except_closure.py
with TestJitCallExceptionHandler class covering 3 tests that exercise the
emitCallExceptionHandler unique invariants (D1-D3) NOT covered by the
existing inline-except (BINARY_SUBSCR_DICT) tests.
GAP CONTEXT: push 60 (9630005) landed emitCallExceptionHandler with
shared-helper design — D1-D3 unique invariants ride only the shared
P2+P3+P4 helper through the closure-LOAD_DEREF inline-except falsifier.
Call-shape (function-call-in-try) was empirically untested at push 60.
This falsifier closes that coverage gap retroactively.
Lib/test/test_phoenix_jit_inline_except_closure.py:
+135 lines, new class TestJitCallExceptionHandler with 3 tests:
- C1 test_call_in_try_simple_except: function-call-in-try, ValueError
matched + return from except. Exercises D1 (setSuppressExceptionDeopt
+ pop result pre-call) + D3 (RefineType + result push on OK path).
- C2 test_call_in_try_with_closure_load_deref: function-call-in-try,
LOAD_DEREF on closure variable in except body. Exercises D1-D3 +
PA (D-1774910012 prev_exc Py_None placeholder under
emitCallExceptionHandler entry).
- C3 test_call_in_try_deopt_path: function-call-in-try, unmatched
exception (TypeError vs except ValueError). Exercises D2 (DeoptTC
zero re-push, no left/right context — call-handler doesn't have
left/right unlike inline-match).
EXISTING TESTS PRESERVED unchanged:
TestJitInlineExceptClosure (3 tests) — D-1774910012 PA invariant
via inline-except path, retained as the original falsifier.
EMPIRICAL VALIDATION RESULT (testkeeper [chat L1946]):
Run on push 60 binary 9630005 (ARM64 pydebug):
6/6 PASS, OK, 0.177s, EXIT=0, NO core dump.
All D1-D3 invariants empirically validated; PA preserved across both
call-handler and inline-match entry paths.
PYTHIA python#77 python#3 SUBSTANCE CLOSED:
D1-D3 unique invariants now empirically exercised, not only ride-along
through shared helper. Falsifier-pre-port discipline restored for
emitCallExceptionHandler (regression test exists post-port; ideal would
have been pre-port but supervisor [chat L1939] accepted post-port
retroactive validation as remediation).
Bundled with push 61 (b28b512 emitAnyCall PartialConversion, Tier 5
close) per testkeeper [chat L1946] (a) sequencing — single gate cycle,
single push, no separate gate ceremony for .py-only change.
Authorization chain:
- pythia python#77 python#3: chat L1937 (gap surfaced)
- supervisor authorization: chat L1939
- theologian spec: chat L1942
- testkeeper draft + push-60-binary validation: chat L19461 parent b28b512 commit a642405
1 file changed
Lines changed: 115 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 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 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
141 | 256 | | |
142 | 257 | | |
0 commit comments