← Commit history

release.py: fetch the LIVE tier release log before editing (a stale working copy clobbered 26 entries for 12 min) and read the public-tier version LIVE (the local manifest missed John's 0.2.39 promote)

Colby Knox ·0209c164ab ·1mo ago ·parent 80f0395
Co-Authored-By: Claude Fable 5 <[email protected]>
1 file changed +17−2
scripts/release.py+17−2
@@ -213,6 +213,14 @@ def ship_insiders(log_line):     ins = manifest_for(ver, zname, zpath, sha, "insiders")     work = DIST / "insiders-repo"     (work / "altium-bridge").mkdir(parents=True, exist_ok=True)+    # NEVER edit a stale working copy: adom/insiders is a SHARED repo that parallel sessions+    # (John's threads) write between our publishes. A Sept-8 working copy pushed on 2026-09-21+    # clobbered 26 release-log entries for 12 minutes. Fetch the LIVE log first, always.+    live = subprocess.run(["adom-wiki", "api", f"/api/v1/pages/insiders/files/{INSIDERS_LOG}"],+                          capture_output=True, text=True)+    if live.returncode == 0 and '"raw"' in live.stdout:+        raw = json.loads(live.stdout[live.stdout.find("{"):])["raw"]+        (work / INSIDERS_LOG).write_text(raw)     (work / INSIDERS_REL).write_text(json.dumps(ins, indent=2) + "\n")     ARCHIVE.mkdir(exist_ok=True)     (ARCHIVE / f"{ver}.json").write_text(json.dumps(ins, indent=2) + "\n")@@ -255,8 +263,15 @@ def ship_insiders(log_line):     served = two_curl_split_check()     if served.get("version") != ver:         raise SystemExit(f"insiders manifest serves {served.get('version')}, expected {ver}")-    pub = json.loads(PUBLIC_MANIFEST.read_text())-    print(f"SHIPPED {ver} to INSIDERS; public tier still serves {pub['version']}.")+    import urllib.request+    try:+        with urllib.request.urlopen(+                f"https://wiki.adom.inc/api/v1/pages/{PAGE_SLUG}/files/adom-bridge-altium-manifest.json",+                timeout=15) as r:+            pub = json.loads(r.read())+    except Exception:+        pub = json.loads(PUBLIC_MANIFEST.read_text())+    print(f"SHIPPED {ver} to INSIDERS; public tier serves {pub['version']} (read LIVE - the local manifest can be stale when another session promoted).")     print(f'To promote: python3 scripts/release.py --promote {ver} --attest "<the human\'s exact words>" --by "<name>"')