Commit b808cda
committed
test: forcing function for PartialConversion bridge reabsorption
Per pythia python#79 python#4 [chat L2032] + supervisor [chat L2034] python#4 assignment +
theologian [chat L2036] design + generalist take.
Closes pythia python#79 python#4 'PartialConversion calcification trigger conditional
on external direction' substance: provides a forcing-function (test
that fails in the calcification window) instead of an aspirational
marker (REABSORB-WHEN comment alone, which depends on a future reader
seeing it at the right moment).
Lib/test/test_phoenix_partial_conversions.py:
Pre-condition + assertion pattern per theologian L2036 spec.
test_anycall_reabsorb_when_invokes_converted:
Pre-condition: at least one of bool HIRBuilder::emitInvokeFunction
/ Native / Method remains C++ in builder.cpp → skip (legitimate
partial state).
Assertion: when all 3 INVOKE_* converted, fail if
hir_builder_emit_awaited_call_tail_c bridge call remains in
builder.cpp (i.e. emitAnyCall body still partial).
Failure msg cites builder_emit_c.c PARTIAL CONVERSION ARTIFACT
comment + reabsorb action so future readers locate the decision
context.
VERIFIED PASS today (INVOKE_* still C++ → test skipped):
$ python3 -m unittest Lib.test.test_phoenix_partial_conversions -v
test_anycall_reabsorb_when_invokes_converted: skipped
Ran 1 test in 0.001s, OK (skipped=1)
Pattern docs in module docstring for future PartialConversion authors:
1. Add test_<method>_reabsorb_when_<condition>
2. Encode pre-condition as text-grep on builder.cpp source
3. Encode assertion as bridge-symbol grep with explicit failure msg
Forces the calcification check to run in EVERY normal test gate cycle,
without requiring CI machinery additions (no lint script, no DCHECK
runtime overhead, no comment-only marker reliance). Pattern generalizes:
each future PartialConversion gets one test function.
Authorization chain:
- pythia python#79 python#4 surfaced calcification risk: chat L2032
- supervisor python#4 assignment to theologian (design): chat L2034
- theologian design (option ii test-as-forcing-function): chat L2036
- generalist implementation per scope-for-generalist-if-she-takes-it: chat L2034 ack1 parent 15de220 commit b808cda
1 file changed
Lines changed: 89 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 | + | |
0 commit comments