Skip to content

feat(graph-rag): add LightRAG extraction parity - #30

Merged
kl3inIT merged 2 commits into
light-ragfrom
kl3inIT/light-rag-pr05-extraction-parity
Jul 23, 2026
Merged

kl3inIT merged 2 commits into
light-ragfrom
kl3inIT/light-rag-pr05-extraction-parity

Conversation

@kl3inIT

@kl3inIT kl3inIT commented Jul 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • port LightRAG v1.5.4 extraction prompt, continuation/gleaning, token guards, section context, deterministic correction merge and profiling into the pure-Java core
  • keep entity/relation semantics evidence-scoped, add permission-scoped merge and iterative description summarization, and persist extraction/profile/weight data in PostgreSQL
  • enrich entity/relation embeddings, preserve bounded virtual-thread extraction and atomic publication, and add ACL/type-drift/multi-chunk/migration coverage

Architecture

  • canonical entities contain only organization-scoped normalized identity
  • canonical relations contain only endpoints and orientation
  • type, description, keywords, confidence, support weight and extraction identity remain on evidence contributions
  • Spring AI performs model effects/parsing; core owns LightRAG semantics

Verification

  • ./gradlew.bat --no-daemon compileJava compileTestJava
  • focused core, testkit, Spring AI, worker, PostgreSQL and AGE tests
  • ./gradlew.bat --no-daemon check

Integration flow

This PR targets light-rag. It must not merge directly into main.

Summary by CodeRabbit

  • New Features

    • Added configurable entity guidance, extraction examples, gleaning rounds, token limits, and section context.
    • Improved graph extraction with deterministic entity and relationship handling, relation weights, and richer diagnostics.
    • Added permission-scoped graph views with evidence filtering and change fingerprints.
    • Added iterative, token-aware description summarization.
    • Added support for chunk headings and enhanced search metadata.
  • Bug Fixes

    • Improved extraction failure reporting and ensured relation evidence remains correctly associated with its source content.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@kl3inIT, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 14 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: f71ade41-886a-4469-b98a-decede75af43

📥 Commits

Reviewing files that changed from the base of the PR and between 8fed184 and 324ce15.

📒 Files selected for processing (20)
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/authorization/PermissionScopedGraphMerger.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/authorization/PermissionScopedGraphView.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/extraction/ExtractionCandidateEntity.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/extraction/ExtractionCandidateRelation.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/extraction/ExtractionRoundRequest.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/ExtractionProfile.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/summarization/DescriptionSummaryRequest.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/summarization/IterativeDescriptionSummarizer.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/summarization/ScopedDescriptionSet.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/validation/TextValidation.java
  • components/graph-rag-core/src/test/java/com/orgmemory/graphrag/authorization/PermissionScopedGraphMergerTests.java
  • components/graph-rag-core/src/test/java/com/orgmemory/graphrag/model/ExtractionProfileTests.java
  • components/graph-rag-core/src/test/java/com/orgmemory/graphrag/summarization/IterativeDescriptionSummarizerTests.java
  • components/graph-rag-testkit/src/main/java/com/orgmemory/graphrag/testkit/InMemoryGraphProjection.java
  • core/src/main/resources/db/migration/V32__evidence_scoped_graph_semantics.sql
  • core/src/main/resources/db/migration/V32__evidence_scoped_graph_semantics.sql.conf
  • integrations/graph-rag-postgres/src/test/java/com/orgmemory/graphrag/postgres/PostgresGraphProjectionStoreIntegrationTests.java
  • integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiDescriptionSummaryModel.java
  • integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiExtractionModel.java
  • integrations/graph-rag-spring-ai/src/test/java/com/orgmemory/integrations/graphrag/springai/SpringAiEntityRelationExtractorTests.java
📝 Walkthrough

Walkthrough

This PR adds LightRAG-based multi-round extraction, permission-scoped graph views and summarization, contribution-level types and weights, updated PostgreSQL/AGE persistence, and worker indexing diagnostics, configuration, and evidence-aware embeddings.

Changes

Graph extraction and summarization

Layer / File(s) Summary
LightRAG extraction flow
components/graph-rag-core/..., integrations/graph-rag-spring-ai/...
Adds validated extraction contracts, prompt rendering, gleaning, deterministic candidate merging, Spring AI model integration, and iterative description summarization.
Permission-scoped graph
components/graph-rag-core/src/main/java/com/orgmemory/graphrag/authorization/*
Filters contributions by authorized evidence, aggregates visible graph data, and computes authorization and projection fingerprints.

Contribution persistence and indexing

Layer / File(s) Summary
Contribution identity and persistence
components/graph-rag-core/..., core/src/main/resources/db/migration/*, integrations/graph-rag-postgres/..., components/graph-rag-testkit/...
Separates canonical identity from contribution types, adds provenance fingerprints and relation weights, and updates SQL, AGE projection, search, and fixtures.
Worker indexing integration
apps/worker/..., core/src/main/java/com/orgmemory/core/knowledge/*
Passes new extraction settings, records diagnostics, classifies failures, preserves chunk headings, and embeds relation context from matching evidence chunks.

Estimated code review effort: 5 (Critical) | ~120 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Worker
  participant SpringAiEntityRelationExtractor
  participant SpringAiExtractionModel
  participant GraphContributionAssembler
  participant PostgresGraphProjectionStore
  Worker->>SpringAiEntityRelationExtractor: submit ExtractionRequest
  SpringAiEntityRelationExtractor->>SpringAiExtractionModel: execute extraction rounds
  SpringAiExtractionModel-->>SpringAiEntityRelationExtractor: return candidate entities and relations
  SpringAiEntityRelationExtractor-->>Worker: return ExtractionResult with diagnostics
  Worker->>GraphContributionAssembler: assemble evidence contributions
  GraphContributionAssembler->>PostgresGraphProjectionStore: persist canonical entities and contributions
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding LightRAG extraction parity to the graph-rag stack.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch kl3inIT/light-rag-pr05-extraction-parity

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 10

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
integrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresGraphProjectionStore.java (1)

1387-1398: 🚀 Performance & Scalability | 🟡 Minor | ⚡ Quick win

Batch-size estimate omits the search_content column.

search_content (inserted at column 14 via relationSearchContent(contribution), lines 1417-1418) concatenates type + description + keywords — fields already counted in the estimator — but the estimator itself doesn't add search_content's length. This underestimates actual row payload by roughly the size of those three fields again, risking batches larger than maxBatchPayloadBytes intends.

🛠️ Proposed fix
         BoundedBatcher.forEachBatch(
                 contributions,
                 options.maxBatchRecords(),
                 options.maxBatchPayloadBytes(),
                 contribution -> 448L
                         + utf8Bytes(contribution.type())
                         + utf8Bytes(contribution.description())
                         + contribution.keywords().stream()
                                 .mapToLong(PostgresGraphProjectionStore::utf8Bytes)
-                                .sum(),
+                                .sum()
+                        + utf8Bytes(relationSearchContent(contribution)),
                 batch -> insertRelationContributionBatch(sql, batch));
🤖 Prompt for 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.

In
`@integrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresGraphProjectionStore.java`
around lines 1387 - 1398, Update the BoundedBatcher size estimator in the
relation contribution batching flow to include the UTF-8 byte length of the
derived search_content value produced by relationSearchContent(contribution), in
addition to the existing fields and overhead. Reuse the existing
relationSearchContent and utf8Bytes symbols so the estimate matches the value
inserted by insertRelationContributionBatch.
🤖 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
`@components/graph-rag-core/src/main/java/com/orgmemory/graphrag/authorization/PermissionScopedGraphView.java`:
- Around line 92-100: Update RelationView construction to receive the resolved
source and target CanonicalEntity.normalizedName values from the shared
contribution snapshots, then change summaryInput() to compose the subject name
from those entity names instead of relation.sourceEntityId() and
relation.targetEntityId().

In
`@components/graph-rag-core/src/main/java/com/orgmemory/graphrag/extraction/ExtractionCandidateEntity.java`:
- Around line 20-26: Duplicate requireText helpers should be centralized into
one shared graph-rag-core text-validation utility, preserving null rejection,
stripping, blank rejection, and IllegalArgumentException behavior. Replace the
local helpers with calls to that utility in
components/graph-rag-core/src/main/java/com/orgmemory/graphrag/extraction/ExtractionCandidateEntity.java:20-26,
ExtractionCandidateRelation.java:35-41, ExtractionRoundRequest.java:28-34,
authorization/PermissionScopedGraphView.java:109-115,
summarization/ScopedDescriptionSet.java:32-38,
summarization/DescriptionSummaryRequest.java:36-42,
integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiExtractionModel.java:140-146,
and SpringAiDescriptionSummaryModel.java:69-75; remove each duplicated private
requireText implementation and update imports as needed.

In
`@components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/ExtractionProfile.java`:
- Around line 114-128: Update ExtractionProfile.fingerprint() to add a literal
field-boundary marker immediately before iterating entityTypeGuidance, matching
the existing examples marker. Keep the entityTypeGuidance values and subsequent
examples hashing order unchanged so the fingerprint distinguishes list
boundaries.

In
`@components/graph-rag-core/src/main/java/com/orgmemory/graphrag/summarization/IterativeDescriptionSummarizer.java`:
- Around line 45-75: Ensure every invocation in IterativeDescriptionSummarizer
stays within options.contextTokenLimit(): before the current.size() <= 2 fast
path calls invoke, validate or reduce the combined input, and update groups(...)
so singleton fragments are not appended to an oversized group. Handle individual
fragments larger than the limit by rejecting or safely splitting them before any
invoke(scopedDescriptions, ...) call, while preserving singleton content without
model invocation when appropriate.

In
`@core/src/main/resources/db/migration/V32__evidence_scoped_graph_semantics.sql`:
- Line 54: Update the extraction_profile_fingerprint columns in the migration to
use text with a CHECK constraint enforcing the 64-character fingerprint length,
replacing char(64) while preserving the NOT NULL requirement. Apply the same
change to both occurrences in the migration.
- Line 20: Update the affected index drop/create statements in migrations V32,
V33–V34, V36, V50–V51, V76, V89–V90, and V92 to use concurrent index operations.
Split these operations into non-transactional Flyway migrations or otherwise
configure the relevant migrations with executeInTransaction = false, ensuring no
CONCURRENTLY statement runs inside a transaction.
- Around line 26-31: Replace the generated STORED search_vector columns in
migration V32, including the additional occurrences noted in the comment, with a
non-blocking rollout: add each column as nullable, backfill existing rows in
batches, and maintain future values with a trigger, or compute them at read
time. Avoid any ADD COLUMN ... GENERATED ALWAYS ... STORED definition that
forces a full-table rewrite under an exclusive lock.
- Line 14: Update migration V32’s constraint changes to avoid immediate
full-table scans and blocking locks: remove the affected ALTER COLUMN ... SET
NOT NULL statements, add equivalent CHECK constraints with NOT VALID for the
non-null/non-blank guarantees, then validate each constraint separately with
VALIDATE CONSTRAINT. Apply this consistently to the referenced constraint
locations while preserving their existing validation semantics.

In
`@integrations/graph-rag-postgres/src/test/java/com/orgmemory/graphrag/postgres/PostgresGraphProjectionStoreIntegrationTests.java`:
- Around line 151-155: Update
InMemoryGraphProjection.loadVisibleRelationWeights() to aggregate each visible
contribution using contribution.weight() rather than
contribution.provenance().confidence(). Preserve the existing visibility
filtering and relation grouping so its results match
PostgresGraphProjectionStore.

In
`@integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiExtractionModel.java`:
- Line 62: Update extract() and its item-mapping helpers mapEntity, mapRelation,
and requireConfidence so null elements, missing confidence values, and
converter.convert failures are caught and surfaced as GraphExtractionException
rather than raw NullPointerException. Preserve the existing domain exception
behavior and include the original failure as the cause where supported.

---

Outside diff comments:
In
`@integrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresGraphProjectionStore.java`:
- Around line 1387-1398: Update the BoundedBatcher size estimator in the
relation contribution batching flow to include the UTF-8 byte length of the
derived search_content value produced by relationSearchContent(contribution), in
addition to the existing fields and overhead. Reuse the existing
relationSearchContent and utf8Bytes symbols so the estimate matches the value
inserted by insertRelationContributionBatch.
🪄 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: e9b91a6a-41f7-4827-8a74-f456469c9ff1

📥 Commits

Reviewing files that changed from the base of the PR and between b51d707 and 8fed184.

⛔ Files ignored due to path filters (3)
  • docs/increments/active/2026-07-23-full-lightrag-semantic-port/design.md is excluded by !docs/**
  • docs/increments/active/2026-07-23-full-lightrag-semantic-port/plan.md is excluded by !docs/**
  • docs/research/lightrag-v1.5.4-parity-manifest.md is excluded by !docs/**
📒 Files selected for processing (52)
  • apps/worker/src/main/java/com/orgmemory/worker/graph/GraphIndexingProcessor.java
  • apps/worker/src/main/java/com/orgmemory/worker/graph/GraphIndexingProperties.java
  • apps/worker/src/main/resources/application.yml
  • apps/worker/src/test/java/com/orgmemory/worker/graph/GraphIndexingProcessorTests.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/authorization/PermissionScopedGraphMerger.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/authorization/PermissionScopedGraphView.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/extraction/ExtractionCandidateEntity.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/extraction/ExtractionCandidateRelation.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/extraction/ExtractionConversationMessage.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/extraction/ExtractionRoundRequest.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/extraction/ExtractionRoundResponse.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/extraction/LightRagEntityRelationExtractor.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/extraction/LightRagExtractionPrompt.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/indexing/GraphContributionAssembler.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/CanonicalEntity.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/CanonicalRelation.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/EntityContribution.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/EvidenceProvenance.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/ExtractedRelation.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/ExtractionDiagnostics.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/ExtractionProfile.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/ExtractionRequest.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/ExtractionResult.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/ExtractionRoundMetrics.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/RelationContribution.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/port/DescriptionSummaryModel.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/port/ExtractionModel.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/summarization/DescriptionSummaryOptions.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/summarization/DescriptionSummaryRequest.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/summarization/DescriptionSummaryResult.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/summarization/IterativeDescriptionSummarizer.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/summarization/ScopedDescriptionSet.java
  • components/graph-rag-core/src/test/java/com/orgmemory/graphrag/authorization/PermissionScopedGraphMergerTests.java
  • components/graph-rag-core/src/test/java/com/orgmemory/graphrag/extraction/LightRagEntityRelationExtractorTests.java
  • components/graph-rag-core/src/test/java/com/orgmemory/graphrag/indexing/GraphContributionAssemblerTests.java
  • components/graph-rag-core/src/test/java/com/orgmemory/graphrag/summarization/IterativeDescriptionSummarizerTests.java
  • components/graph-rag-testkit/src/main/java/com/orgmemory/graphrag/testkit/InMemoryGraphProjection.java
  • components/graph-rag-testkit/src/test/java/com/orgmemory/graphrag/testkit/InMemoryGraphProjectionSecurityTests.java
  • core/src/main/java/com/orgmemory/core/knowledge/GraphIndexChunk.java
  • core/src/main/java/com/orgmemory/core/knowledge/KnowledgeChunkProjectionStore.java
  • core/src/main/resources/db/migration/V32__evidence_scoped_graph_semantics.sql
  • integrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/ApacheAgeGraphTopologyProjection.java
  • integrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresGraphProjectionStore.java
  • integrations/graph-rag-postgres/src/test/java/com/orgmemory/graphrag/postgres/ApacheAgeGraphTopologyProjectionIntegrationTests.java
  • integrations/graph-rag-postgres/src/test/java/com/orgmemory/graphrag/postgres/PostgresGraphProjectionStoreIntegrationTests.java
  • integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/GraphExtractionPrompt.java
  • integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiDescriptionSummaryModel.java
  • integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiEntityRelationExtractor.java
  • integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiExtractionModel.java
  • integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/StructuredExtractionResponse.java
  • integrations/graph-rag-spring-ai/src/test/java/com/orgmemory/integrations/graphrag/springai/SpringAiDescriptionSummaryModelTests.java
  • integrations/graph-rag-spring-ai/src/test/java/com/orgmemory/integrations/graphrag/springai/SpringAiEntityRelationExtractorTests.java
💤 Files with no reviewable changes (2)
  • integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/GraphExtractionPrompt.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/CanonicalRelation.java
📜 Review details
⏰ Context from checks skipped due to timeout. (1)
  • GitHub Check: Backend · Java 25
🧰 Additional context used
📓 Path-based instructions (6)
**/*

