Skip to content

[Backport 1.0] fix(hgraph): tune from available fp32 codes - #2475

Open
jac0626 wants to merge 2 commits into
antgroup:1.0from
jac0626:codex/backport-2466-to-1.0
Open

[Backport 1.0] fix(hgraph): tune from available fp32 codes#2475
jac0626 wants to merge 2 commits into
antgroup:1.0from
jac0626:codex/backport-2466-to-1.0

Conversation

@jac0626

@jac0626 jac0626 commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

Backport #2466 to the 1.0 branch.

  • Let HGraph Tune select an available lossless source from raw vectors, precise FP32 codes,
    or base FP32 codes instead of relying only on store_raw_vector.
  • Require the selected codes to cover the current internal ID range.
  • Rebuild precise codes whose payload was omitted by ignore_reorder serialization.
  • Keep Tune state publication atomic and add source-selection, serialization, ForceRemove,
    and concurrency regression coverage.

Fixes: #2465

Validation

/opt/homebrew/opt/llvm@15/bin/clang-format --dry-run --Werror \
  src/algorithm/hgraph/hgraph.cpp tests/test_hgraph.cpp
git diff --check upstream/1.0..HEAD

source ~/.zshrc && make test CASE='[tune_codes]' COMPILE_JOBS=6
  All tests passed (8040 assertions in 1 test case)

Compatibility

jac0626 added 2 commits July 20, 2026 14:42
Select raw, precise FP32, or base FP32 codes as the Tune rebuild source,
while allowing no-rebuild transitions without a source.

Signed-off-by: jac0626 <jac0626@users.noreply.github.com>
Assisted-by: Codex:gpt-5
Require Tune sources to cover the current internal ID range and rebuild precise codes whose serialized payload was omitted.

Signed-off-by: jac0626 <jac0626@users.noreply.github.com>
Assisted-by: Codex:gpt-5
@vsag-bot

vsag-bot commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

/label S-waiting-on-review
/waiting-on reviewer
/request-review @jiaweizone
/request-review @wxyucs
/request-review @inabao
/request-review @LHT129

@vsag-bot
vsag-bot self-requested a review July 20, 2026 06:59
@vsag-bot

vsag-bot commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Automated pull request review completed.

Review effort: medium (210 changed lines across 2 files).

No actionable inline findings were found.
Review: #2475 (review)

@jac0626 jac0626 added kind/bug Bug fixes, defects, or unexpected behavior 修复程序错误、缺陷或异常行为 version/1.0 labels Jul 20, 2026

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request refactors HGraph::Tune to improve thread safety, parameter validation, and resource management during index tuning, and adds comprehensive unit tests to verify tuning behavior. The review feedback suggests performing defensive parameter validation at the beginning of the function, casting signed counts to prevent compiler warnings, and refactoring the vector decoding helper to use an RAII scope guard for exception safety and check for decoding failures.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/algorithm/hgraph/hgraph.cpp
Comment thread src/algorithm/hgraph/hgraph.cpp
Comment thread src/algorithm/hgraph/hgraph.cpp
Comment thread src/algorithm/hgraph/hgraph.cpp
@jac0626
jac0626 marked this pull request as ready for review July 20, 2026 07:14

@vsag-bot vsag-bot 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.

Automated inline review completed.

Review effort: medium (210 changed lines across 2 files).
No actionable inline findings were found.

Reviewed commit 0007698.

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/testing size/L version/1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants