diff options
| author | YurenHao0426 <Blackhao0426@gmail.com> | 2026-07-22 20:25:48 -0500 |
|---|---|---|
| committer | YurenHao0426 <Blackhao0426@gmail.com> | 2026-07-22 20:25:48 -0500 |
| commit | 9ca51a97119efc90bc2a0b6b65624dc87689e088 (patch) | |
| tree | b4a4b194884344ccc1b5cd7f81d7db7fd4d3e210 | |
| parent | 0ccb8ff9ea6686ca8b0adf3ec552408b4b07ad6b (diff) | |
audit: make D4 confirmation gate immutable
| -rw-r--r-- | DYNAMIC_INNOVATION.md | 4 | ||||
| -rw-r--r-- | experiments/analyze_kp_dynamic_projection_confirmation.py | 23 |
2 files changed, 27 insertions, 0 deletions
diff --git a/DYNAMIC_INNOVATION.md b/DYNAMIC_INNOVATION.md index 2a22ea9..9f148bb 100644 --- a/DYNAMIC_INNOVATION.md +++ b/DYNAMIC_INNOVATION.md @@ -211,3 +211,7 @@ the accept bar. It does not establish the oral claim: standard-network depth scaling and the broader biological signature panel remain separate gates. A D4 failure keeps the D3-supported score at 6 and closes this confirmation without threshold repair. + +The executable audit accepts exactly the ten named frozen records and rejects +missing or extra JSON cells. Once its deterministic gate exists, later audits +may only verify exact equality with that record; they cannot overwrite it. diff --git a/experiments/analyze_kp_dynamic_projection_confirmation.py b/experiments/analyze_kp_dynamic_projection_confirmation.py index 291de88..9a17206 100644 --- a/experiments/analyze_kp_dynamic_projection_confirmation.py +++ b/experiments/analyze_kp_dynamic_projection_confirmation.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 """Audit the frozen D4 paired five-seed test confirmation.""" import argparse +import glob import json import math import os @@ -68,6 +69,20 @@ def main(): source_commits = set() failures = [] finite_values = [] + expected_names = { + f"seed{seed}_{condition}.json" + for seed in SEEDS for condition in CONDITIONS + } + observed_names = { + os.path.basename(path) + for path in glob.glob(os.path.join(args.input_dir, "*.json")) + } + if observed_names != expected_names: + missing = sorted(expected_names - observed_names) + extra = sorted(observed_names - expected_names) + raise ValueError( + f"D4 requires exactly the frozen ten records; " + f"missing={missing}, extra={extra}") bp_macs_50k = int(round( float(full_gate["metrics"]["bp_total_macs"]) * 50_000 / 45_000)) for seed in SEEDS: @@ -240,6 +255,14 @@ def main(): "establish the strict accept bar; depth scaling remains oral work"), } os.makedirs(os.path.dirname(os.path.abspath(args.out)), exist_ok=True) + if os.path.exists(args.out): + with open(args.out) as handle: + existing = json.load(handle) + if existing != output: + raise ValueError( + "existing D4 gate differs from the deterministic re-audit") + print(json.dumps(output, indent=2)) + return with open(args.out, "w") as handle: json.dump(output, handle, indent=2, sort_keys=True) handle.write("\n") |