📄 CodeRabbit inference engine (CLAUDE.md)

**/*: Before changing unfamiliar Spring Boot 4, Spring Modulith 2, Spring AI 2, Gradle, React, Vite, Tailwind, or TypeScript APIs, consult Context7/current official documentation and the project orgmemory-* verification skills.
Read docs/guidelines/agent-safety.md before retrieval, AI, MCP, permission, upload, graph, or export work.
Never commit .env files, provider keys, tokens, or customer data.
Run the relevant gates from docs/guidelines/testing-harness.md; use a terminating clean test as the context gate, and do not treat bootRun as verification.
Current behavior belongs in architecture/specs only after it exists in code; intent belongs in vision, roadmap, or an active increment, and repository state must not be duplicated across documents.

Files:

  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/CanonicalEntity.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/port/DescriptionSummaryModel.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/port/ExtractionModel.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/summarization/DescriptionSummaryResult.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/ExtractionRoundMetrics.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/extraction/ExtractionConversationMessage.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/summarization/DescriptionSummaryOptions.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/extraction/ExtractionCandidateEntity.java
  • integrations/graph-rag-spring-ai/src/test/java/com/orgmemory/integrations/graphrag/springai/SpringAiDescriptionSummaryModelTests.java
  • components/graph-rag-core/src/test/java/com/orgmemory/graphrag/summarization/IterativeDescriptionSummarizerTests.java
  • core/src/main/java/com/orgmemory/core/knowledge/GraphIndexChunk.java
  • apps/worker/src/main/resources/application.yml
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/extraction/ExtractionRoundRequest.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/summarization/DescriptionSummaryRequest.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/EntityContribution.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/extraction/ExtractionRoundResponse.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/extraction/ExtractionCandidateRelation.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/ExtractionDiagnostics.java
  • core/src/main/java/com/orgmemory/core/knowledge/KnowledgeChunkProjectionStore.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/summarization/IterativeDescriptionSummarizer.java
  • integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiDescriptionSummaryModel.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/extraction/LightRagExtractionPrompt.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/summarization/ScopedDescriptionSet.java
  • apps/worker/src/main/java/com/orgmemory/worker/graph/GraphIndexingProperties.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/ExtractedRelation.java
  • integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/StructuredExtractionResponse.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/ExtractionResult.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/ExtractionRequest.java
  • components/graph-rag-testkit/src/main/java/com/orgmemory/graphrag/testkit/InMemoryGraphProjection.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/RelationContribution.java
  • components/graph-rag-core/src/test/java/com/orgmemory/graphrag/indexing/GraphContributionAssemblerTests.java
  • integrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/ApacheAgeGraphTopologyProjection.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/authorization/PermissionScopedGraphView.java
  • core/src/main/resources/db/migration/V32__evidence_scoped_graph_semantics.sql
  • apps/worker/src/test/java/com/orgmemory/worker/graph/GraphIndexingProcessorTests.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/ExtractionProfile.java
  • integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiExtractionModel.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/EvidenceProvenance.java
  • components/graph-rag-core/src/test/java/com/orgmemory/graphrag/extraction/LightRagEntityRelationExtractorTests.java
  • integrations/graph-rag-spring-ai/src/test/java/com/orgmemory/integrations/graphrag/springai/SpringAiEntityRelationExtractorTests.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/authorization/PermissionScopedGraphMerger.java
  • apps/worker/src/main/java/com/orgmemory/worker/graph/GraphIndexingProcessor.java
  • components/graph-rag-core/src/test/java/com/orgmemory/graphrag/authorization/PermissionScopedGraphMergerTests.java
  • components/graph-rag-testkit/src/test/java/com/orgmemory/graphrag/testkit/InMemoryGraphProjectionSecurityTests.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/extraction/LightRagEntityRelationExtractor.java
  • integrations/graph-rag-postgres/src/test/java/com/orgmemory/graphrag/postgres/ApacheAgeGraphTopologyProjectionIntegrationTests.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/indexing/GraphContributionAssembler.java
  • integrations/graph-rag-postgres/src/test/java/com/orgmemory/graphrag/postgres/PostgresGraphProjectionStoreIntegrationTests.java
  • integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiEntityRelationExtractor.java
  • integrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresGraphProjectionStore.java
**/*.{java,sql}

