Skip to content

Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.

ci: add cuVS post-merge regression guards (#3065)

Yuanqing ZHAO4d92cd875e47
diff --git a/.github/workflows/_build.yml b/.github/workflows/_build.yml
index a30dcfa0a..d80b9962a 100644
--- a/.github/workflows/_build.yml
+++ b/.github/workflows/_build.yml
@@ -303,6 +303,7 @@ jobs:
cd "$RUNNER_TEMP"
"$PYTHON_BIN" - <<'PY'
+ import importlib
import importlib.util
from importlib.resources import files
@@ -322,12 +323,37 @@ jobs:
if backend_spec is None or backend_spec.origin is None:
raise SystemExit(f"backend module {module_name} was not installed")
+ backend = importlib.import_module(module_name)
+ required_filter_symbols = (
+ "_index_engine_set_filter_layout",
+ "_index_engine_evaluate_filter",
+ )
+ missing_filter_symbols = [
+ symbol for symbol in required_filter_symbols if not hasattr(backend, symbol)
+ ]
+ if missing_filter_symbols:
+ raise SystemExit(
+ f"backend module {module_name} is missing filter ABI symbols: "
+ f"{', '.join(missing_filter_symbols)}"
+ )
+
+ required_filter_methods = ("set_filter_layout", "evaluate_filter")
+ missing_filter_methods = [
+ method for method in required_filter_methods if not hasattr(engine.IndexEngine, method)
+ ]
+ if missing_filter_methods:
+ raise SystemExit(
+ "IndexEngine is missing filter methods: "
+ f"{', '.join(missing_filter_methods)}"
+ )
+
studio_index = files("openviking").joinpath("web_studio/dist/index.html")
if not studio_index.is_file():
raise SystemExit("Web Studio index.html was not installed")
print(f"Imported backend module {module_name}")
print(f"Backend module origin {backend_spec.origin}")
+ print(f"Validated filter ABI symbols {required_filter_symbols}")
print(f"Bundled Web Studio index {studio_index}")
PY
diff --git a/.github/workflows/_test_lite.yml b/.github/workflows/_test_lite.yml
index 8a0fae72a..918c755aa 100644
--- a/.github/workflows/_test_lite.yml
+++ b/.github/workflows/_test_lite.yml
@@ -81,6 +81,13 @@ jobs:
- name: Build C++ extensions
run: uv run python setup.py build_ext --inplace
+ - name: Run cuVS CPU-only regression tests
+ run: |
+ uv run pytest -q -o addopts='' \
+ tests/vectordb/test_cuvs_config.py \
+ tests/vectordb/test_cuvs_index.py \
+ tests/vectordb/test_cuvs_collection.py
+
- name: Run Lite Integration Test (Quick Start)
shell: bash
run: |
diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml
index 79e064e9a..8e30b9601 100644
--- a/.github/workflows/pr.yml
+++ b/.github/workflows/pr.yml
@@ -53,6 +53,7 @@ jobs:
runs-on: ubuntu-24.04
outputs:
deps_changed: ${{ steps.check.outputs.deps_changed }}
+ cuvs_changed: ${{ steps.check.outputs.cuvs_changed }}
steps:
- uses: actions/checkout@v6
with:
@@ -78,7 +79,29 @@ jobs:
echo "deps_changed=false" >> $GITHUB_OUTPUT
fi
+ # Run the CPU-only cuVS regression suite when the optional backend,
+ # its native filter bridge, or its focused tests are modified.
+ CUVS_PATTERN="openviking/storage/vectordb/|openviking/storage/vectordb_adapters/(factory|local_adapter)\.py|openviking_cli/utils/config/vectordb_config\.py|src/|tests/(vectordb/test_cuvs_|benchmark/test_cuvs_)|benchmark/cuvs/|examples/cuvs_smoke\.py|\.github/workflows/_test_lite\.yml"
+ CUVS_CHANGED_FILES=$(git diff --name-only origin/${{ github.base_ref }} HEAD | grep -E "$CUVS_PATTERN" || true)
+
+ if [ -n "$CUVS_CHANGED_FILES" ]; then
+ echo "cuVS-related changes detected:"
+ echo "$CUVS_CHANGED_FILES"
+ echo "cuvs_changed=true" >> $GITHUB_OUTPUT
+ else
+ echo "No cuVS-related changes detected."
+ echo "cuvs_changed=false" >> $GITHUB_OUTPUT
+ fi
+
build:
needs: check-deps
if: ${{ needs.check-deps.outputs.deps_changed == 'true' }}
uses: ./.github/workflows/_build.yml
+
+ cuvs-tests:
+ needs: check-deps
+ if: ${{ needs.check-deps.outputs.cuvs_changed == 'true' }}
+ uses: ./.github/workflows/_test_lite.yml
+ with:
+ os_json: '["ubuntu-24.04"]'
+ python_json: '["3.11"]'