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.