From 9a3041b21a9961e293d0d4c64012c52c0aba8839 Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 26 Aug 2026 19:26:11 -0500 Subject: [PATCH] fix(mosaic): route the Invariant R pi version probe through the bounded-retry runner 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. --- .../mosaic/src/lease-broker/invariant_r_unittest.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/packages/mosaic/src/lease-broker/invariant_r_unittest.py b/packages/mosaic/src/lease-broker/invariant_r_unittest.py index c673dd2f..4c3907fb 100644 --- a/packages/mosaic/src/lease-broker/invariant_r_unittest.py +++ b/packages/mosaic/src/lease-broker/invariant_r_unittest.py @@ -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: