Files
rune/scripts/walk_contract_work_manager_gap.py
T
Nick b973b96a1e
CI Pipeline / rust-surface (push) Failing after 20s
CI Pipeline / go-surface (push) Failing after 20s
CI Pipeline / best-practices (push) Successful in 5s
CI Pipeline / documentation (push) Successful in 4s
CI Pipeline / required-checks (push) Canceled after 0s
CI Pipeline / CI Pipeline / notify-event-bridge (push) Canceled after 0s
Auto-version and Release / release (push) Canceled after 51s
CI Pipeline / unit-tests (push) Canceled after 45s
CI Pipeline / lint (push) Canceled after 46s
CI Pipeline / gitea-offline (push) Canceled after 19s
CI Pipeline / type-check (push) Canceled after 26s
CI Pipeline / canary (push) Canceled after 46s
deploy / deploy (push) Canceled after 56s
feat(work_manager): close PARTIAL gaps — dichotomy wave
2026-10-13 07:45:50 +01:00

42 lines
1.8 KiB
Python

#!/usr/bin/env python3
"""Open + walk the gap-closing construction contract for work_manager to
verifying. Full lifecycle open in ONE process (builder=factory-gap-wm)."""
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-wm")
r = iface.submit_need(
"Close the work_manager dichotomy-port PARTIAL gaps (#2479 tranche, "
"GO verdict): port the 13 missing functions (group_by_file, "
"load_config, save_config, load_batches, save_batches, create_work, "
"clear_work, audit_to_work_items, auto_fill_from_audit, load_meta, "
"save_meta, update_meta_from_batches + full get_status/get_meta_"
"status and TaskMeta with progress/eta) from the Python oracle "
"src/rune/work_manager.py into src/go/work-manager name-preserving, "
"logic 1:1, file IO behind injectable seams (module-level path "
"constants mirrored as seam vars). Freeze shared-harness truth "
"(freeze_truth.py, RUNE_WORK_MANAGER_CORE=python pinned, HOME-pinned "
"temp work dir, self-seeding deterministic case sequence) embedded "
"VERBATIM in the Go battery; all existing tests green; gofmt + vet "
"clean; live parity 100% on the new fns (oracle subprocess, "
"timestamp-normalized); 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")