Skip to content

Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.

ci: copy built _core.so into source tree so sharded tests import it

Tejas Chopra322d02efad27
diff --git a/.github/workflows/ci-fast.yml b/.github/workflows/ci-fast.yml
index 32bf0071b..ac80073fb 100644
--- a/.github/workflows/ci-fast.yml
+++ b/.github/workflows/ci-fast.yml
@@ -130,11 +130,17 @@ jobs:
- name: Install (CPU torch + prebuilt wheel + dev deps, no cargo rebuild)
run: |
python -m pip install --upgrade pip
- # Install torch CPU explicitly first so the editable/extra resolve reuses it.
+ # Install torch CPU explicitly first so the extra-resolve reuses it.
pip install torch --index-url https://download.pytorch.org/whl/cpu
WHEEL="$(ls dist/*.whl)"
- pip install "${WHEEL}[dev]"
- pip install pytest-split
+ pip install "${WHEEL}[dev]" pytest-split
+ # The tests run against the repo's ./headroom source tree (they import
+ # headroom AND read source files), and cwd shadows the installed wheel's
+ # package — so the compiled extension from site-packages is invisible.
+ # Copy the built _core.*.so into the source tree so imports resolve,
+ # without a second cargo build.
+ SITE="$(python -c 'import sysconfig; print(sysconfig.get_path("platlib"))')"
+ cp "${SITE}/headroom/"_core*.so headroom/
python -c "from headroom._core import DiffCompressor; print('headroom._core OK')"
- name: Pre-fetch embedding model (resilient to HF rate limits)