Skip to content

feat(graph-rag): executable parser and chunker strategies - #28

Merged
kl3inIT merged 2 commits into
light-ragfrom
kl3inIT/light-rag-pr03-parser-chunker
Jul 23, 2026
Merged

feat(graph-rag): executable parser and chunker strategies#28
kl3inIT merged 2 commits into
light-ragfrom
kl3inIT/light-rag-pr03-parser-chunker

Conversation

@kl3inIT

@kl3inIT kl3inIT commented Jul 23, 2026

Copy link
Copy Markdown
Owner

What

  • add a framework-neutral parser/chunker engine with immutable registries and ServiceLoader extension points
  • implement LightRAG v1.5.4 fixed-token, recursive-character, semantic-vector, and paragraph-semantic strategies
  • add JTokkit and Spring AI embedding adapters while keeping graph-rag-core dependency-free
  • persist requested/actual processing profiles, canonical hashes, exact character/page/block provenance, and strategy versions
  • remove the legacy Spring AI-only chunker path

LightRAG parity evidence

  • pinned fixed-token golden fixture plus deterministic strategy tests
  • paragraph anchor splitting, table header budgeting, per-source-block part labels, references handling, and level-aware merge
  • semantic batch order/dimension validation and deterministic threshold tests
  • immutable registry and profile-hash conformance tests

Verification

  • ./gradlew.bat --no-daemon clean test
  • mechanical package, zero-byte, Flyway version, and git diff --check gates
  • graph-rag-core runtime classpath remains free of Spring/vendor dependencies

Merge flow

This PR targets light-rag. It must not merge into main; main will only receive the completed program after PR12.

Summary by CodeRabbit

  • New Features
    • Added a unified document ingestion pipeline supporting native, passthrough, reusable, fixed-token, recursive, semantic, and paragraph-based processing.
    • Added richer document and chunk metadata, including headings, page ranges, character spans, source blocks, and content hashes.
    • Added configurable parser and chunker selection, overlap, tokenizer, and semantic embedding settings.
    • Added processing-profile tracking for reproducible ingestion.
  • Bug Fixes
    • Documents automatically fall back to recursive chunking when semantic embeddings are unavailable.

@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: 33 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: 2a6bcc5b-251f-4d39-acfe-643f8f00cbd2

📥 Commits

Reviewing files that changed from the base of the PR and between 276b617 and 4b74733.

📒 Files selected for processing (24)
  • apps/worker/src/main/java/com/orgmemory/worker/ingestion/DocumentProcessingEngine.java
  • apps/worker/src/main/java/com/orgmemory/worker/ingestion/ProcessedSourceDocument.java
  • apps/worker/src/main/java/com/orgmemory/worker/ingestion/SourceDocumentReader.java
  • apps/worker/src/main/java/com/orgmemory/worker/ingestion/SourceProcessingProperties.java
  • apps/worker/src/test/java/com/orgmemory/worker/ingestion/DocumentProcessingEngineTests.java
  • apps/worker/src/test/java/com/orgmemory/worker/ingestion/SourceDocumentReaderTests.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkedText.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkerOptions.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkerRegistrySnapshot.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/FixedTokenChunker.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ParagraphSemanticChunker.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/CanonicalDocument.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/ParserRegistrySnapshot.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/processing/ResolvedDocumentProcessingProfile.java
  • components/graph-rag-testkit/src/test/java/com/orgmemory/graphrag/testkit/LightRagChunkerGoldenTests.java
  • components/graph-rag-testkit/src/test/java/com/orgmemory/graphrag/testkit/ProcessingRegistryConformanceTests.java
  • core/src/main/java/com/orgmemory/core/knowledge/ConnectorSourceRevisionCoordinator.java
  • core/src/main/java/com/orgmemory/core/knowledge/DocumentProcessingProfileSnapshot.java
  • core/src/main/resources/db/migration/V30__document_processing_profiles_and_chunk_provenance.sql
  • core/src/main/resources/db/migration/V31__validate_document_processing_profile_constraints.sql
  • integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/JtokkitTextTokenizer.java
  • integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiTextEmbeddingPort.java
  • integrations/graph-rag-spring-ai/src/test/java/com/orgmemory/integrations/graphrag/springai/JtokkitTextTokenizerTests.java
  • integrations/graph-rag-spring-ai/src/test/java/com/orgmemory/integrations/graphrag/springai/SpringAiTextEmbeddingPortTests.java
📝 Walkthrough

Walkthrough

Introduces a registry-based document ingestion pipeline with canonical parsing, four chunking strategies, tokenizer and embedding adapters, chunk provenance, deterministic processing profiles, and persistence changes for processing metadata.

Changes

Ingestion pipeline

Layer / File(s) Summary
Parsing contracts and registries
components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/*, components/graph-rag-core/src/main/java/com/orgmemory/graphrag/processing/*
Defines canonical documents, parser requests/results, parser implementations, plugin registries, immutable snapshots, component identities, and hashed processing profiles.
Chunking strategies and provenance
components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/*, components/graph-rag-testkit/src/test/*
Adds fixed-token, recursive-character, semantic-vector, and paragraph-semantic chunkers with validated options, source spans, block/page provenance, token limits, and golden/conformance tests.
Tokenizer and embedding integrations
integrations/graph-rag-spring-ai/src/main/java/*, integrations/graph-rag-spring-ai/src/test/*, components/graph-rag-testkit/src/main/java/*
Adds JTokkit source-span mapping and Spring AI embedding batching with dimension validation and adapter tests.
Worker processing orchestration
apps/worker/src/main/java/com/orgmemory/worker/ingestion/*, apps/worker/src/main/resources/application.yml
Routes in-memory documents through immutable parser/chunker registries, applies configured options, falls back from semantic embeddings when required, enforces chunk limits, and emits resolved processing profiles.
Persisted provenance
core/src/main/java/com/orgmemory/core/knowledge/*, core/src/main/resources/db/migration/*
Carries processing profiles and chunk character/block provenance through ingestion coordination, chunk drafts, database projection, entity state, and schema constraints.

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

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 accurately reflects the main change: introducing executable parser and chunker strategies for graph-rag.
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-pr03-parser-chunker

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: 17

Caution

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

⚠️ Outside diff range comments (1)
apps/worker/src/main/java/com/orgmemory/worker/ingestion/SourceDocumentReader.java (1)

65-97: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Text is normalized twice per document.

read() builds normalizedText (lines 89-95) by normalizing every Document's text, but parse() discards parsed.normalizedText() and calls canonical(parsed.documents()), which normalizes the same texts again (line 103). This duplicate pass wastes CPU on every parse and risks the two normalization outputs silently drifting apart if one is edited without the other.

Also applies to: 99-128

🤖 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
`@apps/worker/src/main/java/com/orgmemory/worker/ingestion/SourceDocumentReader.java`
around lines 65 - 97, Update the read/parse flow around read(), ParsedSource,
and canonical() so document text is normalized exactly once per document. Reuse
the normalizedText produced by read() when constructing the final parsed result,
and remove the later canonical normalization pass while preserving the existing
filtering and no-extractable-text behavior.
🤖 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
`@apps/worker/src/main/java/com/orgmemory/worker/ingestion/DocumentProcessingEngine.java`:
- Around line 94-131: Update DocumentProcessingEngine.process and the chunking
flow to detect documents that will exceed properties.maximumChunks() before
semantic embedding is performed, using an existing token-count pre-check or a
maxChunks-aware ChunkerOptions path. Preserve the existing CHUNK_LIMIT_EXCEEDED
rejection and ensure oversized semantic-vector requests do not invoke the
external embedding provider.
- Around line 40-41: Update parser selection around LEGACY_SUFFIXES and
ParserRegistrySnapshot.route() so shared md/docx suffixes resolve to the
intended parser for unrequested files, rather than implicitly selecting the
later nativeParser. Ensure PassthroughParser or the appropriate legacy/native
parser is eligible according to the desired behavior, while preserving
deduplication by parser component ID and first-match routing for other suffixes.

In
`@apps/worker/src/main/java/com/orgmemory/worker/ingestion/ProcessedSourceDocument.java`:
- Around line 14-21: Update the empty-chunks validation in
ProcessedSourceDocument so it throws the established RejectedSourceException,
preserving the existing message or rejection context. Ensure
SourceIngestionProcessor recognizes this failure through its existing quarantine
path rather than treating it as retryable, while leaving validation for
parseResult, chunks, and profile unchanged.

In
`@apps/worker/src/main/java/com/orgmemory/worker/ingestion/SourceDocumentReader.java`:
- Around line 76-82: Update the document-loading branch in SourceDocumentReader
so isPlainText types use TikaDocumentReader(resource).get() instead of decoding
bytes directly as UTF-8; retain the PDF-specific PagePdfDocumentReader path and
the existing Tika fallback for other types.

In
`@apps/worker/src/main/java/com/orgmemory/worker/ingestion/SourceProcessingProperties.java`:
- Around line 52-59: In the validation logic of SourceProcessingProperties,
split the combined Assert.isTrue call into separate assertions for chunkSize,
chunkOverlap, semanticEmbeddingBatchSize, and maximumChunks constraints. Give
each assertion a specific message identifying the invalid field and preserve the
existing boundary requirements, including chunkOverlap < chunkSize and
maximumChunks < Integer.MAX_VALUE.

In
`@components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkedText.java`:
- Around line 16-19: Update the content normalization in ChunkedText so boundary
whitespace is preserved rather than stripped, keeping content exactly aligned
with the character span recorded in provenance and canonical hashing. Retain the
null validation and blank-content rejection, but validate without mutating the
stored content.

In
`@components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkerOptions.java`:
- Around line 4-8: Change ChunkerOptions from a sealed interface to an ordinary
public interface by removing the permits clause, so third-party ChunkerPlugin
implementations can define strategy-specific options classes while preserving
the existing built-in implementations.

In
`@components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkerRegistrySnapshot.java`:
- Around line 17-21: Update ChunkerRegistrySnapshot.require() to normalize
chunkerId with Locale.ROOT when lowercasing, matching ProcessingComponentRef and
ensuring consistent lookups regardless of the platform default locale.

In
`@components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ParagraphSemanticChunker.java`:
- Around line 470-488: Update applyPartSuffixes to compare headings null-safely,
so consecutive drafts with null headings are treated as the same block and
increment part rather than resetting to 1. Preserve the existing behavior for
non-null headings and single-draft lists.

In
`@components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/CanonicalDocument.java`:
- Around line 10-19: Update the CanonicalDocument constructor to enforce LF-only
content: reject any content containing carriage returns before computing the
hash and accepting blocks. Preserve the existing nonblank and contentSha256
validation, ensuring CanonicalDocument cannot be created with text that text()
would normalize.

In
`@components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/ParserRegistrySnapshot.java`:
- Line 18: Update the parser-ID normalization in ParserRegistrySnapshot to use
Locale.ROOT with toLowerCase, ensuring IDs normalize identically regardless of
the JVM default locale. Add a regression test that sets a Turkish default locale
and verifies an uppercase-I parser ID resolves through the normalize-and-lookup
path.

In
`@components/graph-rag-core/src/main/java/com/orgmemory/graphrag/processing/ResolvedDocumentProcessingProfile.java`:
- Around line 29-38: Update the public constructor of
ResolvedDocumentProcessingProfile to derive the expected profile digest from the
fully normalized profile fields using the existing canonicalForm and SHA-256
helpers, then reject any supplied profileSha256 that differs while retaining
format validation. Ensure profileSha256 remains derived from the canonical
profile representation rather than accepting an unrelated valid digest.

In
`@components/graph-rag-testkit/src/test/java/com/orgmemory/graphrag/testkit/ProcessingRegistryConformanceTests.java`:
- Around line 58-63: Update
chunkerSnapshotDoesNotChangeWhenStartupRegistryChanges to register a distinct
chunker on registry after snapshot creation, then assert snapshot.chunkers()
still contains only the original entry and snapshot.require for the new chunker
ID throws IllegalArgumentException. Keep the existing initial snapshot
assertions intact.

In
`@core/src/main/java/com/orgmemory/core/knowledge/ConnectorSourceRevisionCoordinator.java`:
- Around line 125-126: Update the legacy profile construction in
ConnectorSourceRevisionCoordinator to avoid passing revision.getContentSha256()
as the canonical-text hash. Supply the actual parsed canonical-text hash if
available; otherwise use the legacy profile form that omits canonicalTextSha256,
while preserving the existing parser and chunker version values.

In
`@core/src/main/resources/db/migration/V30__document_processing_profiles_and_chunk_provenance.sql`:
- Around line 4-34: Add the new CHECK constraints in migration V30 as NOT VALID
so existing rows are not scanned while the stronger lock is held, including
chk_source_revision_processing_profile, chk_knowledge_chunk_source_span, and
chk_knowledge_chunk_block_indexes. Create a subsequent Flyway migration that
validates each constraint with VALIDATE CONSTRAINT, preserving enforcement for
new writes and PostgreSQL compatibility.

In
`@integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/JtokkitTextTokenizer.java`:
- Around line 69-73: Update JtokkitTextTokenizer’s token-window handling to
avoid rejecting windows that decode with U+FFFD: derive character-safe chunk
boundaries before performing provenance lookup, rather than throwing on split
UTF-8 characters. Preserve valid source-span mapping for adjusted boundaries,
and add a regression test covering an emoji split across FixedTokenChunker token
windows.

In
`@integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiTextEmbeddingPort.java`:
- Around line 24-25: Validate providerId and modelId as nonblank constructor
inputs before creating ProcessingComponentRef in SpringAiTextEmbeddingPort,
rejecting both null and blank values while preserving the existing model
validation. Add constructor tests covering null and blank providerId/modelId
cases.

---

Outside diff comments:
In
`@apps/worker/src/main/java/com/orgmemory/worker/ingestion/SourceDocumentReader.java`:
- Around line 65-97: Update the read/parse flow around read(), ParsedSource, and
canonical() so document text is normalized exactly once per document. Reuse the
normalizedText produced by read() when constructing the final parsed result, and
remove the later canonical normalization pass while preserving the existing
filtering and no-extractable-text behavior.
🪄 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: 4cfa8ff0-d182-4246-80d7-a78f9a529463

📥 Commits

Reviewing files that changed from the base of the PR and between 260fe16 and 276b617.

⛔ Files ignored due to path filters (2)
  • 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 (72)
  • apps/worker/src/main/java/com/orgmemory/worker/ingestion/DocumentParsingException.java
  • apps/worker/src/main/java/com/orgmemory/worker/ingestion/DocumentProcessingEngine.java
  • apps/worker/src/main/java/com/orgmemory/worker/ingestion/NativeSourceDocumentParser.java
  • apps/worker/src/main/java/com/orgmemory/worker/ingestion/ProcessedSourceDocument.java
  • apps/worker/src/main/java/com/orgmemory/worker/ingestion/SourceDocumentReader.java
  • apps/worker/src/main/java/com/orgmemory/worker/ingestion/SourceIngestionProcessor.java
  • apps/worker/src/main/java/com/orgmemory/worker/ingestion/SourceProcessingProperties.java
  • apps/worker/src/main/java/com/orgmemory/worker/ingestion/SpringAiKnowledgeTextChunker.java
  • apps/worker/src/main/resources/application.yml
  • apps/worker/src/test/java/com/orgmemory/worker/ingestion/SpringAiKnowledgeTextChunkerTests.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkProvenance.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkProvenanceFactory.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkTokenLimitExceededException.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkedText.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkerOptions.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkerPlugin.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkerRegistry.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkerRegistrySnapshot.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkingRequest.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/EncodedText.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/FixedTokenChunker.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/FixedTokenOptions.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ParagraphSemanticChunker.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ParagraphSemanticOptions.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/RecursiveCharacterChunker.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/RecursiveCharacterOptions.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/SemanticEmbeddingInvocationException.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/SemanticEmbeddingUnavailableException.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/SemanticVectorChunker.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/SemanticVectorOptions.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/SourceSpan.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/TextChunker.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/TextEmbeddingPort.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/TextTokenizer.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/TokenRangeLocator.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/CanonicalDocument.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/DocumentBlock.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/DocumentBlockKind.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/DocumentParseRequest.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/DocumentParseResult.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/DocumentParser.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/ParserPlugin.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/ParserRegistry.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/ParserRegistrySnapshot.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/ParserSpec.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/ParserUnavailableException.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/PassthroughParser.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/ReuseParser.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/processing/ProcessingComponentRef.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/processing/ResolvedDocumentProcessingProfile.java
  • components/graph-rag-testkit/src/main/java/com/orgmemory/graphrag/testkit/CodePointTokenizer.java
  • components/graph-rag-testkit/src/main/java/com/orgmemory/graphrag/testkit/DeterministicEmbeddingPort.java
  • components/graph-rag-testkit/src/test/java/com/orgmemory/graphrag/testkit/LightRagChunkerGoldenTests.java
  • components/graph-rag-testkit/src/test/java/com/orgmemory/graphrag/testkit/ProcessingRegistryConformanceTests.java
  • components/graph-rag-testkit/src/test/resources/lightrag-v1.5.4/fixed-token-golden.properties
  • core/src/main/java/com/orgmemory/core/knowledge/ConnectorSourceRevisionCoordinator.java
  • core/src/main/java/com/orgmemory/core/knowledge/DocumentProcessingProfileSnapshot.java
  • core/src/main/java/com/orgmemory/core/knowledge/KnowledgeChunkDraft.java
  • core/src/main/java/com/orgmemory/core/knowledge/KnowledgeChunkDraftAssembler.java
  • core/src/main/java/com/orgmemory/core/knowledge/KnowledgeChunkProjectionStore.java
  • core/src/main/java/com/orgmemory/core/knowledge/KnowledgeTextChunk.java
  • core/src/main/java/com/orgmemory/core/knowledge/KnowledgeTextChunker.java
  • core/src/main/java/com/orgmemory/core/knowledge/KnowledgeTextDocument.java
  • core/src/main/java/com/orgmemory/core/knowledge/SourceIngestionCoordinator.java
  • core/src/main/java/com/orgmemory/core/knowledge/SourceRevision.java
  • core/src/main/resources/db/migration/V30__document_processing_profiles_and_chunk_provenance.sql
  • integrations/graph-rag-spring-ai/build.gradle.kts
  • integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/JtokkitTextTokenizer.java
  • integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiTextEmbeddingPort.java
  • integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/TokenSourceMappingException.java
  • integrations/graph-rag-spring-ai/src/test/java/com/orgmemory/integrations/graphrag/springai/JtokkitTextTokenizerTests.java
  • integrations/graph-rag-spring-ai/src/test/java/com/orgmemory/integrations/graphrag/springai/SpringAiTextEmbeddingPortTests.java
💤 Files with no reviewable changes (4)
  • core/src/main/java/com/orgmemory/core/knowledge/KnowledgeTextChunker.java
  • apps/worker/src/test/java/com/orgmemory/worker/ingestion/SpringAiKnowledgeTextChunkerTests.java
  • core/src/main/java/com/orgmemory/core/knowledge/KnowledgeTextDocument.java
  • apps/worker/src/main/java/com/orgmemory/worker/ingestion/SpringAiKnowledgeTextChunker.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:

  • apps/worker/src/main/java/com/orgmemory/worker/ingestion/DocumentParsingException.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkerPlugin.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/ParserPlugin.java
  • components/graph-rag-testkit/src/test/resources/lightrag-v1.5.4/fixed-token-golden.properties
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/SemanticEmbeddingUnavailableException.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/TokenRangeLocator.java
  • integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/TokenSourceMappingException.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkTokenLimitExceededException.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/TextTokenizer.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkerOptions.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/ParserUnavailableException.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/processing/ProcessingComponentRef.java
  • core/src/main/resources/db/migration/V30__document_processing_profiles_and_chunk_provenance.sql
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/DocumentBlockKind.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/DocumentParser.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkingRequest.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/TextChunker.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/RecursiveCharacterOptions.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkerRegistry.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/TextEmbeddingPort.java
  • apps/worker/src/main/java/com/orgmemory/worker/ingestion/ProcessedSourceDocument.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkProvenance.java
  • apps/worker/src/main/resources/application.yml
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ParagraphSemanticOptions.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/DocumentParseResult.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkedText.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/ParserRegistry.java
  • components/graph-rag-testkit/src/main/java/com/orgmemory/graphrag/testkit/CodePointTokenizer.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/PassthroughParser.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/SourceSpan.java
  • core/src/main/java/com/orgmemory/core/knowledge/ConnectorSourceRevisionCoordinator.java
  • components/graph-rag-testkit/src/main/java/com/orgmemory/graphrag/testkit/DeterministicEmbeddingPort.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/SemanticEmbeddingInvocationException.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkProvenanceFactory.java
  • integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiTextEmbeddingPort.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/DocumentBlock.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/ParserSpec.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/ReuseParser.java
  • apps/worker/src/main/java/com/orgmemory/worker/ingestion/NativeSourceDocumentParser.java
  • integrations/graph-rag-spring-ai/src/test/java/com/orgmemory/integrations/graphrag/springai/JtokkitTextTokenizerTests.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkerRegistrySnapshot.java
  • core/src/main/java/com/orgmemory/core/knowledge/SourceIngestionCoordinator.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/DocumentParseRequest.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/ParserRegistrySnapshot.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/SemanticVectorOptions.java
  • integrations/graph-rag-spring-ai/src/test/java/com/orgmemory/integrations/graphrag/springai/SpringAiTextEmbeddingPortTests.java
  • apps/worker/src/main/java/com/orgmemory/worker/ingestion/SourceProcessingProperties.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/FixedTokenOptions.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/CanonicalDocument.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/EncodedText.java
  • core/src/main/java/com/orgmemory/core/knowledge/SourceRevision.java
  • components/graph-rag-testkit/src/test/java/com/orgmemory/graphrag/testkit/ProcessingRegistryConformanceTests.java
  • integrations/graph-rag-spring-ai/build.gradle.kts
  • core/src/main/java/com/orgmemory/core/knowledge/KnowledgeTextChunk.java
  • core/src/main/java/com/orgmemory/core/knowledge/DocumentProcessingProfileSnapshot.java
  • core/src/main/java/com/orgmemory/core/knowledge/KnowledgeChunkDraftAssembler.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/processing/ResolvedDocumentProcessingProfile.java
  • components/graph-rag-testkit/src/test/java/com/orgmemory/graphrag/testkit/LightRagChunkerGoldenTests.java
  • apps/worker/src/main/java/com/orgmemory/worker/ingestion/DocumentProcessingEngine.java
  • core/src/main/java/com/orgmemory/core/knowledge/KnowledgeChunkProjectionStore.java
  • integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/JtokkitTextTokenizer.java
  • core/src/main/java/com/orgmemory/core/knowledge/KnowledgeChunkDraft.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/FixedTokenChunker.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/SemanticVectorChunker.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ParagraphSemanticChunker.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/RecursiveCharacterChunker.java
  • apps/worker/src/main/java/com/orgmemory/worker/ingestion/SourceDocumentReader.java
  • apps/worker/src/main/java/com/orgmemory/worker/ingestion/SourceIngestionProcessor.java
**/*.{java,sql}

