[codex] Pin RankQuant subset duplicate contract#167
Conversation
There was a problem hiding this comment.
Code Review
This pull request documents and tests the behavior of subset candidate searches when duplicate or unsorted global row IDs are provided, ensuring they are scored independently and can produce duplicate hits. The feedback suggests tightening an assertion in the full index search fuzz target to require strictly ascending document IDs on equal scores, since full index search document IDs are unique.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
4f035a0 to
e06b4c9
Compare
Signed-off-by: Nelson Spence <nelson@projectnavi.ai>
e06b4c9 to
9019815
Compare
Review Summary by QodoPin RankQuant subset duplicate contract with deterministic tie ordering
WalkthroughsDescription• Enforce deterministic RankQuant subset search ordering by score descending, then row ID ascending • Add center-offset reapplication sort to handle score ties after SIMD offset adjustment • Document duplicate candidate behavior across Rust, Python, C ABI, and Go wrapper interfaces • Add regression tests for duplicate candidate handling in Python, C ABI, and Go bindings Diagramflowchart LR
A["RankQuant subset search"] --> B["Score candidates"]
B --> C["Apply center offset"]
C --> D["Re-sort by score desc, row ID asc"]
D --> E["Return ordered results"]
F["Duplicate candidates"] --> A
F --> G["Each scored independently"]
G --> E
File Changes1. src/quant.rs
|
Code Review by Qodo
1.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9019815077
ℹ️ 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 (@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 (@codex) address that feedback".
925a5d6 to
9db3b36
Compare
Signed-off-by: Nelson Spence <nelson@projectnavi.ai>
9db3b36 to
bc6ef84
Compare
Summary
Review loop
cbindgen 0.29.2, and fixing the exposed-score ordering hole found by the two-stage fuzz target.Validation
cargo test -p ordvec --test determinism_contractcargo check --manifest-path fuzz/Cargo.toml --all-targetsASAN_OPTIONS=detect_leaks=0 LSAN_OPTIONS=detect_leaks=0 cargo +nightly-2025-08-15 fuzz run signbitmap_rankquant_twostage -- -max_total_time=15 -rss_limit_mb=4096/tmp/ordvec-cbindgen-0.29.2/bin/cbindgen ordvec-ffi --config ordvec-ffi/cbindgen.toml --output ordvec-ffi/include/ordvec.h --verifycargo test -p ordvec-ffi full_and_subset_search_rankquantcargo test -p ordvec-fficargo build -p ordvec-ffi --releaseGOCACHE=/tmp/ordvec-gocache GOMODCACHE=/tmp/ordvec-gomodcache go test -count=1 ./...VIRTUAL_ENV=/home/ndspence/GitHub/ordvec/ordvec-python/.venv PATH=/home/ndspence/GitHub/ordvec/ordvec-python/.venv/bin:$PATH maturin develop -m ordvec-python/Cargo.tomlVIRTUAL_ENV=/home/ndspence/GitHub/ordvec/ordvec-python/.venv PATH=/home/ndspence/GitHub/ordvec/ordvec-python/.venv/bin:$PATH python -m pytest ordvec-python/tests/test_rank_quant.pycargo clippy -p ordvec --all-targets -- -D warningscargo clippy -p ordvec-ffi --all-targets -- -D warningscargo fmt --all --checkgit diff --check