#!/usr/bin/env python3 """Open + walk the #2479 dichotomy-wave construction contract for connection_pool to verifying. Full lifecycle in ONE process.""" 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-batch-b") r = iface.submit_need( "Complete the connection_pool dichotomy port to FULL Rust (#2479 " "tranche, programme verdict RUST): pool-bookkeeping kernel (pooling " "order, stale removal, oldest-first eviction, status) as doc-envelope " "FFI (cpool_new/begin_get/commit/close_all/status, free via " "capability_scoring cs_free_string — no free re-export); cpool_loader " "mirroring broker_loader.py; facade delegation with RUNE_CPOOL_CORE=" "python pin (sqlite handles stay in the facade); frozen-oracle battery " "(16 cases, every kernel branch, frozen against a real sqlite-backed " "pool); live parity 100% (60-seed random-op sweep); classification " "flip GO→RUST; Phase B language-advantage pass.", origin="builder", ) print("submit_need:", json.dumps(r)[:300]) 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)[:150]) if not t.get("success"): sys.exit(1) print("CONTRACT", cid, "verifying")