Files
rune/scripts/close_contract_night_mode.py
T
Nick d00f07d3ea
CI Pipeline / best-practices (push) Successful in 10s
CI Pipeline / documentation (push) Successful in 5s
CI Pipeline / rust-surface (push) Failing after 18s
CI Pipeline / go-surface (push) Failing after 21s
CI Pipeline / gitea-offline (push) Successful in 16s
Auto-version and Release / release (push) Successful in 58s
CI Pipeline / type-check (push) Failing after 52s
CI Pipeline / lint (push) Failing after 1m29s
CI Pipeline / canary (push) Failing after 2m24s
deploy / deploy (push) Failing after 16m13s
CI Pipeline / unit-tests (push) Failing after 17m52s
CI Pipeline / required-checks (push) Failing after 1s
CI Pipeline / CI Pipeline / notify-event-bridge (push) Failing after 6s
chore(store): close night_mode dichotomy contract BUILDER-2026-10-13T03:16:06Z-57d4cc-factory-gap-nm (parity 150f5b86, phase B 709c2ca4)
2026-10-13 09:05:10 +01:00

49 lines
2.1 KiB
Python

#!/usr/bin/env python3
"""Close the #2479 dichotomy-wave construction contract for night_mode
with SHA evidence."""
import json
import os
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / "src"))
os.environ["CS_RUST_LIB"] = "/mnt/workdrive/rune/src/rust/capability_scoring/target/release/libcapability_scoring.so"
from rune.construction_interface import ConstructionInterface
cid = sys.argv[1]
iface = ConstructionInterface(builder="factory-gap-nm")
c = iface.close(cid, observed_evidence=[{
"kind": "port_evidence",
"detail": "night_mode dichotomy completion — parity 150f5b86 "
"feat(night_mode): close PARTIAL gaps — dichotomy wave; "
"Phase B (trunc ASCII zero-alloc fast path, rune walk "
"only for long/non-ASCII) pushed gitea/master. Go port at "
"src/go/night-mode closes all 12 audit-named gaps "
"name-preserving (_ctx_budget, get_night_mode, "
"start/stop_night_mode, get_status, get_report, to_dict, "
"_load, _save, _run_loop, _run_sleep, _run_evaluation + "
"_run_iteration/_generate_report); pure/IO split law with "
"injected clock/wait/script/HTTP/rand/loop seams. Battery "
"10 tests replay the 9-case frozen oracle truth VERBATIM "
"(stop guard, idle status/report, 6 _ctx_budget branches); "
"live parity 100% (status/report/stop x 3 scenarios + CLI "
"round-trip); pytest 37/37 both ways (RUNE_NIGHT_MODE_CORE "
"auto vs =python); gofmt+vet clean. Zero regressions "
"(failure set byte-identical before/after).",
}], scope_files=[
"src/rune/night_mode.py",
"src/go/night-mode/main.go",
"src/go/night-mode/night_mode_test.go",
"src/go/night-mode/frozen_truth.json",
"scripts/gen_night_mode_truth.py",
"scripts/check_night_mode_parity.py",
"tests/test_night_mode.py",
"scripts/open_contract_night_mode.py",
"scripts/close_contract_night_mode.py",
])
print("close:", json.dumps(c)[:300])
print("CONTRACT", cid, "closed" if c.get("success") else "CLOSE_FAILED")