fix(mosaic): retry the Invariant R pi version probe under CI load #1441

Merged
fred merged 1 commits from fix/invariant-r-version-probe-retry into next 2026-08-27 16:38:54 +00:00
@@ -75,7 +75,7 @@ def run_pi_registry_command(
runner=subprocess.run,
sleeper=time.sleep,
) -> subprocess.CompletedProcess[str]:
"""Run the registry probe with bounded retries for concurrent-Pi stalls."""
"""Run a Pi probe command with bounded retries for concurrent-Pi stalls."""
for attempt in range(1, PI_PROBE_ATTEMPTS + 1):
try:
@@ -106,13 +106,7 @@ def probe_pi_registry() -> list[dict[str, object]]:
if pi is None:
raise AssertionError("installed Pi runtime is required for Invariant R")
version = subprocess.run(
[pi, "--version"],
check=False,
capture_output=True,
text=True,
timeout=10,
)
version = run_pi_registry_command([pi, "--version"], dict(os.environ))
if version.returncode != 0:
raise AssertionError(f"Pi version probe failed: {version.stderr.strip()}")
if version.stdout.strip() != PI_VERSION: