Skip to content

fix: the vector store catches up with a PyPI that deleted its pin - #216

Merged
vicenteliu merged 1 commit into
mainfrom
fix/lancedb-migration
Sep 1, 2026
Merged

fix: the vector store catches up with a PyPI that deleted its pin#216
vicenteliu merged 1 commit into
mainfrom
fix/lancedb-migration

Conversation

@vicenteliu

Copy link
Copy Markdown
Owner

Closes #215.

What

lancedb 0.5.x no longer exists on PyPI, so every fresh install (CI, Docker builder stage, new clones) failed at dependency resolution before running anything. This migrates the vector store to lancedb 0.38.

  • pyproject.toml: lancedb >= 0.38, < 0.39; uv.lock regenerated — pylance and the other 0.5-era transitive deps (ratelimiter, retry, semver) drop out.
  • lance_store.py, the only lancedb touchpoint:
    • .metric().distance_type() (renamed upstream);
    • table_names()list_tables().tables (deprecation);
    • _detect_embedding_model no longer goes through to_lance() — modern lancedb doesn't ship pylance, and a search().select().limit(1) scan does the same single-row single-column read with no extra dependency;
    • METRIC typed as Literal["cosine"] + two narrow type: ignores where lancedb's new stubs lag its runtime.

Behaviour note

Filtered ann_search (namespace/classification) now prefilters — 0.5 postfiltered by default, which could return fewer than top_k hits. New semantics are strictly better for retrieval quality; unfiltered searches are unchanged.

Verification

  • Full suite: 1374 passed (3 deselected: slow/ollama); mypy clean over 154 files; ruff clean.
  • On-disk compat: a real dataset written by lancedb 0.5.7 (20 rows, 768-dim, nomic-embed) opens, projection-scans, and cosine-searches correctly under 0.38 — existing ~/.opspilot KBs need no re-ingest.
  • CI on this PR is the end-to-end proof the resolver failure is gone.

PR #213 is red for this same root cause; once this merges, updating that branch from main should turn it green.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KXrF6HMB12V1hC9xFtooDE

lancedb 0.5.x vanished from PyPI (#215), so every fresh install — CI,
Docker builds, new clones — died at the resolver. Migrate to 0.38:

- pyproject: lancedb >= 0.38, < 0.39; uv.lock regenerated (pylance and
  the other 0.5-era transitive deps drop out).
- .metric() → .distance_type(), table_names() → list_tables().tables.
- _detect_embedding_model drops to_lance(): modern lancedb no longer
  ships pylance, and a select+limit scan does the same single-row,
  single-column read without the extra dependency.
- METRIC becomes Literal["cosine"] and two stub gaps get narrow ignores
  now that lancedb ships type annotations.

Behaviour note: filtered ann_search now prefilters (0.5 postfiltered),
so a namespace/classification search returns a full top_k from the
filtered set instead of sometimes fewer.

Verified: 1374 tests green, mypy/ruff clean, and a 0.5.7-written
dataset (20 rows, 768-dim) opens, scans, and searches under 0.38 —
existing local KBs need no re-ingest.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KXrF6HMB12V1hC9xFtooDE
@vicenteliu
vicenteliu merged commit 03377d2 into main Sep 1, 2026
4 checks passed
@vicenteliu
vicenteliu deleted the fix/lancedb-migration branch September 1, 2026 10:00
vicenteliu added a commit that referenced this pull request Sep 1, 2026
The header said `docker run --rm opspilot:latest opspilot --version`,
which predates the `opspilot` ENTRYPOINT — copied verbatim it errors
with "No such command 'opspilot'". Found while verifying the image
builds and runs against lancedb 0.38 (the last untested surface of
#215/#216: build succeeds, --version runs, and an in-image
merge_insert + cosine-search roundtrip passes).


Claude-Session: https://claude.ai/code/session_01KXrF6HMB12V1hC9xFtooDE

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.

CI is red repo-wide: lancedb 0.5.x vanished from PyPI

1 participant