Files
rune/scripts/close_contract_connection_pool.py
T

45 lines
2.0 KiB
Python

#!/usr/bin/env python3
"""Close the #2479 dichotomy-wave construction contract for connection_pool
with 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
cid = sys.argv[1]
iface = ConstructionInterface(builder="factory-batch-b")
c = iface.close(cid, observed_evidence=[{
"kind": "port_evidence",
"detail": "connection_pool dichotomy completion — parity 19887b9b "
"feat(connection_pool): port to FULL Rust — dichotomy wave; "
"Phase B (Action enum + zero-copy borrowed pooling-order "
"scan) pushed gitea/master. Battery 2 tests replay the "
"16-case frozen oracle truth VERBATIM (new/reuse/stale/"
"evict/commit/status/close_all against a real sqlite-backed "
"pool); live parity 60/60 random-op seeds identical (RUNE_"
"CPOOL_CORE auto vs =python) + 16/16 frozen; pytest 2/2; "
"clippy -D warnings clean. Classification flipped GO→RUST "
"in store/rebase/classification.json (programme verdict; "
"sqlite handles stay in the facade). Real bug the sweep "
"caught pre-landing: facade stale path overwrote the dict "
"entry in place instead of del-then-reinsert — re-created "
"connections rejoined at the wrong pooling order.",
}], scope_files=[
"src/rune/connection_pool.py",
"src/rune/cpool_loader.py",
"src/rust/connection_pool/src/lib.rs",
"src/rust/connection_pool/src/branch_battery.rs",
"src/rust/connection_pool/frozen_cpool_truth.json",
"scripts/gen_connection_pool_truth.py",
"tests/test_connection_pool.py",
"store/rebase/classification.json",
"scripts/walk_contract_connection_pool.py",
"scripts/close_contract_connection_pool.py",
])
print("close:", json.dumps(c)[:300])
print("CONTRACT", cid, "closed" if c.get("success") else "CLOSE_FAILED")