From 031bfb52401041de0a8f0e31e07840ebc7793b75 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Wed, 11 Nov 2026 08:39:05 +0000 Subject: [PATCH 1/2] fix: never reuse a pip-cached arcticpy wheel across runner images arcticpy ships only an sdist, so install_arcticpy.sh builds the wheel on the runner and it links that machine's libgsl by soname. smoke-tests.yml caches ~/.cache/pip with no image identity in the key, so after GitHub moved ubuntu-24.04 (libgsl.so.27) to ubuntu-26.04 (libgsl.so.28) pip restored the old wheel and `import arcticpy` failed (autocti_workspace run 42883685928). Install arcticpy with --no-cache-dir so it is always built against the GSL actually present (~12-15 s per job: the uncached build in arcticpy-action self-test run 32780221181 took 12 s). The other installs keep the cache. A regression test pins the flag on the real script. Fixes #330. Corrective-PR exception for Heart RED reason "autocti_workspace: Smoke Tests failure on main". Co-Authored-By: Claude Opus 5.5 --- .../install-arcticpy/install_arcticpy.sh | 10 +++++++++- tests/test_smoke.py | 20 +++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/.github/actions/install-arcticpy/install_arcticpy.sh b/.github/actions/install-arcticpy/install_arcticpy.sh index d29451d9..f3c3b196 100755 --- a/.github/actions/install-arcticpy/install_arcticpy.sh +++ b/.github/actions/install-arcticpy/install_arcticpy.sh @@ -136,8 +136,16 @@ echo "==> Installing arcticpy runtime dependencies" "$PYTHON" -m pip install scipy matplotlib echo "==> Building and installing arcticpy ${ARCTICPY_VERSION}" +# --no-cache-dir: the wheel built here links the MACHINE's libgsl by soname, so +# a copy cached in ~/.cache/pip is only valid on the image that built it. CI +# caches that directory across runs (smoke-tests.yml) with no image identity in +# the key; when GitHub moved ubuntu-24.04 (libgsl.so.27) -> ubuntu-26.04 +# (libgsl.so.28) pip restored the old wheel and `import arcticpy` failed with +# "libgsl.so.27: cannot open shared object file" (PyAutoHeart#330). Always +# building fresh costs ~15 s and makes a system-library change impossible to +# mask. Only this install opts out: the others are image-independent wheels. "$PYTHON" -m pip install "arcticpy==${ARCTICPY_VERSION}" \ - --no-build-isolation --no-deps + --no-build-isolation --no-deps --no-cache-dir echo "==> Verifying arcticpy imports" # Assert here rather than letting a broken build surface much later as a diff --git a/tests/test_smoke.py b/tests/test_smoke.py index 31068279..30dca7c3 100644 --- a/tests/test_smoke.py +++ b/tests/test_smoke.py @@ -573,6 +573,26 @@ def test_shipped_arcticpy_installer_exists_and_is_the_only_pin(): assert 'ARCTICPY_VERSION="${ARCTICPY_VERSION:-' in body +def test_arcticpy_build_never_reuses_a_pip_cached_wheel(): + """The arcticpy install must bypass pip's cache (PyAutoHeart#330). + + The wheel is built on the machine and links its libgsl by soname, so a copy + cached on one runner image fails to import on the next: the 2026-11 move + from ubuntu-24.04 (libgsl.so.27) to ubuntu-26.04 (libgsl.so.28) turned + autocti_workspace smoke red through exactly that restored wheel. + """ + body = smoke.ARCTICPY_INSTALLER.read_text() + # Join backslash continuations so the check sees the whole pip command. + logical = body.replace("\\\n", " ") + installs = [ + line + for line in logical.splitlines() + if "pip install" in line and '"arcticpy==' in line + ] + assert len(installs) == 1, installs + assert "--no-cache-dir" in installs[0].split() + + def _run_installer(tmp_path, prefixes: str) -> subprocess.CompletedProcess[str]: """Run the shared recipe far enough to exercise the GSL probe. From 5b11b0b9f205f9a1f96290a54175e10659916364 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Wed, 11 Nov 2026 08:50:15 +0000 Subject: [PATCH 2/2] test: keep tenant repo names out of the arcticpy cache regression docstring The organ-code tenant firewall rejects workspace repo names in new organ files; describe the incident generically. Co-Authored-By: Claude Opus 5.5 --- tests/test_smoke.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_smoke.py b/tests/test_smoke.py index 30dca7c3..1e12d46c 100644 --- a/tests/test_smoke.py +++ b/tests/test_smoke.py @@ -579,7 +579,7 @@ def test_arcticpy_build_never_reuses_a_pip_cached_wheel(): The wheel is built on the machine and links its libgsl by soname, so a copy cached on one runner image fails to import on the next: the 2026-11 move from ubuntu-24.04 (libgsl.so.27) to ubuntu-26.04 (libgsl.so.28) turned - autocti_workspace smoke red through exactly that restored wheel. + the CTI workspace smoke red through exactly that restored wheel. """ body = smoke.ARCTICPY_INSTALLER.read_text() # Join backslash continuations so the check sees the whole pip command.