Audit-missing fn _smod_core ported name-preserving (gap.rs): the delegation-probe verdict as data (salience_gate _sg_core / spine _rust_core pattern — the loader module is unrepresentable over FFI; RUNE_SM_CORE belongs to shard_manager, smod keeps its own pin). Shared-harness frozen truth (frozen_smod_gap_truth.json, byte-verified via freeze_truth.py --verify) + gap battery + live gap parity (pinned 2/2, live matrix 2/2 — 100%) + pytest both pins green. Audit: self_modify 7/8 -> 8/8 FULL. Lane factory-literal-l0 (issue #2479).
54 lines
1.7 KiB
Python
54 lines
1.7 KiB
Python
#!/usr/bin/env python3
|
|
"""gen_self_modify_gap_truth.py — literal-100% residue truth for
|
|
self_modify (dichotomy wave #2479, lane factory-literal-l0): the
|
|
audit-missing `_smod_core` delegation probe.
|
|
|
|
Shared-harness rows (scripts/freeze_truth.py list format): the probe
|
|
observed under RUNE_SMOD_CORE=python — the pin short-circuits the probe
|
|
to None (the fallback verdict). The all-present branch is delegation
|
|
itself — machine-dependent .so presence, covered LIVE by
|
|
scripts/check_self_modify_gap_parity.py, never frozen.
|
|
|
|
Pin BEFORE the oracle import: freeze_truth's stem-derived pin
|
|
(RUNE_SELF_MODIFY_CORE) does not reach this oracle. (RUNE_SM_CORE
|
|
belongs to shard_manager — smod keeps its own pin.)
|
|
|
|
Verify (byte-identical law):
|
|
PYTHONPATH=src:scripts RUNE_SMOD_CORE=python \\
|
|
python3 scripts/freeze_truth.py --verify \\
|
|
src/rust/self_modify/src/frozen_smod_gap_truth.json \\
|
|
--module rune.self_modify
|
|
"""
|
|
|
|
import os
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
REPO = Path(__file__).resolve().parent.parent
|
|
sys.path.insert(0, str(REPO / "src"))
|
|
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
|
|
|
os.environ["RUNE_SMOD_CORE"] = "python"
|
|
|
|
from freeze_truth import freeze, write # noqa: E402
|
|
|
|
TRUTH_PATH = REPO / "src" / "rust" / "self_modify" / "src" / "frozen_smod_gap_truth.json"
|
|
|
|
|
|
def main() -> int:
|
|
cases = freeze(
|
|
"self_modify",
|
|
[
|
|
("_smod_core", (), {}), # pin honored → None (fallback verdict)
|
|
("_smod_core", (), {}),
|
|
],
|
|
oracle_module="rune.self_modify",
|
|
)
|
|
write(cases, TRUTH_PATH)
|
|
print(f"wrote {TRUTH_PATH} ({len(cases)} cases)")
|
|
return 0
|
|
|
|
|
|
if __name__ == "__main__":
|
|
raise SystemExit(main())
|