42 lines
1.7 KiB
Python
42 lines
1.7 KiB
Python
#!/usr/bin/env python3
|
|
"""Open the #2479 dichotomy-wave construction contract for persona_gate (GO gap-closing port).
|
|
Full lifecycle walk in ONE process (shared-store clobber hazard)."""
|
|
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-gap-pg")
|
|
|
|
r = iface.submit_need(
|
|
"Close the persona_gate dichotomy PARTIAL gap (issue #2479 tranche, GO): "
|
|
"extend the existing Go port src/go/persona-gate with the audit-missing "
|
|
"functions (_now, _cc_pg_core, _py_lex, _lex_input, _py_overlap, "
|
|
"_embed_raw, _embed_vec, _cosine, _semantic_engagement, _rule_json, "
|
|
"_py_decide, _journal, decide_and_journal, _user_rule_authorizes, "
|
|
"_find_user_authorizing, _invoke_model, build_gate_prompt, report, "
|
|
"handle_hook) name-preserving with logic 1:1 to the Python oracle "
|
|
"src/rune/persona_gate.py, embedding/HTTP/subprocess/journal IO behind "
|
|
"injectable seams, frozen-truth battery generated against the live "
|
|
"oracle (RUNE_COGNITION_CORE=python pinned, deep-copied inputs), live "
|
|
"parity 100% on the new functions, Phase B language-advantage pass.",
|
|
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)
|
|
|
|
print("CONTRACT", cid, "IN VERIFYING (close happens at delivery with SHAs)")
|