Files
rune/scripts/close_contract_final_f1.py
T
Nick 61e62f13f1 chore(store): close literal-100% FINAL-WAVE F1 lane dichotomy contract BUILDER-2026-10-15T08:14:33Z-f64335-factory-final-f1
Two-module literal-100% residue lane closed via iface.close() (walk
draft->approved->building->verifying->closed in ONE process — the
kill-after-commit note: the 120s shell timeout truncated only the
buffered console prints; the durable walk completed 08:14:33Z ->
08:16:10Z, store re-validated line-by-line after). Both feat commits
verified gitea/master ancestors: structural_migration a399477b (4/4,
apply_migration consent gate with clock-as-argument civil law incl.
leap-day + pre-epoch instants, consent_brief insertion-order law via
serde_json preserve_order, 25-case frozen truth regen-x2-identical),
voice_injector d268b365 (5/5, toDict + toDictJSON byte law
json.dumps(indent=2) with ensure_ascii + integral-float rules,
testInjection stdout law with >100-rune codepoint-slice proof,
injectVoice with the blend peeled to an argument — 13-case frozen
truth, go test/vet/gofmt/build clean, voice-family pytest 21/21 BOTH
pins). No loader replay exists for either module — frozen-oracle
battery replay is the parity gate (L3 law). Machinery exclusions
hold: only dataclass dunders excluded in both oracle files
(dichotomy_audit.py:75-83). Audit doc regenerated: FULL 148/193
(77%) fn 1933/2301 PARTIAL 6 -> FULL 150/193 (78%) fn 1937/2301
PARTIAL 4; both targets FULL, missing lists empty. Evidence:
verification/smig-*, verification/vi-*, verification/f1-summary.md.
2026-10-15 09:26:25 +01:00

107 lines
4.8 KiB
Python

#!/usr/bin/env python3
"""Open+close the #2479 literal-100% FINAL-WAVE F1 construction contract
(2 modules, builder=factory-final-f1). Re-walk law: starts from DRAFT —
submit_need → approved → building → verifying → closed in ONE process,
with SHA evidence. CS_RUST_LIB must point at a BUILT capability_scoring
.so (the Python oracle is retired and raises).
"""
import json
import os
import sys
from pathlib import Path
REPO = Path(__file__).resolve().parent.parent
os.environ.setdefault(
"CS_RUST_LIB",
str(REPO / "src" / "rust" / "capability_scoring" / "target" / "release"
/ "libcapability_scoring.so"),
)
sys.path.insert(0, str(REPO / "src"))
from rune.construction_interface import ConstructionInterface # noqa: E402
SHAS = {
"structural_migration": "2357c95e",
"voice_injector": "b2d9c045",
}
iface = ConstructionInterface(builder="factory-final-f1")
r = iface.submit_need(
"Close the literal-100% residue for the FINAL-WAVE F1 dichotomy lane "
"(structural_migration +2: apply_migration/consent_brief into the "
"existing Rust crate; voice_injector +2: test_injection/to_dict into "
"the existing Go impl) — port name-preserving, extend the frozen-truth "
"batteries, verify-gated: battery green + truth regen byte-identical "
"+ frozen-oracle parity replay + clippy -D warnings / gofmt+vet+build "
"+ Python suites both pins; one commit per module.",
origin="builder",
)
print("submit_need:", json.dumps(r)[:300])
if not r.get("success"):
sys.exit(1)
cid = r["ids"]["contract_id"]
print("contract_id:", cid)
for phase in ("approved", "building", "verifying"):
t = iface.transition(cid, phase)
print(f"transition->{phase}:", json.dumps(t)[:200])
if not t.get("success"):
sys.exit(1)
c = iface.close(cid, observed_evidence=[{
"kind": "port_evidence",
"detail": (
"FINAL-WAVE F1 literal-100% lane — 2/2 modules landed on "
"gitea/master, each SHA ancestor-verified: structural_migration "
"2357c95e (4/4, apply_migration consent gate with the clock as an "
"argument — civil_from_days law incl. the 2024-02-29 leap day and "
"pre-epoch -1 instants, ConsentRequired message contract with the "
"arrow + changes[:3] list-repr, approved_by None/empty-string "
"branches; consent_brief rule-18I dict with serde_json "
"preserve_order insertion-order assertions; 25-case frozen truth "
"via a time-symbol rig, regen x2 byte-identical md5 "
"da5a47225a5ccd474adca90e5e510c97) and voice_injector b2d9c045 "
"(5/5, toDict insertion-order KV + the toDictJSON BYTE law "
"json.dumps(to_dict(), indent=2) with ensure_ascii escapes and the "
"integral-float rule, testInjection 5-fixed-message stdout law "
"with a >100-rune unicode guidance proving the codepoint-slice "
"law, injectVoice real logic with the DB-backed voice_hybrid "
"blend peeled to an argument — task_gate boundary law; 13-case "
"frozen truth via a voice_hybrid stub rig, regen x2 "
"byte-identical md5 003821eace57d11a184a87bf98aaf020). "
"Verification per module in this checkout: cargo battery 5/5 + "
"clippy -D warnings + build clean; go test (TestGapsParity 13/13) "
"+ vet + gofmt + build clean; Python suites green BOTH pins where "
"pins exist (voice family 21/21 live AND RUNE_VOICE_HYBRID_CORE"
"=python; structural_migration has no loader — facade is pure "
"Python, 20/20 unpinned, pins trivially both). No loader replay "
"exists for either module — the frozen-oracle battery replay IS "
"the live-parity gate (L3 law). Machinery exclusions hold: the "
"only excluded names in both oracle files are dataclass dunders "
"(runtime machinery); no _core probes or _py_ pins exist in "
"either module. Audit delta: baseline FULL 148/193 (77%) fn "
"1933/2301 PARTIAL 6 → post-lane FULL 150/193 (78%) fn 1937/2301 "
"PARTIAL 4; both targets FULL with empty missing lists; +4 fns. "
"Divergences documented (py_str_list quote fallback; pyFloat "
"exponent form) — truth cases avoid both. Evidence: "
"verification/smig-*.{log,exit,md5}, verification/vi-*.{log,exit}, "
"verification/f1-summary.md."
),
}], scope_files=[
"src/rust/structural_migration/Cargo.toml",
"src/rust/structural_migration/src/lib.rs",
"src/rust/structural_migration/src/frozen_smig_truth.json",
"scripts/gen_structural_migration_truth.py",
"src/go/voice-injector/gaps.go",
"src/go/voice-injector/truth_gaps.json",
"src/go/voice-injector/truth_gaps_test.go",
"scripts/gen_voice_injector_truth.py",
"scripts/close_contract_final_f1.py",
"verification/f1-summary.md",
])
print("close:", json.dumps(c)[:400])
if not c.get("success"):
sys.exit(1)
print("CLOSED", cid)