← Commit history

suite: readiness preflight (26 bogus STARTUP-hang failures when run raced a fresh spawn)

John Lauer ·257ad864e5 ·2mo ago ·parent 95e17a9
1 file changed +21
skills/kicad-bridge-test/run_verb_tests.py+21
@@ -263,6 +263,27 @@ def main():     only = set(x.strip() for x in a.only.split(",") if x.strip())     results, t0 = {}, time.time() +    # phase -1: PREFLIGHT — wait for the bridge to actually be listening before+    # judging verbs. A just-(re)spawned bridge takes ~10-20s (port bind + KiCad+    # detection); starting the suite inside that window produced 26 bogus+    # "STARTUP hang" failures on 2026-08-15. Poll up to 90s, fail fast after.+    print("[preflight] waiting for the bridge to answer ...")+    _ok = False+    for _ in range(30):+        pr = ab(a.target, "kicad_status", {}, timeout=20)+        if ok(pr):+            _ok = True+            break+        time.sleep(3)+    if not _ok:+        print("FATAL: bridge never became reachable — aborting (0 verbs judged). "+              "Check adom-bridge#56 / the manual-instance workaround.")+        (outdir / "report.json").write_text(json.dumps(+            {"target": a.target, "totals": {"pass": 0, "fail": 0, "skip": 0},+             "fatal": "bridge unreachable in preflight", "failures": [],+             "coverage_gap": [], "results": {}}, indent=2))+        return 2+     # phase 0: push fixtures     print(f"[0] pushing rp2040 fixture to {base} ...")     files = [str(PACK / f) for f in ("rp2040-breakout.kicad_pcb", "rp2040-breakout.kicad_sch",