From bd91cd1e8adf0957581f4112250c5508f9f875b6 Mon Sep 17 00:00:00 2001 From: ruv Date: Sun, 24 May 2026 12:30:01 -0400 Subject: [PATCH] fix(adr-117/p5): smoke-test must cd out of repo root before importing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Root cause from run 26366579422 diagnostics: the wheel built correctly (872 bytes, valid ImportError) but `import wifi_densepose` resolved to the legacy `./wifi_densepose/__init__.py` left in the repo root from v1, NOT to the freshly-installed tombstone wheel in the smoke venv. Python places the cwd at sys.path[0] for `python -c "..."`, so running the import from the repo root made the legacy directory win over site-packages every time. The "isolated venv" was not the problem — the cwd was. Fix: copy the wheel to /tmp, cd /tmp before the import. Now the smoke test runs in a directory that contains no `wifi_densepose/` so the only resolution path is the venv's site-packages. The repo-root `./wifi_densepose/__init__.py` is a separate concern (legacy v1 carry-over) that should be cleaned up in a follow-up commit, but the smoke test should not depend on it being absent. Co-Authored-By: claude-flow --- .github/workflows/pip-release.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pip-release.yml b/.github/workflows/pip-release.yml index 4fb6f65b..6e44e442 100644 --- a/.github/workflows/pip-release.yml +++ b/.github/workflows/pip-release.yml @@ -179,12 +179,18 @@ jobs: - name: Smoke-test tombstone in isolated venv run: | set -e + # Copy the wheel to /tmp BEFORE entering the venv — we must + # cd OUT of the repo root because the repo contains a + # `wifi_densepose/` directory left over from the legacy v1 + # source. Python puts cwd at sys.path[0], so an import from + # the repo root would resolve to the legacy directory and + # bypass the freshly-installed wheel entirely (this was the + # silent failure mode of the previous two run attempts). + cp tombstone-dist/wifi_densepose-1.99.0-py3-none-any.whl /tmp/ python -m venv /tmp/smoke-venv /tmp/smoke-venv/bin/python -m pip install --upgrade pip - /tmp/smoke-venv/bin/python -m pip install tombstone-dist/wifi_densepose-1.99.0-py3-none-any.whl - # Show where wifi_densepose actually resolved + that the file - # the venv would import is the tombstone, NOT something else - # on the path. + /tmp/smoke-venv/bin/python -m pip install /tmp/wifi_densepose-1.99.0-py3-none-any.whl + cd /tmp # away from the repo root's stray wifi_densepose/ /tmp/smoke-venv/bin/python -c "import importlib.util as u; s = u.find_spec('wifi_densepose'); print('Resolved to:', s.origin); print('--- file content ---'); print(open(s.origin).read())" set +e /tmp/smoke-venv/bin/python -c "import wifi_densepose" 2> import-output.txt