vector: select pinned KaHIP placement for structured embeddings - #4029
Conversation
|
Warning Review limit reached
Next review available in: 43 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe benchmark adds a bounded offline KaHIP 3.25 adapter for graph partition stages. The adapter validates inputs and outputs, runs deterministic ECO partitioning, and returns partition metadata and metrics. Tests and the specification cover configuration, integrity, and comparison results. ChangesOffline KaHIP partitioning
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Benchmark as treedb_vector_partition_bench
participant Adapter as treedb_kahip_partition.py
participant KaHIP
Benchmark->>Benchmark: Build bounded graph request
Benchmark->>Adapter: Invoke with timeout and JSON limits
Adapter->>KaHIP: Run seeded ECO partitioning
KaHIP-->>Adapter: Return partition assignment
Adapter-->>Benchmark: Return assignment, metadata, and metrics
Benchmark->>Benchmark: Validate and persist artifact
Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/treedb_kahip_partition.py`:
- Line 11: In scripts/treedb_kahip_partition.py, remove Ruff E701/E702 compound
statements by placing each statement on its own line, including the
open/json.load statement and the additional flagged ranges. Preserve the
existing execution order and behavior while formatting all affected blocks as
separate statements.
- Around line 9-10: Enforce the documented KaHIP wheel identity, not only
version 3.25: in scripts/treedb_kahip_partition.py lines 9-10, validate the
installed distribution identity and include it in artifact metadata; in
cmd/treedb_vector_partition_bench/main_test.go lines 1531-1559, require the
documented Python interpreter and identity and add rejection coverage for
another KaHIP 3.25 installation; in TreeDB/docs/spec/vector-partition-m2.md
lines 78-84, restrict execution to that wheel or document all accepted
identities.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: cd6cdc6d-874e-47cc-9679-72a47d5b19da
📒 Files selected for processing (4)
TreeDB/docs/spec/vector-partition-m2.mdcmd/treedb_vector_partition_bench/main.gocmd/treedb_vector_partition_bench/main_test.goscripts/treedb_kahip_partition.py
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 06154a7762
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review @coderabbitai review |
|
✅ Action performedReview finished.
|
|
@codex review @coderabbitai review |
|
✅ Action performedReview finished.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 40d23c6819
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
@codex review @coderabbitai review |
|
✅ Action performedReview finished.
|
|
@codex review |
1 similar comment
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3f585c4ad7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
Final merge evidenceExact head:
Merge gate satisfied without waiver. |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Closes #4024
Scope
Adds the smallest offline-only KaHIP 3.25 adapter through the existing exact-request external JSON seam. The selector is limited to graph primary materialization in partition and M3 build stages; no overlap policy, routing, or online dependency changes.
Evidence
Retained 100k structured embedding-mixture graph
5a095727ed0f82815643daddb47bd11a08c9630ede6f9b1d7e7ec427dc8e9937:KaHIP artifact:
/mnt/fast4tb/gomap-4024-placement/out-kahip-head-4f4a293/vector_partition_022359b1aedf_ffd419418529_3dba078aad70.json, SHA-256022359b1aedfa738cde7f2e82e01263c855eb72075b1f2a927d3a5753d6fde9c. Build: 79.289s. Report SHA-256d11be251f48a054a272fb5eea9bbc741295662ff68ff13647f730f26fa258caa. p1/p2/p4/p8/p16 are all 1.0; truth is diagnostic only.kahip==3.25, MIT, pinned RECORD SHA-2567ff011253147286fcebc9185573662bf31dbcfbab1944f9b4940032f49ea5217; source wheel SHA-256e6ea76524e9fc01b27e6f5c5f00b7eec71c94cbd1e84678ce2a14d64dfc9eda4. The bundled CLI is deliberately unused.Validation
TREEDB_KAHIP_PYTHON=/mnt/fast4tb/gomap-4024-kahip-3.25/bin/python go test ./cmd/treedb_vector_partition_bench -run 'TestKaHIP' -count=1go test ./TreeDB/internal/vectorpartition ./TreeDB/vectorpartitionExisting external JSON seam coverage supplies cancellation, deadline, malformed-output, and input/output-cap failure checks. The prior macOS Root failure was unrelated:
TreeDB/db TestOrderedRootSpanNativeValueLogLeavesCheckpointReopenAndGCfailed withValueLogGC: treedb: recoverable root set changed; this PR does not touch TreeDB/db, and sibling Root shards passed.Risks
Offline-only experimental structured-embedding placement. Invocation requires explicit pinned Python and adapter-script paths. The 16M directed-edge envelope is V1 canonical (1M vectors x degree 16), not the broader builder reservation. High-entropy qualification is separate #4030.
Summary by CodeRabbit
New Features
Documentation
Tests