Repository navigation
feat(graph-rag): add shared PostgreSQL snapshots - #33
Conversation
|
Warning Review limit reached
Next review available in: 40 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: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR adds shared PostgreSQL projection snapshots with batch publication, authorization-aware content, lexical, vector, and graph adapters, generation-aware query behavior, integration coverage, and Spring AI chat-option inheritance. ChangesShared projection snapshots
Spring AI option propagation
Estimated code review effort: 5 (Critical) | ~120 minutes Sequence Diagram(s)sequenceDiagram
participant Client
participant ProjectionAdapter
participant PublicationStore
participant PostgreSQL
Client->>ProjectionAdapter: stage projection records
ProjectionAdapter->>PostgreSQL: write batch-scoped staged data
PublicationStore->>PostgreSQL: record preparation receipts
PublicationStore->>PostgreSQL: lock namespace and publish batch
PostgreSQL-->>PublicationStore: return published snapshot
Client->>ProjectionAdapter: query authorized snapshot
ProjectionAdapter->>PostgreSQL: validate batch and visibility
PostgreSQL-->>ProjectionAdapter: return filtered projection data
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 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
`@components/graph-rag-testkit/src/test/java/com/orgmemory/graphrag/testkit/LightRagQueryRuntimeConformanceTests.java`:
- Around line 567-572: Remove the unused private three-argument
provenance(String, UUID, UUID) overload; retain the four-argument provenance
implementation and all callers that invoke it directly.
In
`@integrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresProjectionPublicationStore.java`:
- Around line 315-318: Update the DataIntegrityViolationException handler in
PostgresProjectionPublicationStore to pass the caught conflict as the cause when
creating PublicationConflictException. Ensure PublicationConflictException
provides a compatible (String, Throwable) constructor while preserving the
existing conflict message.
🪄 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: 5aa1c36f-f57c-4ad6-aae8-0fb649464f29
⛔ Files ignored due to path filters (5)
docs/increments/active/2026-07-23-full-lightrag-semantic-port/design.mdis excluded by!docs/**docs/increments/active/2026-07-23-full-lightrag-semantic-port/plan.mdis excluded by!docs/**docs/research/lightrag-v1.5.4-parity-manifest.mdis excluded by!docs/**docs/specs/domains/secure-graph-rag.mdis excluded by!docs/**docs/tests/domains/secure-graph-rag.mdis excluded by!docs/**
📒 Files selected for processing (28)
ARCHITECTURE.mdcomponents/graph-rag-core/src/main/java/com/orgmemory/graphrag/query/AuthorizedQueryProjection.javacomponents/graph-rag-core/src/main/java/com/orgmemory/graphrag/query/LightRagQueryEngine.javacomponents/graph-rag-core/src/main/java/com/orgmemory/graphrag/query/StoreBackedAuthorizedQueryProjection.javacomponents/graph-rag-core/src/main/java/com/orgmemory/graphrag/storage/GraphStore.javacomponents/graph-rag-core/src/main/java/com/orgmemory/graphrag/storage/ProjectionKind.javacomponents/graph-rag-core/src/main/java/com/orgmemory/graphrag/storage/VectorIndex.javacomponents/graph-rag-testkit/src/main/java/com/orgmemory/graphrag/testkit/InMemoryAuthorizedQueryProjection.javacomponents/graph-rag-testkit/src/test/java/com/orgmemory/graphrag/testkit/LightRagQueryRuntimeConformanceTests.javacore/src/main/resources/db/migration/V34__shared_projection_publication_snapshots.sqlintegrations/graph-rag-postgres/build.gradle.ktsintegrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresContentStore.javaintegrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresGraphRagAutoConfiguration.javaintegrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresGraphStore.javaintegrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresGraphVectorIndexManager.javaintegrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresLexicalIndex.javaintegrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresProjectionCodec.javaintegrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresProjectionPublicationStore.javaintegrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresProjectionSupport.javaintegrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresVectorIndex.javaintegrations/graph-rag-postgres/src/test/java/com/orgmemory/graphrag/postgres/PostgresSharedProjectionIntegrationTests.javaintegrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiDescriptionSummaryModel.javaintegrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiExtractionModel.javaintegrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiKeywordPlanningModel.javaintegrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiMultimodalAnalyzer.javaintegrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiQueryAnswerModel.javaintegrations/graph-rag-spring-ai/src/test/java/com/orgmemory/integrations/graphrag/springai/SpringAiKeywordPlanningModelTests.javaintegrations/graph-rag-spring-ai/src/test/java/com/orgmemory/integrations/graphrag/springai/SpringAiQueryAnswerModelTests.java
📜 Review details
⏰ Context from checks skipped due to timeout. (1)
- GitHub Check: Backend · Java 25
🧰 Additional context used
📓 Path-based instructions (4)
**/*
📄 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 projectorgmemory-*verification skills.
Readdocs/guidelines/agent-safety.mdbefore retrieval, AI, MCP, permission, upload, graph, or export work.
Never commit.envfiles, provider keys, tokens, or customer data.
Run the relevant gates fromdocs/guidelines/testing-harness.md; use a terminating clean test as the context gate, and do not treatbootRunas 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:
integrations/graph-rag-postgres/build.gradle.ktscomponents/graph-rag-core/src/main/java/com/orgmemory/graphrag/storage/ProjectionKind.javacomponents/graph-rag-core/src/main/java/com/orgmemory/graphrag/query/AuthorizedQueryProjection.javaintegrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresLexicalIndex.javacomponents/graph-rag-core/src/main/java/com/orgmemory/graphrag/storage/GraphStore.javaARCHITECTURE.mdintegrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiDescriptionSummaryModel.javaintegrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiExtractionModel.javaintegrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiQueryAnswerModel.javaintegrations/graph-rag-spring-ai/src/test/java/com/orgmemory/integrations/graphrag/springai/SpringAiQueryAnswerModelTests.javaintegrations/graph-rag-spring-ai/src/test/java/com/orgmemory/integrations/graphrag/springai/SpringAiKeywordPlanningModelTests.javacomponents/graph-rag-testkit/src/main/java/com/orgmemory/graphrag/testkit/InMemoryAuthorizedQueryProjection.javacomponents/graph-rag-core/src/main/java/com/orgmemory/graphrag/query/LightRagQueryEngine.javaintegrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiMultimodalAnalyzer.javaintegrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresProjectionCodec.javacomponents/graph-rag-core/src/main/java/com/orgmemory/graphrag/storage/VectorIndex.javacore/src/main/resources/db/migration/V34__shared_projection_publication_snapshots.sqlintegrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiKeywordPlanningModel.javaintegrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresProjectionSupport.javaintegrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresContentStore.javaintegrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresGraphRagAutoConfiguration.javaintegrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresGraphVectorIndexManager.javaintegrations/graph-rag-postgres/src/test/java/com/orgmemory/graphrag/postgres/PostgresSharedProjectionIntegrationTests.javaintegrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresProjectionPublicationStore.javacomponents/graph-rag-core/src/main/java/com/orgmemory/graphrag/query/StoreBackedAuthorizedQueryProjection.javacomponents/graph-rag-testkit/src/test/java/com/orgmemory/graphrag/testkit/LightRagQueryRuntimeConformanceTests.javaintegrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresVectorIndex.javaintegrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresGraphStore.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/storage/ProjectionKind.javacomponents/graph-rag-core/src/main/java/com/orgmemory/graphrag/query/AuthorizedQueryProjection.javaintegrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresLexicalIndex.javacomponents/graph-rag-core/src/main/java/com/orgmemory/graphrag/storage/GraphStore.javaintegrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiDescriptionSummaryModel.javaintegrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiExtractionModel.javaintegrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiQueryAnswerModel.javaintegrations/graph-rag-spring-ai/src/test/java/com/orgmemory/integrations/graphrag/springai/SpringAiQueryAnswerModelTests.javaintegrations/graph-rag-spring-ai/src/test/java/com/orgmemory/integrations/graphrag/springai/SpringAiKeywordPlanningModelTests.javacomponents/graph-rag-testkit/src/main/java/com/orgmemory/graphrag/testkit/InMemoryAuthorizedQueryProjection.javacomponents/graph-rag-core/src/main/java/com/orgmemory/graphrag/query/LightRagQueryEngine.javaintegrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiMultimodalAnalyzer.javaintegrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresProjectionCodec.javacomponents/graph-rag-core/src/main/java/com/orgmemory/graphrag/storage/VectorIndex.javacore/src/main/resources/db/migration/V34__shared_projection_publication_snapshots.sqlintegrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiKeywordPlanningModel.javaintegrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresProjectionSupport.javaintegrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresContentStore.javaintegrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresGraphRagAutoConfiguration.javaintegrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresGraphVectorIndexManager.javaintegrations/graph-rag-postgres/src/test/java/com/orgmemory/graphrag/postgres/PostgresSharedProjectionIntegrationTests.javaintegrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresProjectionPublicationStore.javacomponents/graph-rag-core/src/main/java/com/orgmemory/graphrag/query/StoreBackedAuthorizedQueryProjection.javacomponents/graph-rag-testkit/src/test/java/com/orgmemory/graphrag/testkit/LightRagQueryRuntimeConformanceTests.javaintegrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresVectorIndex.javaintegrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresGraphStore.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/storage/ProjectionKind.javacomponents/graph-rag-core/src/main/java/com/orgmemory/graphrag/query/AuthorizedQueryProjection.javaintegrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresLexicalIndex.javacomponents/graph-rag-core/src/main/java/com/orgmemory/graphrag/storage/GraphStore.javaintegrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiDescriptionSummaryModel.javaintegrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiExtractionModel.javaintegrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiQueryAnswerModel.javaintegrations/graph-rag-spring-ai/src/test/java/com/orgmemory/integrations/graphrag/springai/SpringAiQueryAnswerModelTests.javaintegrations/graph-rag-spring-ai/src/test/java/com/orgmemory/integrations/graphrag/springai/SpringAiKeywordPlanningModelTests.javacomponents/graph-rag-testkit/src/main/java/com/orgmemory/graphrag/testkit/InMemoryAuthorizedQueryProjection.javacomponents/graph-rag-core/src/main/java/com/orgmemory/graphrag/query/LightRagQueryEngine.javaintegrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiMultimodalAnalyzer.javaintegrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresProjectionCodec.javacomponents/graph-rag-core/src/main/java/com/orgmemory/graphrag/storage/VectorIndex.javaintegrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiKeywordPlanningModel.javaintegrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresProjectionSupport.javaintegrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresContentStore.javaintegrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresGraphRagAutoConfiguration.javaintegrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresGraphVectorIndexManager.javaintegrations/graph-rag-postgres/src/test/java/com/orgmemory/graphrag/postgres/PostgresSharedProjectionIntegrationTests.javaintegrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresProjectionPublicationStore.javacomponents/graph-rag-core/src/main/java/com/orgmemory/graphrag/query/StoreBackedAuthorizedQueryProjection.javacomponents/graph-rag-testkit/src/test/java/com/orgmemory/graphrag/testkit/LightRagQueryRuntimeConformanceTests.javaintegrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresVectorIndex.javaintegrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresGraphStore.java
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/V34__shared_projection_publication_snapshots.sql
🧠 Learnings (1)
📚 Learning: 2026-07-23T23:30:44.585Z
Learnt from: kl3inIT
Repo: kl3inIT/OrgMemory PR: 30
File: core/src/main/resources/db/migration/V32__evidence_scoped_graph_semantics.sql:0-0
Timestamp: 2026-07-23T23:30:44.585Z
Learning: For OrgMemory PostgreSQL Flyway migrations under core/src/main/resources/db/migration, do not recommend using `CREATE INDEX CONCURRENTLY` or `DROP INDEX CONCURRENTLY` inside application-owned Flyway migration SQL. Flyway’s schema-history connection may hold a transaction that can cause concurrent index operations to wait indefinitely (e.g., on a `virtualxid`), and docs/conventions.md forbids this pattern. If you need large production-table index replacement, pre-stage online index operations via the deployment pipeline (outside Flyway) rather than inside the migration; “ordinary” index replacement is acceptable for unreleased projections before production traffic.
Applied to files:
core/src/main/resources/db/migration/V34__shared_projection_publication_snapshots.sql
🪛 ast-grep (0.44.1)
integrations/graph-rag-postgres/src/test/java/com/orgmemory/graphrag/postgres/PostgresSharedProjectionIntegrationTests.java
[warning] 153-157: Avoid LDAP injections
Context: lexical.search(
allowed,
firstSnapshot,
new LexicalIndex.SearchRequest(
"probation", Set.of(), 10, 0, null))
Note: [CWE-90] Improper Neutralization of Special Elements used in an LDAP Query ('LDAP Injection'). Security best practice.
(ldap-injection-java)
[warning] 163-172: Avoid LDAP injections
Context: vectors.search(
allowed,
firstSnapshot,
new VectorIndex.SearchRequest(
PROFILE_ID,
Set.of(VectorIndex.VectorKind.CHUNK),
Set.of(),
vector(1, 0, 0),
10,
0))
Note: [CWE-90] Improper Neutralization of Special Elements used in an LDAP Query ('LDAP Injection'). Security best practice.
(ldap-injection-java)
[warning] 184-188: Avoid LDAP injections
Context: lexical.search(
denied,
firstSnapshot,
new LexicalIndex.SearchRequest(
"probation", Set.of(), 10, 0, null))
Note: [CWE-90] Improper Neutralization of Special Elements used in an LDAP Query ('LDAP Injection'). Security best practice.
(ldap-injection-java)
[warning] 191-200: Avoid LDAP injections
Context: vectors.search(
denied,
firstSnapshot,
new VectorIndex.SearchRequest(
PROFILE_ID,
Set.of(VectorIndex.VectorKind.CHUNK),
Set.of(),
vector(1, 0, 0),
10,
0))
Note: [CWE-90] Improper Neutralization of Special Elements used in an LDAP Query ('LDAP Injection'). Security best practice.
(ldap-injection-java)
components/graph-rag-core/src/main/java/com/orgmemory/graphrag/query/StoreBackedAuthorizedQueryProjection.java
[warning] 184-193: Avoid LDAP injections
Context: vectors.search(
scope,
snapshot,
new VectorIndex.SearchRequest(
search.embeddingProfileId(),
Set.of(kind),
candidates,
search.vector(),
search.limit(),
search.minimumSimilarity()))
Note: [CWE-90] Improper Neutralization of Special Elements used in an LDAP Query ('LDAP Injection'). Security best practice.
(ldap-injection-java)
🪛 PMD (7.26.0)
integrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresProjectionPublicationStore.java
[Medium] 316-317: PreserveStackTrace (Best Practices): Thrown exception does not preserve the stack trace of exception 'conflict' on all code paths
(PreserveStackTrace (Best Practices))
components/graph-rag-testkit/src/test/java/com/orgmemory/graphrag/testkit/LightRagQueryRuntimeConformanceTests.java
[Medium] 567-567: UnusedPrivateMethod (Best Practices): Avoid unused private methods such as 'provenance(String, UUID, UUID)'.
(UnusedPrivateMethod (Best Practices))
🪛 SQLFluff (4.2.2)
core/src/main/resources/db/migration/V34__shared_projection_publication_snapshots.sql
[error] 110-116: CREATE INDEX should use CONCURRENTLY to avoid locking the table during the build.
(PG01)
[error] 137-138: CREATE INDEX should use CONCURRENTLY to avoid locking the table during the build.
(PG01)
[error] 140-146: CREATE INDEX should use CONCURRENTLY to avoid locking the table during the build.
(PG01)
[error] 172-179: CREATE INDEX should use CONCURRENTLY to avoid locking the table during the build.
(PG01)
[error] 181-182: CREATE INDEX should use CONCURRENTLY to avoid locking the table during the build.
(PG01)
[error] 206-207: CREATE INDEX should use CONCURRENTLY to avoid locking the table during the build.
(PG01)
[error] 209-210: CREATE INDEX should use CONCURRENTLY to avoid locking the table during the build.
(PG01)
[error] 243-249: CREATE INDEX should use CONCURRENTLY to avoid locking the table during the build.
(PG01)
[error] 251-252: CREATE INDEX should use CONCURRENTLY to avoid locking the table during the build.
(PG01)
[error] 288-294: CREATE INDEX should use CONCURRENTLY to avoid locking the table during the build.
(PG01)
[error] 296-297: CREATE INDEX should use CONCURRENTLY to avoid locking the table during the build.
(PG01)
🪛 Squawk (2.59.0)
core/src/main/resources/db/migration/V34__shared_projection_publication_snapshots.sql
[warning] 4-4: 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] 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] 8-8: 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] 9-9: 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] 11-11: 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] 50-50: 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] 61-61: 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] 62-62: 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] 64-64: 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: 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] 73-73: 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] 84-84: 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] 94-94: 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] 101-101: 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] 103-103: Using 32-bit integer fields can result in hitting the max int limit. Use 64-bit integer values instead to prevent hitting this limit.
(prefer-bigint-over-int)
[warning] 121-121: 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] 151-151: 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] 152-152: 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] 159-159: 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] 161-161: 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] 162-162: Using 32-bit integer fields can result in hitting the max int limit. Use 64-bit integer values instead to prevent hitting this limit.
(prefer-bigint-over-int)
[warning] 198-198: 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] 217-217: 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] 226-226: 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] 227-227: 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] 228-228: 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] 229-229: 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] 259-259: 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] 270-270: 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] 271-271: 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] 272-272: 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] 273-273: 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)
🔇 Additional comments (31)
integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiDescriptionSummaryModel.java (1)
11-12: LGTM!Also applies to: 50-56
integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiExtractionModel.java (1)
22-23: LGTM!Also applies to: 51-56
integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiKeywordPlanningModel.java (1)
12-13: LGTM!Also applies to: 34-45
integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiMultimodalAnalyzer.java (1)
17-18: LGTM!Also applies to: 166-174
integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiQueryAnswerModel.java (1)
13-14: LGTM!Also applies to: 57-69
integrations/graph-rag-spring-ai/src/test/java/com/orgmemory/integrations/graphrag/springai/SpringAiKeywordPlanningModelTests.java (1)
14-14: LGTM!Also applies to: 37-37, 56-57, 70-74
integrations/graph-rag-spring-ai/src/test/java/com/orgmemory/integrations/graphrag/springai/SpringAiQueryAnswerModelTests.java (1)
16-16: LGTM!Also applies to: 52-52, 86-87, 103-107
core/src/main/resources/db/migration/V34__shared_projection_publication_snapshots.sql (2)
110-116: Not recommendingCONCURRENTLYfor theseCREATE INDEXstatements.SQLFluff (PG01) flags these as lock risks, but per this repo's established convention,
CREATE INDEX CONCURRENTLY/DROP INDEX CONCURRENTLYshould not be used inside Flyway migrations here — Flyway's schema-history connection can hold a transaction that stalls concurrent index builds, and "ordinary" index creation is acceptable for these new, pre-traffic projection tables.Based on learnings, "do not recommend using
CREATE INDEX CONCURRENTLYorDROP INDEX CONCURRENTLYinside application-owned Flyway migration SQL... 'ordinary' index replacement is acceptable for unreleased projections before production traffic."Also applies to: 137-146, 172-182, 206-210, 243-252, 288-297
Source: Learnings
1-298: LGTM!components/graph-rag-core/src/main/java/com/orgmemory/graphrag/query/AuthorizedQueryProjection.java (1)
109-133: LGTM!components/graph-rag-core/src/main/java/com/orgmemory/graphrag/storage/ProjectionKind.java (1)
3-8: LGTM!components/graph-rag-core/src/main/java/com/orgmemory/graphrag/storage/VectorIndex.java (1)
34-118: LGTM!components/graph-rag-core/src/main/java/com/orgmemory/graphrag/storage/GraphStore.java (1)
1-77: LGTM!components/graph-rag-core/src/main/java/com/orgmemory/graphrag/query/StoreBackedAuthorizedQueryProjection.java (1)
26-244: LGTM!components/graph-rag-core/src/main/java/com/orgmemory/graphrag/query/LightRagQueryEngine.java (1)
65-72: LGTM!Also applies to: 489-499
components/graph-rag-testkit/src/main/java/com/orgmemory/graphrag/testkit/InMemoryAuthorizedQueryProjection.java (1)
324-334: LGTM!components/graph-rag-testkit/src/test/java/com/orgmemory/graphrag/testkit/LightRagQueryRuntimeConformanceTests.java (1)
66-68: LGTM!Also applies to: 157-196, 239-261, 297-314, 381-406, 448-455, 526-566, 573-581, 595-614, 732-736
integrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresGraphRagAutoConfiguration.java (2)
8-12: LGTM!
41-88: 🩺 Stability & AvailabilityNo action needed.
A custom
ProjectionPublicationStoreimplementation would satisfy@ConditionalOnMissingBean(ProjectionPublicationStore.class)and be injected here, so these parameters do not break override support.> Likely an incorrect or invalid review comment.integrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresProjectionSupport.java (1)
35-118: LGTM!integrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresProjectionPublicationStore.java (1)
204-294: LGTM!integrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresContentStore.java (1)
46-149: LGTM!integrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresLexicalIndex.java (1)
102-217: LGTM!integrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresProjectionCodec.java (1)
17-89: LGTM!integrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresGraphStore.java (2)
136-357: LGTM!
388-457: LGTM!integrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresGraphVectorIndexManager.java (1)
15-191: LGTM!integrations/graph-rag-postgres/src/main/java/com/orgmemory/graphrag/postgres/PostgresVectorIndex.java (1)
47-234: LGTM!integrations/graph-rag-postgres/build.gradle.kts (1)
14-14: LGTM!integrations/graph-rag-postgres/src/test/java/com/orgmemory/graphrag/postgres/PostgresSharedProjectionIntegrationTests.java (1)
105-271: LGTM!ARCHITECTURE.md (1)
201-208: LGTM!
Summary
Architecture
batch_id, never made visible by generation aloneVerification
./gradlew.bat :components:graph-rag-core:test :components:graph-rag-testkit:test :integrations:graph-rag-spring-ai:test :integrations:graph-rag-postgres:test --no-daemon./gradlew.bat --no-daemon clean testgit diff --checkBase is
light-rag; this PR does not target or modifymain.Summary by CodeRabbit
New Features
topP.Bug Fixes
Documentation