📄 CodeRabbit inference engine (CLAUDE.md)

Pair JPA schema changes with a Flyway migration.

Files:

  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/CanonicalEntity.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/port/DescriptionSummaryModel.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/port/ExtractionModel.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/summarization/DescriptionSummaryResult.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/ExtractionRoundMetrics.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/extraction/ExtractionConversationMessage.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/summarization/DescriptionSummaryOptions.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/extraction/ExtractionCandidateEntity.java
  • integrations/graph-rag-spring-ai/src/test/java/com/orgmemory/integrations/graphrag/springai/SpringAiDescriptionSummaryModelTests.java
  • components/graph-rag-core/src/test/java/com/orgmemory/graphrag/summarization/IterativeDescriptionSummarizerTests.java
  • core/src/main/java/com/orgmemory/core/knowledge/GraphIndexChunk.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/extraction/ExtractionRoundRequest.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/summarization/DescriptionSummaryRequest.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/EntityContribution.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/extraction/ExtractionRoundResponse.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/extraction/ExtractionCandidateRelation.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/ExtractionDiagnostics.java
  • core/src/main/java/com/orgmemory/core/knowledge/KnowledgeChunkProjectionStore.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/summarization/IterativeDescriptionSummarizer.java
  • integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiDescriptionSummaryModel.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/extraction/LightRagExtractionPrompt.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/summarization/ScopedDescriptionSet.java
  • apps/worker/src/main/java/com/orgmemory/worker/graph/GraphIndexingProperties.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/ExtractedRelation.java
  • integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/StructuredExtractionResponse.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/ExtractionResult.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/ExtractionRequest.java
  • components/graph-rag-testkit/src/main/java/com/orgmemory/graphrag/testkit/InMemoryGraphProjection.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/RelationContribution.java
  • components/graph-rag-core/src/test/java/com/orgmemory/graphrag/indexing/GraphContributionAssemblerTests.java
  • integrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/ApacheAgeGraphTopologyProjection.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/authorization/PermissionScopedGraphView.java
  • core/src/main/resources/db/migration/V32__evidence_scoped_graph_semantics.sql
  • apps/worker/src/test/java/com/orgmemory/worker/graph/GraphIndexingProcessorTests.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/ExtractionProfile.java
  • integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiExtractionModel.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/EvidenceProvenance.java
  • components/graph-rag-core/src/test/java/com/orgmemory/graphrag/extraction/LightRagEntityRelationExtractorTests.java
  • integrations/graph-rag-spring-ai/src/test/java/com/orgmemory/integrations/graphrag/springai/SpringAiEntityRelationExtractorTests.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/authorization/PermissionScopedGraphMerger.java
  • apps/worker/src/main/java/com/orgmemory/worker/graph/GraphIndexingProcessor.java
  • components/graph-rag-core/src/test/java/com/orgmemory/graphrag/authorization/PermissionScopedGraphMergerTests.java
  • components/graph-rag-testkit/src/test/java/com/orgmemory/graphrag/testkit/InMemoryGraphProjectionSecurityTests.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/extraction/LightRagEntityRelationExtractor.java
  • integrations/graph-rag-postgres/src/test/java/com/orgmemory/graphrag/postgres/ApacheAgeGraphTopologyProjectionIntegrationTests.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/indexing/GraphContributionAssembler.java
  • integrations/graph-rag-postgres/src/test/java/com/orgmemory/graphrag/postgres/PostgresGraphProjectionStoreIntegrationTests.java
  • integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiEntityRelationExtractor.java
  • integrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresGraphProjectionStore.java
