Skip to content

Split storage of binary graph into different database - #26

Merged
hungpham10 merged 2 commits into
mainfrom
feature/split-storage-of-binary-graph-into-different-database
Sep 12, 2026
Merged

Split storage of binary graph into different database#26
hungpham10 merged 2 commits into
mainfrom
feature/split-storage-of-binary-graph-into-different-database

Conversation

@hungpham10

Copy link
Copy Markdown
Owner

No description provided.

@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: d3faa2d9-09b2-4590-b79e-1e9597f29a3e


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov-commenter

codecov-commenter commented Sep 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 76.73077% with 242 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.00%. Comparing base (58b0794) to head (a479f9e).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
crates/codegraph-mcp/src/tools.rs 0.00% 130 Missing ⚠️
crates/codegraph-extract/src/bingraph.rs 92.12% 52 Missing ⚠️
crates/codegraph-extract/src/config.rs 15.62% 27 Missing ⚠️
crates/codegraph-extract/src/orchestrator.rs 34.78% 15 Missing ⚠️
crates/codegraph-mcp/src/lib.rs 0.00% 8 Missing ⚠️
crates/codegraph-binary/src/extract.rs 97.23% 5 Missing ⚠️
crates/codegraph-graph/src/lib.rs 16.66% 5 Missing ⚠️

❌ Your patch status has failed because the patch coverage (76.73%) is below the target coverage (100.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #26      +/-   ##
==========================================
+ Coverage   73.76%   74.00%   +0.23%     
==========================================
  Files          85       86       +1     
  Lines       17649    18672    +1023     
==========================================
+ Hits        13019    13818     +799     
- Misses       4630     4854     +224     

☔ 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.

@hungpham10
hungpham10 merged commit 16a7734 into main Sep 12, 2026
18 of 19 checks passed
@hungpham10
hungpham10 deleted the feature/split-storage-of-binary-graph-into-different-database branch September 12, 2026 03:42
@codspeed-hq

codspeed-hq Bot commented Sep 12, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 28 untouched benchmarks


Comparing feature/split-storage-of-binary-graph-into-different-database (0f00897) with main (58b0794)

Open in CodSpeed

hungpham10 added a commit that referenced this pull request Sep 12, 2026
#31)

* Fix binary callees/callers/flow always empty: route id >= bin_base to BinaryGraph (#26 regression)

After the storage split, binary symbols live only in binary.sqlite (id range
bin_base = 2e9) while codegraph_callees/callers/flow still queried the main
GraphIndex, so every binary returned empty results. Now those tools route to
BinaryGraph when the node id falls in the binary range, with a fallback to the
old path if the binary DB is unavailable.

- BinaryGraph: add callees (call records resolved by name within the same
  binary), callers (BFS over a new caller_of:{name} reverse index built at
  ingest) and flow (chain render with CFG markers + call sites, same shape as
  GraphIndex::flow).
- Ingest: stop corrupting chain entries — CFG markers (id < SYMBOL_BASE) and
  unresolved-call placeholders (0) are kept as-is; only real symbol ids are
  remapped into the bin_base range.
- MCP: dispatch_binary_graph routes callees/callers/impact/flow for binary ids.
- Config template: document the [bingraph] section (enabled/bin_base/storage)
  with a warning against overlapping id ranges.
- Docs: binary-analysis.md updated for the split-storage architecture.
- Tests: bingraph unit tests extended + end-to-end test compiling a real
  shared library and running it through r2 extraction and queries.

* style: apply rustfmt
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.

2 participants