Skip to content

A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.

Tools: the itch save test waits up to 40 minutes for itch to unpack an upload (#1910)

Eyal Golan34e12103b399
diff --git a/tools/nightly.py b/tools/nightly.py
index 9ecaa6724..2ba236e0e 100644
--- a/tools/nightly.py
+++ b/tools/nightly.py
@@ -751,7 +751,10 @@ def run_night(cfg: Config, state_path: Path, job: Path, runner: Runner, gh: GitH
# --- the itch.io save test --------------------------------------------------------------------------------------------
PERSIST_SAVED = re.compile(r"^PERSISTENCE saved (\d{4}-\d{2}-\d{2}) turn (\d+) hash ([0-9a-f]+)$", re.M)
-SAVETEST_FRAME_TRIES = 20 # the page names a new upload's frame a little after butler shows the build live
+# The page names a new upload's frame only after itch has unpacked it; until then it carries just a JSON load_url
+# ({"status":"extracting"}). Unpacking the web build took about 17 minutes on 28 October 2026, longer than the old
+# 10-minute wait, so the save test now waits up to 40 minutes.
+SAVETEST_FRAME_TRIES = 80
SAVETEST_FRAME_SLEEP = 30
SAVETEST_RUN_MINUTES = 10
TOOLS = Path(__file__).resolve().parent
diff --git a/tools/tests/test_nightly.py b/tools/tests/test_nightly.py
index b6e54220e..285919cf9 100644
--- a/tools/tests/test_nightly.py
+++ b/tools/tests/test_nightly.py
@@ -1734,6 +1734,18 @@ def test_savetest_needs_a_published_nightly_and_a_page_url(saved, kw):
assert "SAVETEST INCONCLUSIVE" in t.log()
+def test_savetest_waits_while_itch_is_still_unpacking_the_upload(saved):
+ t = saved() # 28 Oct 2026: the page showed only a load_url for about 17 minutes before it named the frame
+ framed, calls = page_for(t.itch), {"n": 0}
+
+ def fetch(url, timeout=30):
+ calls["n"] += 1
+ if calls["n"] <= 30: # 30 polls x 30 s = 15 minutes of {"status":"extracting"}
+ return Page('<div class="html_embed_widget">Embed({"load_url":"https:\\/\\/x.itch.io\\/g\\/html_url\\/1"})')
+ return framed(url, timeout)
+ assert t.run(fetch) == "PASS" and t.enabled()
+
+
def test_savetest_a_page_without_a_frame_is_inconclusive(saved):
t = saved()
assert t.run(page_for(t.itch, frame=False)) == "INCONCLUSIVE" and t.runner.runs == [] and not t.enabled()