📄 CodeRabbit inference engine (CLAUDE.md)

Pair JPA schema changes with a Flyway migration.

Files:

  • apps/worker/src/main/java/com/orgmemory/worker/ingestion/DocumentParsingException.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkerPlugin.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/ParserPlugin.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/SemanticEmbeddingUnavailableException.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/TokenRangeLocator.java
  • integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/TokenSourceMappingException.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkTokenLimitExceededException.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/TextTokenizer.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkerOptions.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/ParserUnavailableException.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/processing/ProcessingComponentRef.java
  • core/src/main/resources/db/migration/V30__document_processing_profiles_and_chunk_provenance.sql
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/DocumentBlockKind.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/DocumentParser.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkingRequest.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/TextChunker.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/RecursiveCharacterOptions.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkerRegistry.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/TextEmbeddingPort.java
  • apps/worker/src/main/java/com/orgmemory/worker/ingestion/ProcessedSourceDocument.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkProvenance.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ParagraphSemanticOptions.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/DocumentParseResult.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkedText.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/ParserRegistry.java
  • components/graph-rag-testkit/src/main/java/com/orgmemory/graphrag/testkit/CodePointTokenizer.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/PassthroughParser.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/SourceSpan.java
  • core/src/main/java/com/orgmemory/core/knowledge/ConnectorSourceRevisionCoordinator.java
  • components/graph-rag-testkit/src/main/java/com/orgmemory/graphrag/testkit/DeterministicEmbeddingPort.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/SemanticEmbeddingInvocationException.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkProvenanceFactory.java
  • integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiTextEmbeddingPort.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/DocumentBlock.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/ParserSpec.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/ReuseParser.java
  • apps/worker/src/main/java/com/orgmemory/worker/ingestion/NativeSourceDocumentParser.java
  • integrations/graph-rag-spring-ai/src/test/java/com/orgmemory/integrations/graphrag/springai/JtokkitTextTokenizerTests.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkerRegistrySnapshot.java
  • core/src/main/java/com/orgmemory/core/knowledge/SourceIngestionCoordinator.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/DocumentParseRequest.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/ParserRegistrySnapshot.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/SemanticVectorOptions.java
  • integrations/graph-rag-spring-ai/src/test/java/com/orgmemory/integrations/graphrag/springai/SpringAiTextEmbeddingPortTests.java
  • apps/worker/src/main/java/com/orgmemory/worker/ingestion/SourceProcessingProperties.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/FixedTokenOptions.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/CanonicalDocument.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/EncodedText.java
  • core/src/main/java/com/orgmemory/core/knowledge/SourceRevision.java
  • components/graph-rag-testkit/src/test/java/com/orgmemory/graphrag/testkit/ProcessingRegistryConformanceTests.java
  • core/src/main/java/com/orgmemory/core/knowledge/KnowledgeTextChunk.java
  • core/src/main/java/com/orgmemory/core/knowledge/DocumentProcessingProfileSnapshot.java
  • core/src/main/java/com/orgmemory/core/knowledge/KnowledgeChunkDraftAssembler.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/processing/ResolvedDocumentProcessingProfile.java
  • components/graph-rag-testkit/src/test/java/com/orgmemory/graphrag/testkit/LightRagChunkerGoldenTests.java
  • apps/worker/src/main/java/com/orgmemory/worker/ingestion/DocumentProcessingEngine.java
  • core/src/main/java/com/orgmemory/core/knowledge/KnowledgeChunkProjectionStore.java
  • integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/JtokkitTextTokenizer.java
  • core/src/main/java/com/orgmemory/core/knowledge/KnowledgeChunkDraft.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/FixedTokenChunker.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/SemanticVectorChunker.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ParagraphSemanticChunker.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/RecursiveCharacterChunker.java
  • apps/worker/src/main/java/com/orgmemory/worker/ingestion/SourceDocumentReader.java
  • apps/worker/src/main/java/com/orgmemory/worker/ingestion/SourceIngestionProcessor.java
**/*.java

📄 CodeRabbit inference engine (CLAUDE.md)

JetBrains IDE inspection is a Java-backend gate only.

Files:

  • apps/worker/src/main/java/com/orgmemory/worker/ingestion/DocumentParsingException.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkerPlugin.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/ParserPlugin.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/SemanticEmbeddingUnavailableException.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/TokenRangeLocator.java
  • integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/TokenSourceMappingException.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkTokenLimitExceededException.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/TextTokenizer.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkerOptions.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/ParserUnavailableException.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/processing/ProcessingComponentRef.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/DocumentBlockKind.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/DocumentParser.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkingRequest.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/TextChunker.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/RecursiveCharacterOptions.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkerRegistry.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/TextEmbeddingPort.java
  • apps/worker/src/main/java/com/orgmemory/worker/ingestion/ProcessedSourceDocument.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkProvenance.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ParagraphSemanticOptions.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/DocumentParseResult.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkedText.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/ParserRegistry.java
  • components/graph-rag-testkit/src/main/java/com/orgmemory/graphrag/testkit/CodePointTokenizer.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/PassthroughParser.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/SourceSpan.java
  • core/src/main/java/com/orgmemory/core/knowledge/ConnectorSourceRevisionCoordinator.java
  • components/graph-rag-testkit/src/main/java/com/orgmemory/graphrag/testkit/DeterministicEmbeddingPort.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/SemanticEmbeddingInvocationException.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkProvenanceFactory.java
  • integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/SpringAiTextEmbeddingPort.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/DocumentBlock.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/ParserSpec.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/ReuseParser.java
  • apps/worker/src/main/java/com/orgmemory/worker/ingestion/NativeSourceDocumentParser.java
  • integrations/graph-rag-spring-ai/src/test/java/com/orgmemory/integrations/graphrag/springai/JtokkitTextTokenizerTests.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ChunkerRegistrySnapshot.java
  • core/src/main/java/com/orgmemory/core/knowledge/SourceIngestionCoordinator.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/DocumentParseRequest.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/ParserRegistrySnapshot.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/SemanticVectorOptions.java
  • integrations/graph-rag-spring-ai/src/test/java/com/orgmemory/integrations/graphrag/springai/SpringAiTextEmbeddingPortTests.java
  • apps/worker/src/main/java/com/orgmemory/worker/ingestion/SourceProcessingProperties.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/FixedTokenOptions.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/parsing/CanonicalDocument.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/EncodedText.java
  • core/src/main/java/com/orgmemory/core/knowledge/SourceRevision.java
  • components/graph-rag-testkit/src/test/java/com/orgmemory/graphrag/testkit/ProcessingRegistryConformanceTests.java
  • core/src/main/java/com/orgmemory/core/knowledge/KnowledgeTextChunk.java
  • core/src/main/java/com/orgmemory/core/knowledge/DocumentProcessingProfileSnapshot.java
  • core/src/main/java/com/orgmemory/core/knowledge/KnowledgeChunkDraftAssembler.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/processing/ResolvedDocumentProcessingProfile.java
  • components/graph-rag-testkit/src/test/java/com/orgmemory/graphrag/testkit/LightRagChunkerGoldenTests.java
  • apps/worker/src/main/java/com/orgmemory/worker/ingestion/DocumentProcessingEngine.java
  • core/src/main/java/com/orgmemory/core/knowledge/KnowledgeChunkProjectionStore.java
  • integrations/graph-rag-spring-ai/src/main/java/com/orgmemory/integrations/graphrag/springai/JtokkitTextTokenizer.java
  • core/src/main/java/com/orgmemory/core/knowledge/KnowledgeChunkDraft.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/FixedTokenChunker.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/SemanticVectorChunker.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/ParagraphSemanticChunker.java
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/RecursiveCharacterChunker.java
  • apps/worker/src/main/java/com/orgmemory/worker/ingestion/SourceDocumentReader.java
  • apps/worker/src/main/java/com/orgmemory/worker/ingestion/SourceIngestionProcessor.java
**/*.{yml,yaml,properties}

📄 CodeRabbit inference engine (CLAUDE.md)

Keep ddl-auto=validate in application configuration.

Files:

  • components/graph-rag-testkit/src/test/resources/lightrag-v1.5.4/fixed-token-golden.properties
  • 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/V30__document_processing_profiles_and_chunk_provenance.sql
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/ConnectorSourceRevisionCoordinator.java
  • core/src/main/java/com/orgmemory/core/knowledge/SourceIngestionCoordinator.java
  • core/src/main/java/com/orgmemory/core/knowledge/SourceRevision.java
  • core/src/main/java/com/orgmemory/core/knowledge/KnowledgeTextChunk.java
  • core/src/main/java/com/orgmemory/core/knowledge/DocumentProcessingProfileSnapshot.java
  • core/src/main/java/com/orgmemory/core/knowledge/KnowledgeChunkDraftAssembler.java
  • core/src/main/java/com/orgmemory/core/knowledge/KnowledgeChunkProjectionStore.java
  • core/src/main/java/com/orgmemory/core/knowledge/KnowledgeChunkDraft.java
🪛 ast-grep (0.44.1)
components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/SemanticVectorOptions.java

[warning] 26-26: Regular expression is compiled from a non-literal, possibly user-controlled value. A crafted regex (or input matched against one) can trigger catastrophic backtracking and hang the thread (ReDoS). Use a hardcoded literal pattern, wrap untrusted text with Pattern.quote(...), or validate/length-limit the input and enforce a matching timeout before passing it to Pattern.compile / String.matches / String.replaceAll / String.replaceFirst.
Context: Pattern.compile(sentenceSplitRegex)
Note: [CWE-1333] Inefficient Regular Expression Complexity.

(redos-non-literal-regex-java)

components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/SemanticVectorChunker.java

[warning] 40-40: Regular expression is compiled from a non-literal, possibly user-controlled value. A crafted regex (or input matched against one) can trigger catastrophic backtracking and hang the thread (ReDoS). Use a hardcoded literal pattern, wrap untrusted text with Pattern.quote(...), or validate/length-limit the input and enforce a matching timeout before passing it to Pattern.compile / String.matches / String.replaceAll / String.replaceFirst.
Context: Pattern.compile(options.sentenceSplitRegex())
Note: [CWE-1333] Inefficient Regular Expression Complexity.

(redos-non-literal-regex-java)

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

[warning] 3-3: 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] 4-13: 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] 16-16: 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] 17-17: 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] 18-18: 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] 19-19: 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] 20-31: 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] 32-34: 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 (59)
components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/SourceSpan.java (1)

1-10: LGTM!

integrations/graph-rag-spring-ai/build.gradle.kts (1)

8-8: LGTM!

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

23-49: LGTM!

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

3-7: LGTM!

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

37-68: LGTM!

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

14-31: LGTM!

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

18-42: LGTM!

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

21-40: LGTM!

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

17-30: LGTM!

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

34-64: LGTM!

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

8-38: LGTM!

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

3-10: LGTM!

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

6-35: LGTM!

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

7-19: LGTM!

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

5-11: LGTM!

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

3-7: LGTM!

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

5-15: LGTM!

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

3-12: LGTM!

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

29-233: LGTM!

components/graph-rag-testkit/src/test/resources/lightrag-v1.5.4/fixed-token-golden.properties (1)

1-7: LGTM!

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

11-33: LGTM!

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

29-49: LGTM!

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

17-43: LGTM!

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

3-8: LGTM!

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

7-24: LGTM!

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

3-21: LGTM!

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

20-104: LGTM!

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

6-13: LGTM!

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

8-13: LGTM!

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

1-25: LGTM!

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

1-32: LGTM!

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

41-135: LGTM!

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

1-17: LGTM!

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

1-7: LGTM!

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

13-33: LGTM!

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

26-51: LGTM!

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

23-55: LGTM!

Also applies to: 65-93

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

1-49: LGTM!

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

14-36: LGTM!

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

9-25: LGTM!

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

26-92: LGTM!

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

15-21: LGTM!

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

13-20: LGTM!

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

26-249: LGTM!

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

26-27: 🚀 Performance & Scalability | ⚡ Quick win

Retain and reuse the compiled sentence-split Pattern. SemanticVectorOptions compiles the regex only to validate it and discards the result, so SemanticVectorChunker recompiles the same pattern on every chunk() invocation. Compile once and reuse to avoid the redundant work and keep the ReDoS surface in a single validated place.

  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/SemanticVectorOptions.java#L26-L27: store the compiled Pattern (e.g., an additional field or a package-visible accessor) instead of discarding Pattern.compile(sentenceSplitRegex).
  • components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/SemanticVectorChunker.java#L40-L41: use the pre-compiled Pattern from options rather than calling Pattern.compile(options.sentenceSplitRegex()) again.
