fix: HGraph dirty-vector search returns fewer results than top-k - #2734
fix: HGraph dirty-vector search returns fewer results than top-k#2734vsag-bot wants to merge 2 commits into
Conversation
Signed-off-by: vsag-bot <276218163+vsag-bot@users.noreply.github.com> Assisted-by: Codex:codex-default
|
/label status/waiting-for-review |
|
AI PR state: Automatic merging is disabled. A maintainer performs the final merge. |
Merge Protections🟢 Merge protection satisfied — ready to merge. Show 1 satisfied protection🟢 Require linked issue for feature/bug PRs
|
|
AI PR CI recovery
Fixed the ParallelSearcher worker lifetime race reported by ASan. Reasoning: |
Signed-off-by: vsag-bot <276218163+vsag-bot@users.noreply.github.com> Assisted-by: Codex:gpt-5.6-sol
Codecov Report❌ Patch coverage is @@ Coverage Diff @@
## 0.18 #2734 +/- ##
==========================================
- Coverage 91.39% 91.30% -0.10%
==========================================
Files 331 332 +1
Lines 19714 19733 +19
==========================================
- Hits 18018 18017 -1
- Misses 1696 1716 +20
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Summary
HGraph search now traverses NaN/Inf bridge nodes deterministically while excluding NaN distances from results, preventing incomplete top-k responses.
Root Cause
Non-finite distances were inserted directly into candidate heaps using negation. NaN violates heap ordering and candidate admission comparisons, causing traversal to stop before enough finite neighbors were collected.
Changes
Validation
cmake --build build-ai-fix --target unittests functests --parallel 4: passed - Debug unit and functional test binaries built successfully.build-ai-fix/tests/unittests '*Searcher traverses through a non-finite-distance bridge' --reporter compact: passed - 12 assertions passed across both focused regressions; the BasicSearcher regression failed before the fix.build-ai-fix/tests/unittests '[ut][BasicSearcher]' --reporter compact && build-ai-fix/tests/unittests '[ut][ParallelSearcher]' --reporter compact: passed - 243422 assertions passed across the relevant searcher suites.for run in 1 2 3 4 5; do build-ai-fix/tests/functests '(PR) HGraph Search with Dirty Vector' --reporter compact --rng-seed "$run"; done: passed - All five runs passed with 283 assertions each.git diff --check: passed - No whitespace errors found.Residual Risks
Base branch:
0.18Fixes #2732
Prepared by
vsag-botafter automatic effort ordering and AI repairability preflight.