**/*.java

📄 CodeRabbit inference engine (CLAUDE.md)

JetBrains IDE inspection is a Java-backend gate only.

Files:

  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/CanonicalEntity.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/port/DescriptionSummaryModel.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/port/ExtractionModel.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/summarization/DescriptionSummaryResult.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/ExtractionRoundMetrics.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/extraction/ExtractionConversationMessage.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/summarization/DescriptionSummaryOptions.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/extraction/ExtractionCandidateEntity.java
  • integrations/graph-rag-spring-ai/src/test/java/com/orgmemory/integrations/graphrag/springai/SpringAiDescriptionSummaryModelTests.java
  • components/graph-rag-core/src/test/java/com/orgmemory/graphrag/summarization/IterativeDescriptionSummarizerTests.java
  • core/src/main/java/com/orgmemory/core/knowledge/GraphIndexChunk.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/extraction/ExtractionRoundRequest.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/summarization/DescriptionSummaryRequest.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/EntityContribution.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/extraction/ExtractionRoundResponse.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/extraction/ExtractionCandidateRelation.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/ExtractionDiagnostics.java
  • core/src/main/java/com/orgmemory/core/knowledge/KnowledgeChunkProjectionStore.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/summarization/IterativeDescriptionSummarizer.java
  • integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiDescriptionSummaryModel.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/extraction/LightRagExtractionPrompt.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/summarization/ScopedDescriptionSet.java
  • apps/worker/src/main/java/com/orgmemory/worker/graph/GraphIndexingProperties.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/ExtractedRelation.java
  • integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/StructuredExtractionResponse.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/ExtractionResult.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/ExtractionRequest.java
  • components/graph-rag-testkit/src/main/java/com/orgmemory/graphrag/testkit/InMemoryGraphProjection.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/RelationContribution.java
  • components/graph-rag-core/src/test/java/com/orgmemory/graphrag/indexing/GraphContributionAssemblerTests.java
  • integrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/ApacheAgeGraphTopologyProjection.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/authorization/PermissionScopedGraphView.java
  • apps/worker/src/test/java/com/orgmemory/worker/graph/GraphIndexingProcessorTests.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/ExtractionProfile.java
  • integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiExtractionModel.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/EvidenceProvenance.java
  • components/graph-rag-core/src/test/java/com/orgmemory/graphrag/extraction/LightRagEntityRelationExtractorTests.java
  • integrations/graph-rag-spring-ai/src/test/java/com/orgmemory/integrations/graphrag/springai/SpringAiEntityRelationExtractorTests.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/authorization/PermissionScopedGraphMerger.java
  • apps/worker/src/main/java/com/orgmemory/worker/graph/GraphIndexingProcessor.java
  • components/graph-rag-core/src/test/java/com/orgmemory/graphrag/authorization/PermissionScopedGraphMergerTests.java
  • components/graph-rag-testkit/src/test/java/com/orgmemory/graphrag/testkit/InMemoryGraphProjectionSecurityTests.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/extraction/LightRagEntityRelationExtractor.java
  • integrations/graph-rag-postgres/src/test/java/com/orgmemory/graphrag/postgres/ApacheAgeGraphTopologyProjectionIntegrationTests.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/indexing/GraphContributionAssembler.java
  • integrations/graph-rag-postgres/src/test/java/com/orgmemory/graphrag/postgres/PostgresGraphProjectionStoreIntegrationTests.java
  • integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiEntityRelationExtractor.java
  • integrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresGraphProjectionStore.java
core/src/main/java/com/orgmemory/core/{authorization,knowledge,permission}/**/*.java

⚙️ CodeRabbit configuration file

core/src/main/java/com/orgmemory/core/{authorization,knowledge,permission}/**/*.java: Treat PostgreSQL ACL evidence as canonical and OpenFGA as the relationship
authorization decision point. Authorization must fail closed. Filtering
must happen before ranking, LIMIT, graph traversal, answer generation,
export, and citation rendering. Flag metadata or timing leak paths.

Files:

  • core/src/main/java/com/orgmemory/core/knowledge/GraphIndexChunk.java
  • core/src/main/java/com/orgmemory/core/knowledge/KnowledgeChunkProjectionStore.java
**/*.{yml,yaml,properties}

📄 CodeRabbit inference engine (CLAUDE.md)

Keep ddl-auto=validate in application configuration.

Files:

  • apps/worker/src/main/resources/application.yml
core/src/main/resources/db/migration/*.sql

⚙️ CodeRabbit configuration file

core/src/main/resources/db/migration/*.sql: Flyway migrations are immutable after release. Check tenant isolation,
foreign keys, uniqueness, indexes, append-only evidence semantics, safe
defaults, and compatibility with PostgreSQL 18 plus pgvector.

Files:

  • core/src/main/resources/db/migration/V32__evidence_scoped_graph_semantics.sql
🪛 ast-grep (0.44.1)
components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/ExtractionProfile.java

[warning] 155-155: Use a randomly-generated IV
Context: byte[] bytes = value.getBytes(StandardCharsets.UTF_8);
Note: [CWE-329] Generation of Predictable IV with CBC Mode.

(random-iv)

components/graph-rag-core/src/main/java/com/orgmemory/graphrag/authorization/PermissionScopedGraphMerger.java

[warning] 168-168: Use a randomly-generated IV
Context: byte[] bytes = value.getBytes(StandardCharsets.UTF_8);
Note: [CWE-329] Generation of Predictable IV with CBC Mode.

(random-iv)

🪛 SQLFluff (4.2.2)
core/src/main/resources/db/migration/V32__evidence_scoped_graph_semantics.sql

[error] 20-20: DROP statement should use CONCURRENTLY to avoid locking the table.

(PG01)


[error] 33-34: CREATE INDEX should use CONCURRENTLY to avoid locking the table during the build.

(PG01)


[error] 36-36: DROP statement should use CONCURRENTLY to avoid locking the table.

(PG01)


[error] 50-51: CREATE INDEX should use CONCURRENTLY to avoid locking the table during the build.

(PG01)


[error] 76-76: DROP statement should use CONCURRENTLY to avoid locking the table.

(PG01)


[error] 89-90: CREATE INDEX should use CONCURRENTLY to avoid locking the table during the build.

(PG01)


[error] 92-92: DROP statement should use CONCURRENTLY to avoid locking the table.

(PG01)

🪛 Squawk (2.59.0)
core/src/main/resources/db/migration/V32__evidence_scoped_graph_semantics.sql

[warning] 5-5: Changing the size of a varchar field requires an ACCESS EXCLUSIVE lock, that will prevent all reads and writes to the table. Use a TEXT field with a CHECK constraint.

(prefer-text-field)


[warning] 14-14: Setting a column NOT NULL blocks reads while the table is scanned. Make the field nullable and use a CHECK constraint instead.

(adding-not-nullable-field)


[warning] 17-18: By default new constraints require a table scan and block writes to the table while that scan occurs. Use NOT VALID with a later VALIDATE CONSTRAINT call.

(constraint-missing-not-valid)


[warning] 20-20: A normal DROP INDEX acquires an ACCESS EXCLUSIVE lock on the table, blocking other accesses until the index drop can complete. Drop the index CONCURRENTLY.

(require-concurrent-index-deletion)


[warning] 23-23: Dropping a column may break existing clients.

(ban-drop-column)


[warning] 26-31: Adding a generated column requires a table rewrite with an ACCESS EXCLUSIVE lock. In Postgres versions 11+, non-VOLATILE DEFAULTs can be added without a rewrite. Add the column as nullable, backfill existing rows, and add a trigger to update the column on write instead.

(adding-field-with-default)


[warning] 33-34: During normal index creation, table updates are blocked, but reads are still allowed. Use concurrently to avoid blocking writes.

(require-concurrent-index-creation)


[warning] 36-36: A normal DROP INDEX acquires an ACCESS EXCLUSIVE lock on the table, blocking other accesses until the index drop can complete. Drop the index CONCURRENTLY.

(require-concurrent-index-deletion)


[warning] 40-40: Dropping a column may break existing clients.

(ban-drop-column)


[warning] 41-41: Dropping a column may break existing clients.

(ban-drop-column)


[warning] 44-46: Adding a generated column requires a table rewrite with an ACCESS EXCLUSIVE lock. In Postgres versions 11+, non-VOLATILE DEFAULTs can be added without a rewrite. Add the column as nullable, backfill existing rows, and add a trigger to update the column on write instead.

(adding-field-with-default)


[warning] 47-48: By default new constraints require a table scan and block writes to the table while that scan occurs. Use NOT VALID with a later VALIDATE CONSTRAINT call.

(constraint-missing-not-valid)


[warning] 50-51: During normal index creation, table updates are blocked, but reads are still allowed. Use concurrently to avoid blocking writes.

(require-concurrent-index-creation)


[warning] 54-54: Using character is likely a mistake and should almost always be replaced by text or varchar.

(ban-char-field)


[warning] 55-55: Adding a generated column requires a table rewrite with an ACCESS EXCLUSIVE lock. In Postgres versions 11+, non-VOLATILE DEFAULTs can be added without a rewrite. Add the column as nullable, backfill existing rows, and add a trigger to update the column on write instead.

(adding-field-with-default)


[warning] 59-60: By default new constraints require a table scan and block writes to the table while that scan occurs. Use NOT VALID with a later VALIDATE CONSTRAINT call.

(constraint-missing-not-valid)


[warning] 63-63: Changing the size of a varchar field requires an ACCESS EXCLUSIVE lock, that will prevent all reads and writes to the table. Use a TEXT field with a CHECK constraint.

(prefer-text-field)


[warning] 72-72: Setting a column NOT NULL blocks reads while the table is scanned. Make the field nullable and use a CHECK constraint instead.

(adding-not-nullable-field)


[warning] 73-74: By default new constraints require a table scan and block writes to the table while that scan occurs. Use NOT VALID with a later VALIDATE CONSTRAINT call.

(constraint-missing-not-valid)


[warning] 76-76: A normal DROP INDEX acquires an ACCESS EXCLUSIVE lock on the table, blocking other accesses until the index drop can complete. Drop the index CONCURRENTLY.

(require-concurrent-index-deletion)


[warning] 79-79: Dropping a column may break existing clients.

(ban-drop-column)


[warning] 82-87: Adding a generated column requires a table rewrite with an ACCESS EXCLUSIVE lock. In Postgres versions 11+, non-VOLATILE DEFAULTs can be added without a rewrite. Add the column as nullable, backfill existing rows, and add a trigger to update the column on write instead.

(adding-field-with-default)


[warning] 89-90: During normal index creation, table updates are blocked, but reads are still allowed. Use concurrently to avoid blocking writes.

(require-concurrent-index-creation)


[warning] 92-92: A normal DROP INDEX acquires an ACCESS EXCLUSIVE lock on the table, blocking other accesses until the index drop can complete. Drop the index CONCURRENTLY.

(require-concurrent-index-deletion)


[warning] 96-96: Dropping a column may break existing clients.

(ban-drop-column)


[warning] 97-97: Dropping a column may break existing clients.

(ban-drop-column)


[warning] 103-104: By default new constraints require a table scan and block writes to the table while that scan occurs. Use NOT VALID with a later VALIDATE CONSTRAINT call.

(constraint-missing-not-valid)


[warning] 110-110: Using character is likely a mistake and should almost always be replaced by text or varchar.

(ban-char-field)


[warning] 111-111: Adding a generated column requires a table rewrite with an ACCESS EXCLUSIVE lock. In Postgres versions 11+, non-VOLATILE DEFAULTs can be added without a rewrite. Add the column as nullable, backfill existing rows, and add a trigger to update the column on write instead.

(adding-field-with-default)


[warning] 115-116: By default new constraints require a table scan and block writes to the table while that scan occurs. Use NOT VALID with a later VALIDATE CONSTRAINT call.

(constraint-missing-not-valid)

🔇 Additional comments (56)
integrations/graph-rag-spring-ai/src/test/java/com/orgmemory/integrations/graphrag/springai/SpringAiDescriptionSummaryModelTests.java (1)

1-52: LGTM!

apps/worker/src/main/java/com/orgmemory/worker/graph/GraphIndexingProcessor.java (4)

19-28: LGTM!

Also applies to: 83-88


118-148: LGTM!


223-239: LGTM!


254-264: LGTM!

Also applies to: 301-345

apps/worker/src/main/java/com/orgmemory/worker/graph/GraphIndexingProperties.java (2)

4-4: LGTM!

Also applies to: 17-37


51-83: LGTM!

apps/worker/src/main/resources/application.yml (1)

87-90: LGTM!

apps/worker/src/test/java/com/orgmemory/worker/graph/GraphIndexingProcessorTests.java (2)

56-56: LGTM!

Also applies to: 66-113, 136-139


312-336: LGTM!

Also applies to: 351-356

core/src/main/java/com/orgmemory/core/knowledge/GraphIndexChunk.java (1)

6-6: LGTM!

Also applies to: 17-21

core/src/main/java/com/orgmemory/core/knowledge/KnowledgeChunkProjectionStore.java (1)

156-156: LGTM!

Also applies to: 175-176

components/graph-rag-core/src/main/java/com/orgmemory/graphrag/extraction/ExtractionCandidateEntity.java (1)

5-18: LGTM!

components/graph-rag-core/src/main/java/com/orgmemory/graphrag/extraction/ExtractionCandidateRelation.java (1)

7-33: LGTM!

components/graph-rag-core/src/main/java/com/orgmemory/graphrag/extraction/ExtractionRoundRequest.java (1)

7-26: LGTM!

components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/ExtractionResult.java (1)

8-43: LGTM!

integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiDescriptionSummaryModel.java (1)

14-67: LGTM!

integrations/graph-rag-spring-ai/src/test/java/com/orgmemory/integrations/graphrag/springai/SpringAiEntityRelationExtractorTests.java (1)

24-156: LGTM!

components/graph-rag-core/src/main/java/com/orgmemory/graphrag/summarization/DescriptionSummaryRequest.java (1)

7-34: LGTM!

components/graph-rag-core/src/main/java/com/orgmemory/graphrag/summarization/ScopedDescriptionSet.java (1)

15-30: 🎯 Functional Correctness

No change needed for description deduplication.

IterativeDescriptionSummarizer dedupes before invoking the model and returns a single sanitized description when only one unique description remains, so it does not construct a DescriptionSummaryRequest with fewer than two descriptions.

components/graph-rag-core/src/main/java/com/orgmemory/graphrag/extraction/LightRagEntityRelationExtractor.java (3)

202-249: Deterministic round-merge logic (normalize-then-merge-by-key, sorted output, self-loop rejection) looks correct and consistent with the "deterministic correction merging" objective.


251-310: LGTM!


64-93: 🎯 Functional Correctness

No change needed for this gleaning round count. maxGleaningRounds is intentionally bounded to 0 or 1 for LightRAG v1.5.4 parity: ExtractionProfile, GraphIndexingProperties, and ExtractionRoundRequest all reject or enforce > 1; the current code runs one optional continuation round when enabled.

			> Likely an incorrect or invalid review comment.
components/graph-rag-core/src/main/java/com/orgmemory/graphrag/extraction/LightRagExtractionPrompt.java (1)

74-117: Prompt-version gate and template argument counts check out (verified each .formatted() call against its placeholder count).

integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiEntityRelationExtractor.java (2)

18-31: Delegate wiring to LightRagEntityRelationExtractor with tokenizer injection looks correct; PROMPT_VERSION sourced from LightRagExtractionPrompt.VERSION keeps a single source of truth.


33-50: LGTM!

integrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresGraphProjectionStore.java (4)

137-181: Column projection changes correctly reflect the entity/relation-type-as-contribution-metadata model and align with the assembler's provenance fingerprint.


334-353: LGTM!

Also applies to: 421-428


449-495: LGTM!

Also applies to: 510-562, 586-629, 653-721


1413-1415: 🗄️ Data Integrity & Integration

No schema mismatch here.

graph_relation_contributions.keywords is declared as varchar(255)[], so createArrayOf("varchar", ...) matches the migration type name.

components/graph-rag-core/src/main/java/com/orgmemory/graphrag/extraction/ExtractionConversationMessage.java (1)

1-19: LGTM!

components/graph-rag-core/src/main/java/com/orgmemory/graphrag/extraction/ExtractionRoundResponse.java (1)

6-24: LGTM!

components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/ExtractionDiagnostics.java (1)

6-24: LGTM!

components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/ExtractionRoundMetrics.java (1)

6-27: LGTM!

components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/ExtractedRelation.java (1)

6-52: LGTM!

components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/ExtractionRequest.java (1)

7-48: LGTM!

components/graph-rag-core/src/main/java/com/orgmemory/graphrag/port/ExtractionModel.java (1)

1-11: LGTM!

components/graph-rag-core/src/main/java/com/orgmemory/graphrag/indexing/GraphContributionAssembler.java (1)

151-152: LGTM!

Also applies to: 171-178, 262-262, 276-301, 308-342

components/graph-rag-core/src/main/java/com/orgmemory/graphrag/port/DescriptionSummaryModel.java (1)

5-8: LGTM!

integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/StructuredExtractionResponse.java (1)

5-23: LGTM!

components/graph-rag-core/src/test/java/com/orgmemory/graphrag/extraction/LightRagEntityRelationExtractorTests.java (1)

23-286: LGTM!

components/graph-rag-core/src/main/java/com/orgmemory/graphrag/summarization/DescriptionSummaryOptions.java (1)

6-26: LGTM!

components/graph-rag-core/src/main/java/com/orgmemory/graphrag/summarization/DescriptionSummaryResult.java (1)

5-19: LGTM!

components/graph-rag-core/src/main/java/com/orgmemory/graphrag/summarization/IterativeDescriptionSummarizer.java (1)

16-34: LGTM!

Also applies to: 80-93, 124-146

components/graph-rag-core/src/test/java/com/orgmemory/graphrag/summarization/IterativeDescriptionSummarizerTests.java (1)

17-74: LGTM!

integrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/ApacheAgeGraphTopologyProjection.java (1)

242-278: LGTM!

components/graph-rag-testkit/src/main/java/com/orgmemory/graphrag/testkit/InMemoryGraphProjection.java (1)

250-277: LGTM!

components/graph-rag-core/src/main/java/com/orgmemory/graphrag/authorization/PermissionScopedGraphMerger.java (1)

1-275: LGTM!

components/graph-rag-core/src/test/java/com/orgmemory/graphrag/authorization/PermissionScopedGraphMergerTests.java (1)

1-187: LGTM!

components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/CanonicalEntity.java (1)

6-10: LGTM!

components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/EntityContribution.java (1)

6-19: LGTM!

components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/RelationContribution.java (1)

7-29: LGTM!

integrations/graph-rag-postgres/src/test/java/com/orgmemory/graphrag/postgres/ApacheAgeGraphTopologyProjectionIntegrationTests.java (1)

120-168: LGTM!

components/graph-rag-testkit/src/test/java/com/orgmemory/graphrag/testkit/InMemoryGraphProjectionSecurityTests.java (1)

37-52: LGTM!

Also applies to: 199-288

components/graph-rag-core/src/test/java/com/orgmemory/graphrag/indexing/GraphContributionAssemblerTests.java (1)

34-62: LGTM!

Also applies to: 79-167

components/graph-rag-core/src/main/java/com/orgmemory/graphrag/model/EvidenceProvenance.java (1)

33-51: 🎯 Functional Correctness

Default fingerprint literal length is valid.

The all-zero literal is exactly 64 hex characters, so it does not trigger the existing [0-9a-f]{64} fingerprint validation rule.

			> Likely an incorrect or invalid review comment.

Comment thread core/src/main/resources/db/migration/V32__evidence_scoped_graph_semantics.sql Outdated
Comment thread core/src/main/resources/db/migration/V32__evidence_scoped_graph_semantics.sql Outdated
Comment thread core/src/main/resources/db/migration/V32__evidence_scoped_graph_semantics.sql Outdated
Comment thread core/src/main/resources/db/migration/V32__evidence_scoped_graph_semantics.sql Outdated
@kl3inIT
kl3inIT merged commit d92f615 into light-rag Jul 23, 2026
5 checks passed
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.

1 participant