Skip to content

Pin usearch for the document upload harness, and guard its CI-only RAG imports - #16284

Merged
danielhanchen merged 1 commit into
mainfrom
dh/rag-upload-harness-usearch
Oct 31, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
dh/rag-upload-harness-usearch

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Document upload compatibility (Uploads (macos-latest), Uploads (windows-latest)) has failed on every RAG PR since #16145, for example #16280 now:

ERROR collecting studio/backend/tests/test_rag_vec_ann.py
studio/backend/tests/test_rag_vec_ann.py:13: in <module>
    import usearch  # noqa: F401
E   ModuleNotFoundError: No module named 'usearch'
ERROR collecting studio/backend/tests/test_rag_vec_cache_ann.py

The workflow's run history: perf/rag-hnsw-tier (#16145 itself), perf/r14-chat-search, dh/fix-engine-port-blocks-past-40-workers and perf/r14-rag-ingest all failed there, while the flows-* branches it ran on passed.

Why

#16145 pinned usearch==2.26.6 in studio/backend/requirements/studio.txt and the studio extra. Under CI, its ANN tests import usearch unconditionally, by design: a missing wheel where studio.txt was installed is a packaging failure, not a skip. tests/studio/rag_upload_ci.py runs every studio/backend/tests/test_rag_*.py, but in a venv built only from its own pinned tests/studio/rag_upload_requirements.txt, and that list never got usearch. The tests are right. The harness's requirements fell behind.

Change

  • Pin usearch==2.26.6 in tests/studio/rag_upload_requirements.txt, matching studio.txt.
  • New tests/studio/test_rag_upload_requirements_cover_ci_imports.py. It reads each test_rag_*.py for imports made only under a CI check, and requires each module to be pinned in rag_upload_requirements.txt at the same version as studio.txt. It has a control that the scan finds today's usearch import, so the reader cannot pass by seeing nothing.

Verification

  • The new tests pass.
  • Sabotage: dropping the usearch pin fails with ['test_rag_vec_ann.py: usearch', 'test_rag_vec_cache_ann.py: usearch']. Pinning 2.26.5 fails with usearch: upload 2.26.5 vs studio.txt 2.26.6.
  • The workflow's path filter includes tests/studio/rag_upload*, so Document upload compatibility runs on this PR on macOS and Windows. That run is the end-to-end check.

…G imports

#16145 added the HNSW tier and pinned usearch in studio.txt; its ANN tests import usearch unconditionally
under CI. rag_upload_ci.py runs every test_rag_*.py in a venv built only from rag_upload_requirements.txt,
which had no usearch, so the Uploads (macos/windows) jobs fail collection on every RAG PR. Pin it at
studio.txt's version, and add a test that reads the test_rag_*.py files for imports made only under CI
and requires each to be pinned there at the same version.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-31T11:23:28.088511Z 5dc8266 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 5dc8266a3f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant