Add codec spec DSL and configuration plumbing - #19284
Open
xiangfu0 wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds the codec-spec DSL and configuration plumbing while keeping codec execution disabled.
Changes:
- Adds bounded parsing and immutable codec AST types.
- Adds
codecSpecto forward-index configuration. - Adds fail-closed validation across creation, loading, preprocessing, and realtime paths.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
ForwardIndexConfig.java |
Adds codec-spec configuration support. |
CodecSpecParser.java |
Parses and canonicalizes the DSL. |
CodecPipeline.java |
Represents ordered codec stages. |
CodecInvocation.java |
Represents individual codec calls. |
ForwardIndexType.java |
Reconciles configuration and rejects activation. |
ForwardIndexReaderFactory.java |
Adds reader-side rejection. |
ForwardIndexCreatorFactory.java |
Adds creator-side rejection. |
ForwardIndexHandler.java |
Rejects preprocessing with codec specs. |
ForwardIndexConfigTest.java |
Tests configuration behavior. |
CodecSpecParserTest.java |
Tests parsing and limits. |
CodecPipelineTest.java |
Tests pipeline immutability. |
CodecInvocationTest.java |
Tests invocation validation. |
TableConfigUtilsTest.java |
Tests table validation. |
ForwardIndexHandlerTest.java |
Tests preprocessing rejection. |
ForwardIndexTypeTest.java |
Tests reconciliation and mutable indexes. |
ForwardIndexReaderFactoryTest.java |
Tests reader rejection. |
ForwardIndexCreatorFactoryTest.java |
Tests creator rejection. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #19284 +/- ##
============================================
+ Coverage 67.09% 67.11% +0.02%
Complexity 1424 1424
============================================
Files 3459 3462 +3
Lines 219789 219986 +197
Branches 35007 35059 +52
============================================
+ Hits 147457 147654 +197
+ Misses 60543 60526 -17
- Partials 11789 11806 +17
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
xiangfu0
force-pushed
the
xiangfu0/codex/codec-stack/01-config
branch
from
August 18, 2026 02:46
e83ed0e to
1c5df46
Compare
xiangfu0
force-pushed
the
xiangfu0/codex/codec-stack/01-config
branch
from
August 18, 2026 07:21
1c5df46 to
ad52533
Compare
xiangfu0
marked this pull request as ready for review
August 18, 2026 07:23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
This is the bottom layer extracted from #18229 after the request to split the codec-pipeline work and land the DSL plus configuration wiring first.
Native GitHub stack:
What changed
CODEC(...)form with an ordered invocation list such asDELTA,ZSTD(3).indexes.forward.codecSpecsupport toForwardIndexConfig, including JSON, builder, copy, equality, RAW-only validation, and mutual exclusion with legacycompressionCodec.noDictionaryand top-level compression signals with the nested forward-index config.Safety and compatibility
This layer does not activate
codecSpecand does not change any on-disk format. Every non-null spec is deliberately rejected before a reader, writer, or mutable index can silently ignore it. Activation will be a later stacked PR after the runtime and reader/writer lifecycle are reviewable.The unreleased
CODEC(...)syntax is intentionally not retained as an alias.Tests
ForwardIndexConfigtestspinot-segment-spiandpinot-segment-local