Commit 911e173
committed
docs: W25 §5.3 pre-Step-B baseline result — drift UNDETECTED (PASS)
Per W25 spec §5.3 + theologian [chat 2026-04-22 19:29Z] acceptance
flip: pre-Step-B baseline PASSES when BUILD_EXIT=0 (drift surface
empirically confirmed real). Captured by testkeeper [chat L2154] at
HEAD 2ed74a9.
EMPIRICAL FINDING:
Mutation: hir_c_insert_before +3rd arg in BOTH .h:726 + .cpp:2349
Build cmd: scripts/build_phoenix.sh
BUILD_EXIT=0 (zero hir_c_insert_before-related errors/warnings)
→ drift undetected at compile time
→ §1b drift surface CONFIRMED real
INTERPRETATION:
hir_c_api.cpp compiles (header + impl agree on new sig)
§1b TUs (licm_c.c + pass_output_type_c.c) local externs stay 2-arg
§1b callers compile against stale local extern (2 args)
Linker resolves 'hir_c_insert_before' by name → finds 3-arg impl
Runtime UB at call site (impl reads garbage 3rd arg from stack)
This is exactly the W25 §1b drift surface Step B is designed to close.
POST-STEP-B PREDICTED OUTCOME (deferred until Step B lands):
Same dual-mutation procedure should yield BUILD_EXIT≠0 with compile
errors at licm_c.c + pass_output_type_c.c call sites — local externs
deleted in Step B, canonical 3-arg sig now visible via
#include "hir_c_api.h", 2-arg callers fail at compile time.
If POST-STEP-B BUILD_EXIT=0: Step B did NOT close the drift surface
(regression — investigate which §1b TU still has local extern OR
which include path didn't apply). If POST-STEP-B BUILD_EXIT≠0 at
expected sites: §5.3 falsification PASSES end-to-end, lint gate
(Step C) makes the closure permanent.
BONUS PRE-EXISTING DRIFT FINDING (no mutation needed):
pass_output_type_c.c local externs use 'void *block' for hir_bb_*
functions; canonical hir_c_api.h post-Step-A uses
'struct HirBasicBlock *block'. The void* and struct-ptr are ABI-
compatible at 8 bytes, so this drift silently links today. Step B
cleanup will surface this signature mismatch at compile time —
another empirical case the lint gate would catch.
Authorship: testkeeper executed procedure; generalist commits artifact
per role boundary.
Authorization chain:
- W25 spec §5.3: theologian L2017
- Procedure (after 2 corrections): 2ed74a9 docs/w25-step-b-mutation-test.md
- Testkeeper baseline run + result: chat L2154
- Acceptance flip: theologian L2148, codified in §5 of procedure doc1 parent 2ed74a9 commit 911e173
1 file changed
Lines changed: 15 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 | + | |
0 commit comments