Skip to content

[MOD-14958] Cover quant training caps and concurrent transition queries - #1052

Open
dor-forer wants to merge 1 commit into
mainfrom
dor-mod14958-quant-training-coverage
Open

dor-forer wants to merge 1 commit into
mainfrom
dor-mod14958-quant-training-coverage

Conversation

@dor-forer

@dor-forer dor-forer commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

Describe the changes in the pull request

Cover the VecSim training gaps identified in the final review of #1029:

  • Test the effective training threshold immediately below, at, and above the cap, including twice the cap.
  • Expand the concurrent transition test to FLOAT32/FLOAT16, single/multi-label indexes, L2/IP/cosine, and asynchronous/write-in-place modes.
  • Use existing hooks to require complete query passes before finalization, after finalization, and while a migrated vector is still present in both tiers. Check KNN, range, and batch results for missing or duplicate labels and non-finite scores while readers continue across the transitions.

The related default-size training and L2 mutation-score integration tests are in RediSearch #11330.

Which issues this PR fixes

MOD-14958 test coverage follow-up. Based on main after #1050 merged.

Main objects this PR modified

  • tests/unit/test_hnsw_tiered.cpp: threshold boundaries and the typed concurrency matrix.
  • tests/unit/test_hnsw_sq8.cpp: remove the original single-configuration concurrency test now covered by the matrix.

Validation

Debug build on dorer-intel with SVS enabled; formatting and independent review passed.

  • All 8 focused typed tests passed.
  • All 24 concurrency combinations passed 20 repetitions.
  • 160 tiered SQ8 tests and 144 SQ8 tests passed. Four existing serialization tests required a rerun with the harness's ROOT environment variable set.

Mark if applicable

  • This PR introduces API changes
  • This PR introduces serialization changes

Note

Low Risk
Test-only changes with no production code, API, or serialization impact.

Overview
Strengthens tiered SQ8 unit coverage by moving concurrency testing into the typed tiered suite and adding quantization training threshold boundary checks.

test_hnsw_tiered.cpp adds TrainingThresholdIsCapped, which asserts the effective normalization/training set size is min(requested, MAX_QUANT_NORMALIZATION_SET_SIZE) for L2, IP, and cosine. It replaces the old single-scenario test with ConcurrentQueriesDuringNormalizationTransition, a typed matrix over float32/float16, single/multi-label, L2/IP/cosine, and async vs in-place writes. That test pauses at before/after quantization finalization and first backend insert before flat removal, runs concurrent TopK, range, and batch queries (plus index introspection APIs), and asserts OK replies with unique labels and finite scores through all three transition phases.

test_hnsw_sq8.cpp drops the duplicate ConcurrentQueriesDuringNormalizationTransition test that only covered one float32 L2 configuration.

Reviewed by Cursor Bugbot for commit cabcf46. Bugbot is set up for automated code reviews on this repo. Configure here.

@codecov

codecov Bot commented Sep 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.54%. Comparing base (b1f01bf) to head (cabcf46).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1052   +/-   ##
=======================================
  Coverage   97.54%   97.54%           
=======================================
  Files         141      141           
  Lines        9011     9011           
=======================================
  Hits         8790     8790           
  Misses        221      221           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant