Files
rune/scripts/close_contract_drift_ledger.py
Nick e29cc5ee51
CI Pipeline / best-practices (push) Successful in 8s
CI Pipeline / documentation (push) Successful in 9s
CI Pipeline / rust-surface (push) Failing after 14s
CI Pipeline / go-surface (push) Failing after 16s
CI Pipeline / gitea-offline (push) Successful in 16s
Auto-version and Release / release (push) Successful in 31s
CI Pipeline / type-check (push) Failing after 44s
CI Pipeline / lint (push) Failing after 1m2s
CI Pipeline / canary (push) Failing after 2m13s
deploy / deploy (push) Failing after 15m33s
CI Pipeline / unit-tests (push) Failing after 16m40s
CI Pipeline / required-checks (push) Failing after 0s
CI Pipeline / CI Pipeline / notify-event-bridge (push) Failing after 4s
chore(store): close drift_ledger dichotomy contract BUILDER-2026-10-12T13:54:01Z-950331-factory-wave (parity c0ec3135, phase B 62e47b38)
2026-10-12 14:55:40 +01:00

62 lines
2.6 KiB
Python

#!/usr/bin/env python3
"""Open + walk + close the #2479 dichotomy-wave construction contract for
drift_ledger. Full lifecycle in ONE process (shared-store clobber hazard,
see notes-construction-intent-batch.md)."""
import json
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / "src"))
from rune.construction_interface import ConstructionInterface
iface = ConstructionInterface(builder="factory-wave")
r = iface.submit_need(
"Complete the drift_ledger dichotomy port to FULL Rust (#2479 tranche): "
"check/alert-loop, snapshot/anchor assembly, auto-fix routing and fix "
"gate as doc-envelope FFI; dl_loader ctypes loader mirroring "
"broker_loader.py (free via capability_scoring cs_free_string); facade "
"delegation with RUNE_DL_CORE=python pin; frozen-oracle battery (87 "
"cases, every public function/branch); live parity 100%; Phase B "
"language-advantage pass; dichotomy-audit instrument fixes (curator "
"alias + hyphen-twin mapping).",
origin="builder",
)
print("submit_need:", json.dumps(r)[:400])
if not r.get("success"):
print("NEED FAILED — aborting"); 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)[:300])
if not t.get("success"):
sys.exit(1)
c = iface.close(cid, observed_evidence=[{
"kind": "port_evidence",
"detail": "drift_ledger dichotomy completion — parity c0ec3135 "
"feat(drift_ledger): port remaining cores to FULL Rust — "
"dichotomy wave; Phase B 62e47b38 refactor(drift_ledger): "
"Phase B language-advantage pass — dichotomy wave (both pushed "
"gitea/master). Battery 8 tests replay the 87-case frozen "
"oracle truth VERBATIM; live parity 87/87 byte-identical "
"(RUNE_DL_CORE=auto vs =python); clippy -D warnings clean; "
"Python tests green (22 passed on drift-touching suites; 6 "
"pre-existing unrelated failures on the clean tree). Audit: "
"drift-ledger 14/14 FULL, drift_ledger 20/22 FULL, curator "
"40/43 FULL after the instrument fixes.",
}], scope_files=[
"src/rune/drift_ledger.py",
"src/rune/dl_loader.py",
"src/rust/drift_ledger/src/lib.rs",
"src/rust/drift_ledger/src/branch_battery.rs",
"scripts/gen_drift_ledger_truth.py",
"scripts/dichotomy_audit.py",
"docs/dichotomy-rebase-honest-audit.md",
])
print("close:", json.dumps(c)[:400])
print("CONTRACT", cid, "closed" if c.get("success") else "CLOSE_FAILED")