bpo-29527: Disable broken Travis docs job by vstinner · Pull Request #7 · python/cpython
nanjekyejoannah added a commit to nanjekyejoannah/cpython that referenced this pull request
7: Add warnings for sorting and comparison r=ltratt a=nanjekyejoannah Most of the warnings are covered on the list sort method. I added the missing warnings for the `cmp` and `__cmp__` method. This replaces python#4 Co-authored-by: Joannah Nanjekye <jnanjekye@python.org>
nanjekyejoannah added a commit to nanjekyejoannah/cpython that referenced this pull request
7: Port cmp with no extra slot r=ltratt a=nanjekyejoannah Due to segfaults introducing a new `tp_compare` slot proved problematic. I have found a way of supporting `cmp` without a new slot. Tests are updated to match the new functionality where Py2.x doesn't fail. I wanted to force push on [this branch] (https://github.com/softdevteam/pygrate3) but maybe you wanted to compare before I force push. This replaces python#4 Co-authored-by: Joannah Nanjekye <jnanjekye@python.org>
JelleZijlstra pushed a commit to JelleZijlstra/cpython that referenced this pull request
This was referenced
DinoV pushed a commit to DinoV/cpython that referenced this pull request
Qanux
mentioned this pull request
johnslavik pushed a commit to johnslavik/cpython that referenced this pull request
SonicField added a commit to SonicField/cpython that referenced this pull request
Remove virtual from InlineBase::~InlineBase() and InlineBase::inlineDepth(). Neither is called through InlineBase* — all call sites use concrete types (BeginInlinedFunction* or EndInlinedFunction*). This eliminates the InlineBase vtable pointer from Begin/EndInlinedFunction, enabling conversion python#7 (gen_asm.cpp BeginInlinedFunction dynamic_cast → static_cast). With InlineBase non-polymorphic, static_cast from Instr* to BeginInlinedFunction* no longer involves secondary base adjustment. C struct updates: - Remove void *_vtable_inline from HirEndInlinedFunction - Remove void *_vtable_inline from HirBeginInlinedFunction All 7/7 dynamic_cast sites now converted to opcode predicates + static_cast.
SonicField added a commit to SonicField/cpython that referenced this pull request
Push 44 W3 follow-up per supervisor 03:07:52Z + theologian 03:07:25Z: - rc_oracle_self_test.sh: expand from 1 → 4 injection classes (A/B/C/D) - _rc_oracle_adapter.h: add invariant python#7 (oracle lifespan policy) to BRIDGE SPEC TEMPLATE (supersedes W12) Per supervisor 03:07:52Z W4 vacuous-pass defeat directive: "single-injection test is the W4 vacuous-pass class". ================================================================ PART 1: 4 INJECTION CLASSES (rc_oracle_self_test.sh) ================================================================ Generalized inject_class helper (sed → rebuild → diff → restore → rebuild) replaces the hard-coded single-injection block. Class A — refcount BALANCE under-count: Skip FIRST phx_rc_emit_incref via line-comment. Failure mode caught: under-count → leak under Py_REF_DEBUG. Class B — refcount BALANCE over-count: Skip FIRST phx_rc_emit_decref via line-comment. Failure mode caught: over-count → leak (different mechanism than A). Class C — refcount SEQUENCE: Skip SECOND phx_rc_emit_incref (different call-site than A) via line-comment. Failure mode caught: HIR position-dependent divergence — same opcode family as A but different injection position to test position sensitivity. Class D — TYPE LATTICE: Change FIRST HIR_TYPE_OBJECT → HIR_TYPE_NULLPTR via sed. Failure mode caught: type-annotation flip — wrong refcount semantics for borrowed-vs-owned classification. Each class: 1. sed transformation applied 2. cmp -s verifies source actually changed (catches stale sed pattern) 3. Rebuild C path 4. Run scripts/rc_diff_oracle.sh 5. PASS = non-empty diff (oracle CATCHES the divergence) FAIL = empty diff under injection (oracle MISSED → non-functional) 6. Restore source from backup + rebuild Default invocation runs all 4 classes sequentially. --class=A|B|C|D runs single class. trap EXIT ensures restore on script error. ================================================================ PART 2: INVARIANT python#7 (_rc_oracle_adapter.h) ================================================================ Added to BRIDGE SPEC TEMPLATE INVARIANTS PRESERVED section per theologian + supervisor 03:07:52Z (supersedes earlier W12 framing): 7. Oracle lifespan: utility decreases as emit methods diverge from d81e580 baseline. RETIREMENT TRIGGER: when scripts/ rc_diff_oracle.sh on CLEAN run produces >30% pre/post divergence noise, retire (archive script). ESTIMATED LIFESPAN: 30-50 pushes from d81e580 (push 35) → retirement window ~push 65-85. Re-evaluate at push 50 (testkeeper clean-diff noise % post). Also added invariant python#6 inline (oracle scope conflated diff — already in commit msg of a99db92 but missing from header file). Falsifier section expanded to enumerate 4 classes (A/B/C/D) with their distinct failure-mode coverage per Pythia python#58's vacuous-pass concern. ================================================================ VERIFICATION ================================================================ bash -n scripts/rc_oracle_self_test.sh: SYNTAX OK (260 lines). diff --cached --stat: 2 files, +142/-48 — only the 2 intended files (verified explicit-staging discipline per supervisor 02:51:14Z). Push 44 W3 batch grows to 3 commits: a99db92 — W3 Steps 1-4 bundled (scratch lib + dispatcher) 4f591a1 — W3 Step 5 v1 (single class A) THIS COMMIT — W3 Step 5 expansion (4 classes + invariant python#7) ABBA cap 15 → 18.
SonicField added a commit to SonicField/cpython that referenced this pull request
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).
SonicField added a commit to SonicField/cpython that referenced this pull request
Eliminate the C++ wrapper HIRBuilder::emitBeforeWith by folding its PY_VERSION_HEX/opcode-branch logic into the existing C body hir_builder_emit_before_with_c. Caller now passes the raw bytecode opcode and the C body derives enter_id/exit_id/is_async locally. This is the first Cat-B fold-into-C in the Phase 1 burndown (prior batches python#2-python#5 were Cat-A clean-delegation deletes). Pattern is reusable for emitSetupWith python#7 and emitSetupWithCommon (Register* helper). Authorization: theologian 22:08:49Z + 22:10:41Z (GO Step B atomic post Lib/test scope verify), supervisor 22:08:58Z + 22:10:51Z. Lib/test scope verified clean (0 references). Numstat: Python/jit/hir/builder.cpp +3 -30 (delete wrapper + extern, add file-scope extern, rewrite caller) Python/jit/hir/builder.h +0 -3 (delete decl) Python/jit/hir/builder_emit_c.c +33 -10 (fold opcode-branch logic) NET: -7 lines, substantive (algorithmic fold, not delegation-marginal). W44 gate: PASS (2 markers audited, 0 production callers).
SonicField added a commit to SonicField/cpython that referenced this pull request
Eliminate the C++ wrapper HIRBuilder::emitSetupWith by folding its PY_VERSION_HEX conditional + handler_off compute into the existing C body hir_builder_emit_setup_with_c. Caller now passes the raw bytecode oparg + next_instr_off; the C body derives enter_id/exit_id/is_async (version-conditional) and computes handler_off = next_instr_off + oparg * sizeof(_Py_CODEUNIT) locally. Second Cat-B fold-into-C in Phase 1 burndown (after python#6 emitBeforeWith). Pattern remaining for emitSetupWithCommon (Register* helper sibling, Phase 1 python#8). Authorization: theologian 22:30:11Z + supervisor 22:30:26Z. Lib/test scope verified clean (0 references) per medic 21:16:05Z gate. Numstat: Python/jit/hir/builder.cpp +5 -28 (delete wrapper + extern, add file-scope extern, rewrite caller) Python/jit/hir/builder.h +0 -3 (delete decl) Python/jit/hir/builder_emit_c.c +28 -8 (fold version+compute logic) NET: -6 lines, substantive (algorithmic fold-into-C). W44 gate: PASS (2 markers, 0 production callers).
SonicField added a commit to SonicField/cpython that referenced this pull request
Implements scripts/w45_bridge_drift_falsifier.sh per docs/w45-bridge-signature-drift-falsifier.md. Mutate-Build-Verify-Restore loop: - Mutates a bridge signature (extern "C" decl in builder.cpp + function definition in builder_emit_c.c, in lockstep) by appending a sentinel param 'int phx_w45_drift'. - Verifies the build fails at the C++ dispatch-switch call site (which has the OLD arity). - Restores both files; clean rebuild verifies tree state. Catches the structural drift class identified by pythia python#90/python#91: void* args at the bridge crossing erase the type-safety C++ overload resolution would normally provide. 252+ dispatch sites in builder.cpp post Phase 1 burndown — manual audit unscalable. Initial 6 fixtures (per spec §2.2 + §2.6 retro): - hir_builder_emit_before_with_c (Phase 1 python#6 retro) - hir_builder_emit_setup_with_c (Phase 1 python#7 retro) - hir_builder_emit_format_simple_c (Phase 1 python#2 sample) - hir_builder_emit_copy_free_vars_c (Phase 1 python#4 sample) - hir_builder_emit_get_yield_from_iter_c (Phase 1 python#4 sample) - hir_builder_emit_primitive_load_const_c (Phase 1 python#5 sample) Modes: - --dry-run: stage mutations, no build (any agent — bypass build lock) - --strict: exit 1 on FAIL (for gate integration) - --verbose: show build stderr Uses perl -0777 multi-line slurp for robust parsing of multi-line extern decls + function definitions. Mutation marker (phx_w45_drift) verified post-mutation to guard against silent no-op substitutions. Build lock: BUILD mode invokes cmake --build --target jit; per CLAUDE.md Phase 3D Build Lock, only testkeeper / gate_phoenix.sh may invoke with builds enabled. --dry-run is unrestricted. Authorization: theologian 21:55:24Z + supervisor 21:55:36Z + 22:33:17Z DISPOSITION (C). §3.5 fold-into-C derivation falsifier (opcode-constant shadow class) is deferred — needs W21 golden integration. Sibling workstreams: W33 (zero-bridge verifier), W42 (refcount correctness), W44 (DO-NOT-USE caller gate).
SonicField added a commit to SonicField/cpython that referenced this pull request
Phase 1 python#6 (emitBeforeWith) + python#7 (emitSetupWith) both folded their PY_VERSION_HEX conditional + C++ wrapper logic INTO the C body, and their callers now invoke hir_builder_emit_setup_with_common_c (the internal C-bridge helper) directly from C — bypassing the C++ method HIRBuilder::emitSetupWithCommon entirely. That made the C++ wrapper DEAD: zero production callers. Delete: builder.cpp: -21L (15L method def + 3L extern decl + 3L blanks) builder.h: -10L (decl removed) builder_emit_c.c: +4 -5 (stale doc comment refresh — drop W27c tag + C++ method back-reference) NET: -32L pure deletion (no fold-into-C, no sig mutation). The C body hir_builder_emit_setup_with_common_c is RETAINED — used internally by hir_builder_emit_setup_with_c (Phase 1 python#7) and hir_builder_emit_before_with_c (Phase 1 python#6) as a .c→.c helper. Authorization: theologian 22:49:41Z (cross-check PASS, exhaustive caller enumeration via grep -rnE '\bemitSetupWithCommon\b' Python Include Lib/test → 0 production callers) + supervisor 22:49:52Z (GO Step B). W45 fixture exemption justified per theologian 22:49:41Z: shepard 22:46:33Z discipline applies to fold-into-C / sig-mutation; delete-of-dead-code is neither (same precedent as Phase 1 python#1 INVOKE_* delegation-stub deletes). W44 gate: PASS (2 markers, 0 production callers).
SonicField added a commit to SonicField/cpython that referenced this pull request
Delete the pending_b2_blocks_ Class B vector + struct PendingBlock + drain loop in translate(). The W26-era refactor of emitInlineExceptionMatch removed all writers but left the queue declaration + drain plumbing as load-bearing-looking dead state. Independent grep verification (theologian 23:35:58Z + librarian 23:50:24Z + spec §2.1 grep-writers-before-Step-A discipline per pythia python#93): 4 reference sites, ZERO writers. Mutation patterns push_back/emplace_back/insert/operator[]/resize/assign/reserve all NOT FOUND across cpython/. PendingBlock struct unused outside the deleted field. Reframes Phase 3 spec §2 inventory: pending_b2_blocks_ marked DELETED in §2.1 errata; the §5 forcing-decision propagation validation is now deferred to Batch 4 (block_map_, the next Class B candidate) with mandatory pre-Step-A writer-grep per spec §2.1 amendment. NO new bridges, NO new W45 fixtures (delete-of-dead-state per shepard 22:46:33Z + supervisor 23:36:13Z carve-out). NOT counted toward W45 §3.5 5-batch backstop per supervisor 23:49:22Z (current count holds at 4: python#6+python#7 fold-into-C + Phase 3 Batch 1+2). Numstat (vs HEAD 1343895): Python/jit/hir/builder.cpp +0 -6 (drain loop + clear) Python/jit/hir/builder.h +0 -8 (struct + vector field) Python/jit/hir/builder_state_c.h +4 -3 (Class B doc-list refresh + dead-state footnote) TOTAL: NET -13L pure deletion (forecast -15L; -2L variance). Pre-commit compile-check: testkeeper 23:52:59Z BUILD_EXIT=0, 3-test sanity green (partial_conversions + W22 + W44). W44 gate: PASS (2 markers, 0 production callers). Authorization: theologian 23:35:58Z + supervisor 23:36:13Z (A) DEAD-DELETE only (split from getSimpleExceptInfo per theologian different-shape-bisect-granularity reasoning).
SonicField added a commit to SonicField/cpython that referenced this pull request
Add hir_builder_state_block_map_blocks_lookup_cpp bridge accessing HIRBuilder.block_map_.blocks (a std::unordered_map<BCOffset, BasicBlock*>) via friend declaration. Rewire the existing C-side bridge hir_builder_get_block_at_off in hir_c_api.cpp to call the new state-flavored bridge instead of the C++ method directly. §5 forcing-decision validation: PhxHirBuilderState declares block_map as opaque pointer in spirit (Class B-kept with as-needed bridge surface); the bridge is materialized + actively used by C-side code. Disposition CLOSED for block_map_; pattern propagatable to remaining Class B members (temps_, static_method_stack_) per spec §5 amendment. Per theologian 00:06:05Z + supervisor 00:06:36Z DISPOSITION (X) MINIMAL: pure addition of bridge + rewire of existing C-side bridge caller. C++ method HIRBuilder::getBlockAtOff UNCHANGED — the 9 internal C++ callers in builder.cpp keep direct C++ access (no indirection added on hot translate paths). Bridge added (1, well within W25b ≤5/batch): hir_builder_state_block_map_blocks_lookup_cpp(builder, off) -> void* W45 fixture: 1 new (state_block_map_blocks_lookup_cpp) added per shepard 22:46:33Z same-commit discipline. W45 perl regex updated ([\s\*]+ before symbol) to handle void* return type. Dry-run: 13/13 fixtures stage cleanly. Numstat (vs HEAD b92d85e): Python/jit/hir/builder.cpp +10 -0 (bridge impl + friend access) Python/jit/hir/builder.h +5 -0 (friend decl + comment) Python/jit/hir/builder_state_c.h +9 -0 (1 bridge decl) Python/jit/hir/hir_c_api.cpp +4 -2 (rewire body to bridge) scripts/w45_bridge_drift_falsifier.sh +2 -1 (1 new fixture + void*-return regex) TOTAL: NET +27L (forecast +26L; +1L variance, ~4%, under theologian 15% threshold). Pre-commit compile-check: testkeeper 00:11:14Z BUILD_EXIT=0, 3-test sanity green (partial_conversions + W22 + W44). W44 gate: PASS. §3.5 backstop count post-land: 5/5 reached (W26 python#6+python#7 fold-into-C + Phase 3 Batch 1+2+4; Batch 3 dead-delete didn't count). §3.5 fold-into-C derivation falsifier impl trigger fires next workstream per supervisor 23:49:22Z + theologian §2.5 amendment. Authorization: theologian 00:06:05Z (cross-check PASS, caller-count correction 9 builder.cpp + 1 hir_c_api.cpp = 10 total) + supervisor 00:06:36Z (Step B GO).
SonicField added a commit to SonicField/cpython that referenced this pull request
Implements scripts/w45_section_3_5_derivation_drift.sh per docs/w45-bridge-signature-drift-falsifier.md §2.7. Trigger fired at Phase 3 Batch 4 b44a514 (5/5 backstop reached: W26 fold-into-C python#6 + python#7 + Phase 3 Batch 1 + Batch 2 + Batch 4). Sibling to scripts/w45_bridge_drift_falsifier.sh (W45 §1-§2 signature mutation). This script mutates DERIVED CONSTANTS, struct FIELD LAYOUTS, and bridge RETURN TYPES that C-body implementations depend on. Mode (B) source-mutation per spec §2.7.1 (mode (A) W21-golden-driven deferred until W21 lands per §2.7.5). Initial 4 fixtures per spec §2.7.2: Class A — fold-into-C derived constants: 1. BEFORE_ASYNC_WITH opcode-derivation (Phase 1 python#6 emitBeforeWith C body) — rename constant in builder_emit_c.c, expect build fail at C body comparison site 2. _Py_ID identifier-derivation (Phase 1 python#7 emitSetupWith body region) — rename macro in builder_emit_c.c lines 4140-4220, expect build fail at C body identifier sites Class B — Phase 3 bridge-derived field-reads: 3. ExceptionTableEntry depth field rename (Phase 3 Batch 2) — rename in builder.h struct decl, expect build fail at builder.cpp push_cpp/entry_cpp impls 4. block_map_blocks_lookup_cpp return-type void* -> int (Phase 3 Batch 4) — change in builder_state_c.h, expect build fail at hir_c_api.cpp:hir_builder_get_block_at_off return statement Restore: `git checkout HEAD -- <file>` per spec §2.7.3 (deterministic cleanup; idempotent; no temp-file shuffling). EXIT trap restores any touched files defensively. Modes: - --dry-run: stage mutations, no build (any agent — bypass build lock) - --strict: exit 1 on FAIL (for gate integration) - --verbose: show build stderr Build lock: BUILD mode invokes cmake --build --target jit; per CLAUDE.md Phase 3D Build Lock, only testkeeper / gate_phoenix.sh may invoke with builds enabled. --dry-run is unrestricted. Dry-run verification: 4/4 fixtures stage cleanly; tree restored (git status clean post-run, no leftover modifications). §3.5 backstop count post-this-commit: 5/5 reached + impl landing. Future fixtures appended atomic-with-burndown per shepard 22:46:33Z + spec §2.7.3 python#5. Authorization: theologian 23:49:00Z §2.5 amendment + 00:14:30Z §2.7 sketch + supervisor 00:14:45Z SEQUENTIAL post-Batch-4-push disposition.
SonicField added a commit to SonicField/cpython that referenced this pull request
…hon#7) Per supervisor 02:45:37Z fast-path TRIGGER post Tier 8 Phase A incident python#7 (R-retry under enhanced mtime-checkpoint discipline also ROLLED BACK at HEAD 48339e2, same pattern as 01:23Z incident python#6). mtime-checkpoint discipline DETECTED proactive (Write tool safety check + post-write system-reminders) but did NOT prevent recurrence. (R-retry) reasoning ('discipline addresses risk class') empirically INVALIDATED — same external force re-reverts at every Tier 8 attempt. Pythia python#105 'fever has name infection still spreads' validated twice. Theologian-pre-drafted amendment 02:26:02Z replaces 'Tier 8 pilot scheduled' section with 'Tier 8 pilot BLOCKED (push 28+, 2026-04-24)': - Pilot field exception_table_ POD-equivalent - Phase A attempted 01:18:35Z + 02:39:00Z (R-retry); HALTED 01:23:55Z + 02:45:12Z by external file-state revert (incidents python#6 + python#7; observed-but-not-attributed per generalist 01:24:43Z + 02:45:12Z) - Resume gated on Alex disposition + fixup PIR; both unmet by push 28 deadline (supervisor 02:13:12Z + theologian 02:13:54Z) - DEADLINE reached push 28 at 02:15:47Z; second incident at 02:45:12Z re-confirms permanent-block-this-session **Pythia python#103 escape question RE-OPENED.** Phase 3 keep-bias is the END STATE pending future migrate-arm validation. 'Transitional foundation cost paid back' framing is HONEST-ASPIRATIONAL not RESOLVED. ZERO-C++ terminal goal (MEMORY.md L70 + L104) remains gated on Tier 8 pilot landing in a future session. Phase 3 cumulative +257L is END STATE this session. Future session must re-attempt Tier 8 Phase A under same spec (post external-revert root-cause attribution, since detection alone insufficient) OR honestly amend Phase 3 closure framing to 'permanent scaffolding'. Cross-link section also amended: §5 amendment line updated to 'keep-bias as design choice; Tier 8 migrate-arm pilot FILED but BLOCKED — see Tier 8 pilot BLOCKED section above'. Doc-only +24L. No §3.5 BUILD MODE per touched-files rule. Authorization: theologian 02:26:02Z STAGED-ON-DISK + supervisor 02:45:37Z fast-path TRIGGER post HALT python#7.
SonicField added a commit to SonicField/cpython that referenced this pull request
…amendment Per supervisor 02:48:39Z atomic doc-only bundle. Closes the 6→7 escalation triggered by Tier 8 pilot Phase A (R-retry) recurring revert at incident python#7. W48 spec (docs/w48-nbs-inotify-file-watcher-spec.md, +194L NEW): Theologian 02:48:25Z spec per W42/W44/W45 spec pattern. Elevates PIR §2.1 option (a) inotify file-watcher from DEFERRED to ACTIVE workstream. Mechanism: pyinotify daemon as NBS-suite sidecar; narrow watch per agent edit-set; event correlation with agent Write tool calls; forensic snapshot for root-cause attribution (closes pythia python#105 (3) zero-attribution gap). 4-escalation history honest framing: Alex directive D-1776434533 → gate python#3 D-1776887480 → 4-step discipline 03a0dcb → mtime-checkpoint 48339e2 → W48. Each progressively detective, none preventive. Cost ~3-5 sessions multi-session NBS-suite extension. Acceptance: 7 items including CLAUDE.md rule 5 addition + Tier 8 pilot retry under W48. PIR amendment (docs/2026-04-24-pre-edit-revert-pir.md, +21/-2): - Incident table: appended incident python#7 (2026-04-24T02:45Z, same pattern as python#6, mtime-checkpoint detected but did not prevent) - Conclusion: 7 incidents (was 6), 0 root cause attributions - NEW 'Incident python#7 ESCALATION' subsection: documents (R-retry) reasoning empirically INVALIDATED + pythia python#105 'fever has name' validated twice - NEW 'W48 ESCALATION' subsection: cross-links W48 spec landing + Tier 8 pilot Phase A retry GATED on W48 landing Doc-only bundle, no §3.5 BUILD MODE per touched-files rule. Closes the post-incident-python#7 reactive cycle: closure-amendment shipped at push 30 (f6328cd), W48 + PIR ship at push 31. Authorization: theologian 02:48:25Z (W48 spec) + supervisor 02:48:39Z (atomic bundle GO).
SonicField added a commit to SonicField/cpython that referenced this pull request
ROOT CAUSE FIX for the 8-incident undiagnosed-recurring file-state revert class (D-1776998268 + 7 priors). Per supervisor 04:14:27Z post-incident-python#8 ROOT CAUSE IDENTIFICATION: the §3.5 falsifier's restore_files() trap was the "external reverter" across all 8 incidents. It ran `git checkout HEAD --` on TOUCHED_FILES on script exit; if those files had unstaged modifications BEFORE the script ran (e.g., agent's in-flight Tier 8 Phase A content), the trap blew them away. Empirical validation (this session 04:13:36Z): - Test python#6 + python#7 (trivial content, single-mechanism): no revert - Tests python#5/python#7 idle: no revert - cmake build alone: no revert - §3.5 invocation on staged Phase A: REVERT (PhxExceptionTable count 13 → 0; mtime bumped 1777002918 → 1777003987; builder_state_c.h no longer M in git status) 8 prior incidents now retroactively attributed to §3.5 trap firing during build/gate cycles concurrent with agent Tier 8 attempts. NO external actor (no VS Code, no Alex, no formatter, no cron). W48 inotify daemon NOT NEEDED. (Iso-A) host relocation NOT NEEDED. Class size CLOSED — class type changed from "undiagnosed-recurring" to "self-inflicted via §3.5 trap, RESOLVED". Fix mechanism: snapshot per-file content to /tmp on first snapshot_file_if_new() call (per fixture mutation start). restore_files() copies from snapshot (not HEAD), preserving pre-script unstaged state. Snapshots cleaned + FILE_SNAPSHOTS array unset post-restore. Re-validation (this session post-fix): - §3.5 BUILD MODE 4/4 PASS - post-restore build [OK] - Phase A content (PhxExceptionTable count 13) SURVIVED §3.5 invocation - ALL 6 Tier 8 staged files still M Doc-only (script-only) push, no §3.5 BUILD MODE per touched-files rule (this IS the §3.5 script being amended; meta-circular but doc-only gate appropriate). Authorization: supervisor 04:14:27Z FIX directive post-ROOT-CAUSE identification (generalist 04:13:58Z catch). Pythia python#105 'fever has name infection still spreads' was structurally correct re self-inflicted infrastructure — but the infection wasn't external-class undiagnosable; it was OUR OWN script's exit trap trampling unstaged work. 5 detection layers (Alex directive D-1776434533, gate python#3 D-1776887480, 4-step Pre-Edit WT Integrity D-1776995670, mtime-checkpoint D-1776998268, W48 spec D-1776999077) added to detect ourselves. Audit own scripts BEFORE external-actor hypotheses (per new feedback memory entry).
SonicField added a commit to SonicField/cpython that referenced this pull request
Phase 4.A pilot conversion of the BuiltinLoadMethodElimination pass
(theologian invariant pre-audit 08:10:43Z + patch-shape APPROVE
08:39:30Z + nit-close 08:43:33Z; supervisor 08:14:58Z). First mutating-
pass conversion under Phase 4 OPEN; methodology (b) sole-path swap +
per-commit ABBA gate per supervisor 08:15:23Z + theologian 08:15:08Z.
Python/jit/hir/builtin_load_method_elimination_c.c (NEW, 295 LOC)
Pure-C body for the LoadMethod / GetSecondOutput / CallMethod
triple rewrite. Uses the Cat-A helpers already in
blme_helpers_c.{c,h}: phx_get_method_object_from_type +
phx_immutable_multithreaded_type_lookup. Container is a
PhxBlmeArray linear-scan keyed on LoadMethodBase pointer
(theologian recommendation; max LoadMethodBase per function is
typically <50). Outer fixed-point loop has a defensive iteration
cap (PHX_BLME_MAX_ITERATIONS=100) per theologian invariant python#8 —
cap-hit fires JIT_DCHECK_C in pydebug, benign early-out in
release. JIT_COMPILE_GUARD wraps each per-triple rewrite per
invariant python#7. addReference for both method_obj AND type_obj per
invariant python#6 (PyClassMethodDescr branch).
Python/jit/hir/builtin_load_method_elimination.cpp (-172 +9)
Deleted the C++ tryEliminateLoadMethod + Run bodies and the
extern "C" wrapper. Run() now forwards to
hir_builtin_load_method_elimination_run via static_cast<HirFunction>;
jit::hir::BuiltinLoadMethodElimination remains an instantiable
Pass for compiler.cpp:127's runPassIf chain.
Python/jit/hir/hir_instr_c_verify.cpp (+9)
Cross-C-struct name_idx-offset asserts for the LoadMethodBase set
(HirLoadMethod / HirLoadMethodCached / HirLoadModuleMethodCached).
No concrete C++ classes for these opcodes — Phoenix allocates them
via C factories — so the load-bearing invariant is C-side layout
consistency, not C↔C++ matching. Cross-arch DeoptBaseWithNameIdx
layout is covered indirectly by the existing FillTypeAttrCache
assert (same HIR_DEOPT_NAMEIDX_FIELDS macro origin).
Build: scripts/build_phoenix.sh --clean ThinLTO PASS (testkeeper
09:06:00Z, isolated to these 3 files). 5 JIT_DCHECK_C call sites,
1 new include cinderx/Common/jit_log_c.h.
ABBA (4-bench, 3-rep, baseline = vanilla CPython):
fibonacci 2.29x (+56.3%)
nqueens 1.59x (+37.2%)
gen_simple 0.74x (-34.7%) pre-existing alert (push 59 baseline 0.70x;
BLME modifies CallMethod/LoadMethodBase
pairs, generators don't exercise that hot
path; no causal mechanism for new regression)
func_calls 1.01x (+0.6%)
GEO-MEAN 1.28x no >5% drop trigger; well above 1.0x floor
Per-trajectory accounting per docs/phase4-hir-burndown-spec.md §5
(post 7a11cc0 refinement):
- C added: +295 (.c body) + 9 (verifier) = +304
- C++ removed: 172 (algorithm body) — shell deletion deferred to
Phase 4.D (compiler.cpp:127 still consumes the C++ Pass type)
- Shell-pending: builtin_load_method_elimination.cpp 21 LOC
SonicField added a commit to SonicField/cpython that referenced this pull request
Authored by theologian per supervisor 12:58:10Z 2026-05-12 authorization, addressing pythia python#353 substantive gap: A10 true-positive fire was undefined, leaving post-c2 evaluation without a pre-specified test. Specifies: - FABRICATION-VERDICT counted-event definition + non-coverage clause (routine verification stays under feedback_no_tool_execution_citation) - 4 outcome classes (TP / WHC / MF / TN) with mutual-exclusivity criteria - Per-event coding schema for chronological data collection - Pre-specified falsifier verdicts (strong-pass / weak-pass / fail) keyed on violation-rate vs baseline + probe-presence ratio - Per-class diagnostic signal (high WHC -> working-memory; high MF -> scope gap; low TP overall -> dormant rule) - Sample (n>=10) and horizon (5d initial / 14d defer) thresholds - Source-of-truth corpus + initial search heuristic - Ownership chain (theologian-author / librarian|scribe-collect / supervisor-dispose) - Self-falsifying disclaimer (taxonomy / window / thresholds / heuristic un-falsified-at-gate) - Explicit out-of-scope (other A-items / v3 corpus / author-exemption) Methodology document, NOT a v2.x amendment per supervisor authorization. v2.x moratorium remains in force. DO NOT PUSH until c2 lands (per supervisor 12:58:10Z directive). Gate- before-push CLAUDE.md rule applies regardless.