components/graph-rag-core/src/main/java/com/orgmemory/graphrag/chunking/SemanticEmbeddingInvocationException.java (1)

3-8: LGTM!

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

3-8: LGTM!

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

100-104: 🩺 Stability & Availability

No change needed. DocumentBlock.headingLevel rejects values outside 1..6, so the fixed-size heading array is protected at construction time.

apps/worker/src/main/java/com/orgmemory/worker/ingestion/DocumentParsingException.java (1)

1-9: LGTM!

apps/worker/src/main/java/com/orgmemory/worker/ingestion/NativeSourceDocumentParser.java (1)

15-40: LGTM!

apps/worker/src/main/java/com/orgmemory/worker/ingestion/SourceIngestionProcessor.java (1)

247-259: 🗄️ Data Integrity & Integration

Confirm canonical/normalized text is the intended "raw" payload for revision hashing.

registerRawSource now sources its content from parsed.document().content() — the canonicalized text — rather than the original uploaded bytes. Per KnowledgeIngestionService, this content is hashed into payloadSha and used to detect "same revision" uploads. If parsing/normalization is not perfectly deterministic across re-processing, or if two distinct source files normalize to the same canonical text, revision identity and evidence provenance could be affected. Please confirm this is intentional given the "raw source" naming implies original bytes.

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

68-78: LGTM!

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

10-45: LGTM!

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

13-47: LGTM!

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

40-52: LGTM!

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

18-38: LGTM!

Also applies to: 92-118

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

6-25: LGTM!

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

69-93: LGTM!

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

78-82: LGTM!

Also applies to: 164-181, 271-277

@kl3inIT

kl3inIT commented Jul 23, 2026

Copy link
Copy Markdown
Owner Author

Addressed the completed CodeRabbit pass in commit 4b74733:

  • reject definite chunk overflow before semantic embedding
  • quarantine deterministic empty chunks
  • use Apache Tika charset detection and normalize text once
  • make plugin options extensible and registry lookup locale-invariant
  • preserve chunk boundary whitespace and enforce LF canonical text
  • verify processing-profile digests and stop claiming raw hashes as canonical hashes
  • add non-blocking constraint creation plus a validation migration
  • make JTokkit windows Unicode-safe and validate embedding route IDs
  • add focused regression coverage for each boundary

The parser-priority comment was verified as a false positive and answered inline: the registry is insertion ordered and findFirst() selects legacy; worker configuration also defaults to explicit legacy.

Full local gate after fixes: ./gradlew.bat --no-daemon clean test — green.

@kl3inIT
kl3inIT merged commit c4908ea into light-rag Jul 23, 2026
5 checks passed
@kl3inIT
kl3inIT deleted the kl3inIT/light-rag-pr03-parser-chunker branch July 23, 2026 19:56
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