Files
rune/scripts/close_contract_batch_g.py
T
Nick cdf8ca9cfa
CI Pipeline / best-practices (push) Successful in 9s
CI Pipeline / documentation (push) Successful in 10s
CI Pipeline / rust-surface (push) Failing after 17s
CI Pipeline / go-surface (push) Failing after 21s
CI Pipeline / gitea-offline (push) Successful in 26s
Auto-version and Release / release (push) Successful in 47s
CI Pipeline / type-check (push) Failing after 1m3s
CI Pipeline / lint (push) Failing after 1m26s
CI Pipeline / canary (push) Failing after 3m41s
CI Pipeline / required-checks (push) Canceled after 0s
CI Pipeline / CI Pipeline / notify-event-bridge (push) Canceled after 0s
CI Pipeline / unit-tests (push) Canceled after 11m11s
deploy / deploy (push) Canceled after 10m50s
chore(store): close execution_trace dichotomy contract BUILDER-2026-10-13T00:42:49Z-0b35b2-factory-batch-g (parity 4bda61cd, phase B f67f51e7)
2026-10-13 03:40:15 +01:00

36 lines
1.2 KiB
Python

#!/usr/bin/env python3
"""Close the #2479 dichotomy-wave construction contract for <module>.
The contract is ALREADY at verifying (walk_contract_batch_g.py walked it
in one process); a re-submit_need would collide on the existing contract
id (scaffold.new_contract raises "contract already exists") — close
directly, batch-b style (close_contract_intent_continuity.py).
Usage: close_contract_batch_g.py <module> <contract_id> <loader_py> <parity_sha> <phaseb_sha> <evidence>
"""
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
module, cid, loader_py, parity_sha, phaseb_sha = sys.argv[1:6]
evidence = sys.argv[6]
iface = ConstructionInterface(builder="factory-batch-g")
c = iface.close(cid, observed_evidence=[{
"kind": "port_evidence",
"detail": evidence,
}], scope_files=[
f"src/rune/{module}.py",
f"src/rune/{loader_py}",
f"src/rust/{module}/src/lib.rs",
f"src/rust/{module}/src/branch_battery.rs",
f"scripts/gen_{module}_truth.py",
f"scripts/check_{module}_parity.py",
])
print("close:", json.dumps(c)[:300])
print("CONTRACT", cid, "closed" if c.get("success") else "CLOSE_FAILED")