test: add coverage tests for rabitq_split, mmap_io, warp, and c_api#2148
Conversation
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🟢 Require kind labelWonderful, this rule succeeded.
🟢 Require version labelWonderful, this rule succeeded.
|
There was a problem hiding this comment.
Code Review
This pull request adds comprehensive unit and functional tests for several components, including RaBitQSplitDataCell, MMapIO, the VSAG C API, and Warp IP with multiple dimensions. The review feedback highlights several critical issues in the newly added tests: a potential robustness issue where the C API silently returns success on null handles, a test section that fails to call the method it is supposed to test (ComputePairVectors), ignored return values for Decode and Read operations, and potential undefined behavior due to an unchecked stat system call. Addressing these issues will significantly improve the reliability and correctness of the test suite.
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.
460421b to
7a52013
Compare
Cover previously untested paths to improve main branch coverage toward 90%: - RaBitQSplitDataCell: InsertVector, UpdateVector, Serialize/Deserialize, Encode/Decode, Resize, ShrinkToFit, Move, ExportModel, MergeOther, QueryWithDistanceFilter, IP metric instantiation - MMapIO: directory path error, resize shrink, MultiRead, existing file - Warp: multiple dimensions with IP metric - vsag_c_api: null handles, invalid inputs, update failures, serialize edges Signed-off-by: LHT129 <tianlan.lht@antgroup.com>
7a52013 to
618856c
Compare
Summary
Addresses the main branch coverage gap (currently 87.92%, target 90%). Focuses on the highest-miss files identified via Codecov: rabitq_split_datacell.h (231 miss), warp.cpp (107 miss), mmap_io.cpp (43 miss), vsag_c_api.cpp (91 miss).
Test plan
🤖 Generated with Claude Code