Repository navigation
fix(hgraph): isolate INT8 analyzer assertions on 1.0 - #3102
Conversation
Backport the observer gate from antgroup#3095 and verify construction does not record analyzer queries. Signed-off-by: Xiangyu Wang <wxy407827@antgroup.com> Assisted-by: Codex:GPT-6
There was a problem hiding this comment.
🟢 Approval recommended
The test-only gate isolates worker threads from assertions and counter writes while retaining serial analyzer coverage.
0 open findings
What changed in this PR
Backports the INT8 analyzer test observer gate to 1.0, addressing #3096 without changing production behavior.
Changes:
- Bypasses assertions and counter updates during parallel MCI construction.
- Verifies construction records zero observed queries, then enables the existing serial analyzer checks.
| File | Description |
|---|---|
| src/algorithm/hgraph/hgraph_mci_test.cpp | Gates observation until build completion while preserving INT8 validation. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
LHT129
left a comment
There was a problem hiding this comment.
This is a clean, minimal fix that correctly isolates Catch2 assertions and the unsynchronized queries counter from parallel MCI build workers. The inspect_queries gate (default false) ensures KnnSearch bypasses the analyzer checks during Build(), and the regression assertion REQUIRE(index.queries == 0) confirms no analyzer queries leaked through during construction.
Changes are limited to the test file only — no production, API, or ABI impact. The approach is consistent with the main-branch fix in #3095.
No issues found.
What changed
Fixes: #3096
Backport the observer gate from LightWant's main-branch PR #3095 to
1.0. Parallel MCI construction calls the INT8 analyzer test'sKnnSearchoverride, which previously ran Catch2 assertions and incremented an unsynchronized counter from worker threads. Enable observation only afterBuild()has joined its workers. Add a regression assertion that construction records zero analyzer queries; retain all typed-buffer, original-byte and 12-query analyzer checks.This fixes the failure in Coverage run 38848325242, attempt 1: Catch2 3.7.1 aborts in
OutputRedirect::deactivate(redirect is not active) duringHGraph analyzer sends only typed INT8 query buffers, seed2602903384. The unit report contains 7 passed / 1 failed; all four functional partitions succeeded. Coverage collection was skipped. This is independent of the allocation-exception issue #3054 and the PiPNN backports #3093/#3098.Validation
make covand incremental patched build passed: Linux x86_64, GCC 11.4.0, Debug, coverage ON, ASan OFF as in this Coverage job, system OpenBLAS, Ninja, at most six compile jobs. Dependencies were rebuilt from source archives; no other revision's binaries were reused."HGraph analyzer sends only typed INT8 query buffers" -d yes -a --order rand --rng-seed 2602903384 -o <report>.HGraph companion MCI incrementally adds INT8 vectorspassed (10 assertions).git diff --checkpassed.The preceding Coverage run at
e1ee3928passed the same test; the failing test, MCI path and runner are unchanged across the SINDI-only delta to97c33699. The successful job does not preserve its seed. All local attempts, commands, stderr, source/binary hashes and upstream logs are retained in the task run directory.Full local unit/functional suites, sanitizer suites, full lint and the coverage percentage gate were not rerun. No coverage percentage is claimed. Local execution is Linux x86_64, not native macOS ARM.
Scope and risk
One test file only; no production/API/ABI changes or user-facing documentation changes. Low risk: observation begins after build workers join, while the serial analyzer assertions remain active. No tests, sanitizers, lint rules or coverage thresholds are disabled or lowered.