feat(arigraph): D-GR-1 DocGraphQuery + D-GR-3b PPR/Leiden/BM25 + G0 harness#716
Conversation
…arness Ship the buildable, ungated graphrag deliverables (plan graphrag-doc-retrieval-soa-integration-v1 §5). All pure / reversible / no-write-path capabilities land ahead of G0 exactly as D-GR-3a (#714); the D-GR-2 retrieval wiring stays gated on the G0 real-corpus verdict. D-GR-1 (contract, zero-dep): - doc_graph::{DocGraphQuery, ScoredId} - rung-aware document-graph read surface with a provided retrieve(seeds, RungLevel, top_k) default carrying the rung->walk dispatch (0-1 ranking / 2 SPO-G hop / 3+ wider community-scoped walk); the D-GR-2 design (OsintRetriever <-> #708 RungElevator) lives in the module-doc. 9 tests. D-GR-3b (lance-graph core, AriGraph): - arigraph::ppr - TripletGraph::personalized_pagerank (HippoRAG spread, confidence-weighted, deterministic, unit-sum). 6 tests. - arigraph::community - Leiden refine_connected (splits internally- disconnected Louvain communities into connected components). +2 tests. - arigraph::bm25 - Okapi BM25 lexical leg (Bm25Index, k1=1.2/b=0.75). 5 tests. G0: - examples/g0_graph_loadbearing.rs - the P-GRAPH-LOADBEARING harness: vector-only (BM25) vs vector+PPR+community over a synthetic multi-hop fixture, prints the with-vs-without delta. Scaffold, not the verdict - the real KILL/PASS needs a labeled corpus + jc::reliability. Plan sharpened per operator (§3a/§3b): (a) the cosine-replacement distance ALREADY EXISTS (certified bgz-tensor::fisher_z::{FamilyGamma, Base17Fz} rho>=0.999, clean-room helix) - wire it, retire the blasgraph popcount dead-code; do not rebuild. (b) part_of:is_a category = Leiden community = episodic-witness basin - one concept; P-COMMUNITY-BASIN-AGREE tests the identity. Verified: lance-graph 945 lib + 18 D-GR module tests; lance-graph-contract 10 tests; clippy -D warnings clean on new files; fmt clean. Board: EPIPHANIES E-GRAPHRAG-DGR3B-1, STATUS_BOARD graphrag section, LATEST_STATE contract inventory, AGENT_LOG, plan v1.2. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016b33swuXE23hKtqxsHu9p1
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_5ed8ec80-8e82-428c-8a19-8889b408c235) |
|
Warning Review limit reached
Next review available in: 13 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: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (12)
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 |
What
Ships the buildable, ungated deliverables of the graphrag-doc-retrieval plan (
graphrag-doc-retrieval-soa-integration-v1§5), on fresh main after #714 (D-GR-3a). Everything here is pure / reversible / no-write-path, so it lands ahead of the G0 gate exactly as D-GR-3a did; the D-GR-2 retrieval wiring stays gated on the G0 real-corpus verdict.D-GR-1 —
lance-graph-contract(zero-dep)doc_graph::{DocGraphQuery, ScoredId}— a rung-aware document-graph read surface.DocGraphQueryexposescommunity_of/community_ids/community_members/neighbours/similar_by_ranking, plus a providedretrieve(seeds, RungLevel, top_k)default carrying the rung→walk dispatch (0–1 ranking / 2 SPO-G hop / 3+ wider community-scoped walk) so both readers agree on the mapping by construction; the statefulRungElevatorstays out of the contract.ScoredId {id, score, depth}. The D-GR-2 design (AriGraphOsintRetriever↔ the P3: wire the rung ascent loop + dedup RungLevel (D-TRI-6) #708RungElevator) lives in the module-doc. 9 tests.D-GR-3b —
lance-graphcore (AriGraph)arigraph::ppr—TripletGraph::personalized_pagerank(seeds, damping, iters), HippoRAG spread-activation over the confidence-weighted fact graph; deterministic, unit-sum, dangling-mass redistribution. 6 tests.arigraph::community— Leiden connectivity refinement (refine_connected): splits any internally-disconnected Louvain community into its connected components (Leiden's guarantee over plain Louvain), deterministic BFS over intra-community edges.labelsis now the refined coarsest partition;levels.last()is the raw Louvain. +2 tests (5 existing stay green).arigraph::bm25— Okapi BM25 lexical leg (Bm25Index, k1=1.2/b=0.75), the rung-0/1 baseline beside CAM-PQ ranking. 5 tests.G0 — the gate's measurement harness
examples/g0_graph_loadbearing.rs— P-GRAPH-LOADBEARING: vector-only (BM25) vs vector+PPR+community over a synthetic multi-hop fixture where the gold answer is lexically absent from the query but graph-reachable from the seed. It prints the with-vs-without delta (turbines: vector-only rank 8/8 @ 0.0 vs graph rank 6 @ 0.146) and deliberately does not assert a PASS/FAIL — the real KILL/PASS verdict needs a labeled corpus +jc::reliability.cargo run -p lance-graph --example g0_graph_loadbearing.Plan sharpenings (operator, folded into §3a/§3b)
arctanhcosine-replacement already exists, certified:bgz-tensor::fisher_z::{FamilyGamma, Base17Fz}(ρ≥0.999) + clean-roomhelix. The stacked-6×256 distance retires theblasgraphhamming_*/popcount_*dead-code. This is a wiring deliverable (route the certified primitive into the graph/PPR path), P-PQ-RANK-gated — not a new kernel.part_of:is_acategory ≡ Leiden community ≡ episodic-witness basin — one concept. "Part of" presupposes a category to be part of; that category IS the community = the basin = the HHTL family identity. Community detection is constitutive of the is_a category.P-COMMUNITY-BASIN-AGREEtests this as an identity (agreement → 1.0), the disagreements being the discovered bridges / revision candidates.Verification
cargo test -p lance-graph --lib→ 945 lib + 18 D-GR module tests, 0 failed.cargo test -p lance-graph-contract→ 10 tests, 0 failed.cargo clippy -D warningsclean on all new files (the 8 pre-existing warnings are unrelatedblasgraph/ndarray_bridge.rsSIMD dead-code).cargo fmtclean.Board
EPIPHANIES
E-GRAPHRAG-DGR3B-1; STATUS_BOARD graphrag section; LATEST_STATE contract inventory; AGENT_LOG; plan v1.2.Not in this PR (gated / deferred)
🤖 Generated with Claude Code
https://claude.ai/code/session_016b33swuXE23hKtqxsHu9p1
Generated by Claude Code