fix(mosaic): route the Invariant R pi version probe through the bounded-retry runner
ci/woodpecker/pr/ci Pipeline was successful

The version probe was a bare subprocess.run with a 10s timeout while the
registry probe already had run_pi_registry_command's 45s timeout and three
attempts for concurrent-Pi stalls. Under CI queue load the bare probe is the
step that times out: pipelines 2808-2810 and 2819-2820 all failed at
test_pi_carve_out_resolves_to_real_unshadowed_builtins with
'pi --version timed out after 10 seconds' on unrelated (including docs-only)
heads, while 2814/2816 passed between them. Reusing the existing runner gives
the version probe the same bounded retries and the same probe/infra failure
labeling; behavior on a version mismatch or nonzero exit is unchanged.
This commit is contained in:
fred
2026-08-26 19:26:11 -05:00
parent 2a30c68b84
commit 9a3041b21a
@@ -75,7 +75,7 @@ def run_pi_registry_command(
runner=subprocess.run, runner=subprocess.run,
sleeper=time.sleep, sleeper=time.sleep,
) -> subprocess.CompletedProcess[str]: ) -> 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): for attempt in range(1, PI_PROBE_ATTEMPTS + 1):
try: try:
@@ -106,13 +106,7 @@ def probe_pi_registry() -> list[dict[str, object]]:
if pi is None: if pi is None:
raise AssertionError("installed Pi runtime is required for Invariant R") raise AssertionError("installed Pi runtime is required for Invariant R")
version = subprocess.run( version = run_pi_registry_command([pi, "--version"], dict(os.environ))
[pi, "--version"],
check=False,
capture_output=True,
text=True,
timeout=10,
)
if version.returncode != 0: if version.returncode != 0:
raise AssertionError(f"Pi version probe failed: {version.stderr.strip()}") raise AssertionError(f"Pi version probe failed: {version.stderr.strip()}")
if version.stdout.strip() != PI_VERSION: if version.stdout.strip() != PI_VERSION: