chore(ci): dump site-packages state before A0 build verify

Diagnostic step in the Dockerfile builder: list site-packages/headroom/
contents, run pip show -f on both headroom-core-py and headroom-ai,
print sys.path and headroom.__path__ before the import-verify. Lets us
see exactly what's on disk when A0's build-time verify keeps failing
in PR #350 CI. Will be removed once the wheel install order issue is
diagnosed.
This commit is contained in:
chopratejas 2026-05-02 20:07:34 -07:00
parent ce3b2f0b0b
commit 28a4883421

View file

@ -100,6 +100,22 @@ RUN --mount=type=cache,target=/root/.cache/uv \
# inside the build image. If this fails, the runtime image would fail # inside the build image. If this fails, the runtime image would fail
# its lifespan smoke test on every restart — better to break the build # its lifespan smoke test on every restart — better to break the build
# loudly here than ship a broken image. # loudly here than ship a broken image.
#
# Diagnostic preamble (kept around so future build-time regressions are
# self-documenting): list site-packages/headroom/, pip-show both the
# wheel package and the source package, and grep their RECORDs for
# _core.so ownership. Adds <100ms; logs are invaluable on failure.
RUN echo "=== site-packages/headroom/ contents ===" && \
ls -la "$(python -c 'import site; print(site.getsitepackages()[0])')/headroom" 2>&1 || true && \
echo "=== pip show headroom-core-py ===" && \
python -m pip show -f headroom-core-py 2>&1 | head -40 || true && \
echo "=== pip show headroom-ai ===" && \
python -m pip show -f headroom-ai 2>&1 | head -40 || true && \
echo "=== sys.path ===" && \
python -c "import sys; [print(' ', p) for p in sys.path]" && \
echo "=== importing headroom ===" && \
python -c "import headroom; print('headroom.__file__ =', headroom.__file__); print('headroom.__path__ =', list(headroom.__path__))"
RUN python -c "from headroom._core import hello; \ RUN python -c "from headroom._core import hello; \
marker = hello(); \ marker = hello(); \
assert marker == 'headroom-core', f'expected headroom-core, got {marker!r}'; \ assert marker == 'headroom-core', f'expected headroom-core, got {marker!r}'; \