From 4b544514442516183b249c6ece0d08ef4b42d83d Mon Sep 17 00:00:00 2001 From: Nick Date: Fri, 18 Sep 2026 19:14:23 +0100 Subject: [PATCH] =?UTF-8?q?fix(event-driven):=20resolve=20short=20SHAs=20t?= =?UTF-8?q?o=20full=2040-char=20before=20authority=20read=20=E2=80=94=2012?= =?UTF-8?q?-char=20prefix=20silently=20failed=20=5Ffetch=5Fruns=20equality?= =?UTF-8?q?=20(962e351=20root=20cause)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/ci_event_wait.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/scripts/ci_event_wait.py b/scripts/ci_event_wait.py index fadbb675..41314cdc 100644 --- a/scripts/ci_event_wait.py +++ b/scripts/ci_event_wait.py @@ -328,6 +328,20 @@ def run(*, sha: str, deadline_secs: int, # python-level run() callers (tool normalization flow) must export it. if sha and not os.environ.get("DEPLOY_SHA"): os.environ["DEPLOY_SHA"] = sha + # H-PATCH: resolve short SHAs to full 40-char — _fetch_runs and + # deploy_qualify match on the FULL sha; a 12-char prefix would + # silently fail equality and park the waiter until deadline + # (the 962e351 root cause). + if sha and len(sha) < 40: + try: + full = subprocess.run( + ["git", "-C", str(_SCRIPT_DIR.parent), "rev-parse", sha], + capture_output=True, text=True, timeout=10) + if full.returncode == 0: + sha = full.stdout.strip() + os.environ["DEPLOY_SHA"] = sha + except (OSError, subprocess.TimeoutExpired): + pass t0 = time.time() # §16Y #10 race fix: the FIFO reader exists BEFORE registration, so a # wake arriving in the registration window can always be delivered. -- 2.56.0