Skip to content

fix(hgraph): isolate INT8 analyzer assertions on 1.0 - #3102

Merged
wxyucs merged 1 commit into
antgroup:1.0from
wxyucs:codex/1-0-coverage-failure-20261016t074324z
Oct 16, 2026
Merged

wxyucs merged 1 commit into
antgroup:1.0from
wxyucs:codex/1-0-coverage-failure-20261016t074324z

Conversation

@wxyucs

@wxyucs wxyucs commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

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's KnnSearch override, which previously ran Catch2 assertions and incremented an unsynchronized counter from worker threads. Enable observation only after Build() 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) during HGraph analyzer sends only typed INT8 query buffers, seed 2602903384. 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

  • Clean baseline make cov and 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.
  • Exact CI seed and file-reporter options: "HGraph analyzer sends only typed INT8 query buffers" -d yes -a --order rand --rng-seed 2602903384 -o <report>.
  • Baseline: 20 unrestricted plus 20 two-CPU-affinity repetitions passed. The upstream abort did not reproduce locally; this is a scheduling-dependent race.
  • Patched: 10 two-CPU-affinity repetitions plus one unrestricted run passed, each with 41 assertions. Adjacent HGraph companion MCI incrementally adds INT8 vectors passed (10 assertions).
  • Changed lines pass clang-format 15; git diff --check passed.

The preceding Coverage run at e1ee3928 passed the same test; the failing test, MCI path and runner are unchanged across the SINDI-only delta to 97c33699. 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.

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
@wxyucs wxyucs added kind/bug Bug fixes, defects, or unexpected behavior 修复程序错误、缺陷或异常行为 version/1.0 1. LazyHGraph & SIMQ 2. Unified search API 3. Streaming serialization 1. 新索引 2. 统一检索接口 3. 流式序列化 labels Oct 16, 2026
@pull-request-size pull-request-size Bot added the size/XS 0-9 changed lines label Oct 16, 2026
Copilot AI balanced review requested due to automatic review settings October 16, 2026 08:14
@mergify mergify Bot added the module/index Index algorithms and implementations 索引算法与实现 label Oct 16, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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 LHT129 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@wxyucs
wxyucs merged commit d3c75f3 into antgroup:1.0 Oct 16, 2026
19 checks passed
@wxyucs
wxyucs deleted the codex/1-0-coverage-failure-20261016t074324z branch October 16, 2026 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Bug fixes, defects, or unexpected behavior 修复程序错误、缺陷或异常行为 module/index Index algorithms and implementations 索引算法与实现 size/XS 0-9 changed lines version/1.0 1. LazyHGraph & SIMQ 2. Unified search API 3. Streaming serialization 1. 新索引 2. 统一检索接口 3. 流式序列化

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants