Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dependency and review baseline
Depends on #107; please keep this PR as a draft until that dependency is merged.
This branch starts at #107's head,
907072dfefd9b075ecfeea3377665c5688a0fa4f, and adds one cosine/inner-product extension commit,fb87cda.mainalso includes its IVF-PQ L2 range-search commit. That parent implementation is not a new implementation in this extension.mainto leave only the metric extension in the PR diff.Summary
Existing L2 and top-K behavior, the storage format and C/JNI APIs remain unchanged. No original-vector reranking or top-K fallback is introduced.
Validation
Run locally on macOS/AArch64:
cargo test --offline --locked --workspace: 656 passed, 2 ignored.cargo test --offline --locked --release --workspace -- --test-threads=1: 656 passed, 2 ignored. This serializes the test harness, not the explicit 1/4-worker Rayon pools exercised by the tests.cargo clippy --offline --locked --workspace --all-targets -- -D warnings: passed.cargo fmt --all -- --checkandgit diff --check: passed.optimize_for_searchinvariance. Streaming crosses the production 8 MiB LUT cache budget for PQ8; PQ4 scratch fallback is covered separately with a forced budget.Local independent read-only agent reviews of shared semantics/Flat/SQ/RQ and the PQ extension found no remaining in-scope blockers. Maintainer review and hosted CI are still pending.
Known validation limitation
Default-concurrent Release test runs intermittently fail unchanged top-K tests that assert work was observed on multiple Rayon workers. A clean archive of #107, compiled into a separate target directory, reproduced the same category of IVF-Flat worker-count assertion failure. Isolated tests and the complete serialized Release test harness pass. This is not a claim that default-concurrent Release is consistently green.
The expanded SQ range parallelism test uses a bounded worker handshake to avoid that scheduling race in its own coverage; unrelated top-K tests are not changed here.
Rollback / follow-up
No data migration or format change is involved. Reverting only the extension commit leaves #107's L2 implementation intact. Before marking ready: merge #107, update this branch onto
main, and inspect hosted CI and maintainer feedback.