You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(qdrant): relocate multivector normalization guard, close review round 2
A second review round found the round-1 normalization guard (in
create_multivector_collection) was reachable only through Engine::configure,
which --skip-upload skips entirely -- so a cosine (or omitted-distance)
multivector dataset run with --skip-upload against an out-of-band-loaded
collection would bypass the guard and publish a wrong recall number: exactly
the silent-wrong-result bug the guard was added to prevent, just reachable
through a different, first-class entry point.
Fix, per 9-way agent consensus: extract the check into a new
Dataset::ensure_multivector_normalized(), called from both
read_multivector_data and read_multivector_queries -- the two functions
every entry point (configure/upload, search, ground-truth profiling, and
skip-upload) actually funnels through -- with the Qdrant-side call kept as a
fail-fast belt-and-braces on the one path that does call configure. Also
fixed the error message, which falsely claimed a declared distance even when
none was given (distance() defaults to "cosine" silently).
Also addressed, from the same round:
- Two "overflow" unit tests asserted bare is_err() but actually tripped a
different guard than their name claimed (verified by hand); renamed and
reasserted on the real error message.
- Added a hand-written byte-literal test pinning the .mvec on-disk format
(mirroring sparse_reader's CSR fixture), since every existing test
round-tripped through the same writer+reader and couldn't catch a
coherent endianness/block-order bug.
- Added unit tests for the relocated guard (cosine/angular/omitted all
reject, dot passes) and a live --skip-upload integration test that
reproduces the reviewer's exact scenario end-to-end.
- README: documented that only dot/euclid are accepted for multivector
datasets, since cosine/angular/omitted (the common case) now hard-error.
Deferred (documented, not filed as issues per agent consensus -- filing on
a real org repo needs an explicit human go-ahead): a magic-bytes/version
word for the still-unshipped .mvec format, and the three items already
deferred from round 1.
Verified live against Qdrant v1.18.2: full 29-test integration suite green.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
0 commit comments