Compatibility Check Tool (check_compatibility)
check_compatibility verifies whether the current VSAG build can load and search index files
created by older VSAG versions. It is mainly used in CI to catch serialization and backward
compatibility regressions.
Build
Using the project Makefile, enable tools with VSAG_ENABLE_TOOLS=ON; the underlying
CMake options are ENABLE_TOOLS=ON and ENABLE_CXX11_ABI=ON:
VSAG_ENABLE_TOOLS=ON make release
# Output: ./build-release/tools/check_compatibility/check_compatibility
When invoking CMake directly, pass both options explicitly:
cmake -S . -B build-release -DCMAKE_BUILD_TYPE=Release \
-DENABLE_TOOLS=ON -DENABLE_CXX11_ABI=ON
cmake --build build-release -j
Inputs
The command accepts one positional identifier in the form <tag>_<algo_name>, for example
v1.0.0_hnsw. For that identifier, the tool expects these files under /tmp/:
| File | Purpose |
|---|---|
/tmp/<tag>_<algo_name>.index | Serialized index produced by the older VSAG version |
/tmp/<tag>_<algo_name>_build.json | Build parameters used for that index |
/tmp/<tag>_<algo_name>_search.json | Search parameters used for the sanity check |
/tmp/random_512d_10K.bin | Test vectors used by the search verification |
These files are usually generated by compatibility fixtures from previous releases.
Usage
./build-release/tools/check_compatibility/check_compatibility v1.0.0_hnsw
The tool creates a current-version index instance, deserializes the old index file, then runs a
small KNN search. It prints <identifier> success when both load and search succeed; otherwise it
prints <identifier> failed and exits with a non-zero status.
Local Entry Point
A short local pointer is kept at tools/check_compatibility/README.md for developers browsing the
tool directory.