Uh oh!
There was an error while loading. Please reload this page.
feat: add native full capture spans - #121
Conversation
There was a problem hiding this comment.
Pull request overview
This PR extends the native linear-token-sequence (LTS) admission path to a conservative full-capture profile, exposing numeric capture spans (groupCount(), start(int), end(int)) while remaining native-only (no JDK fallback) and keeping the legacy/general compiler caches isolated.
Changes:
- Add a direct “full-capture LTS” compilation path in
RuntimeCompiler, with stricter admission checks around capture layout and deterministic boundaries. - Expose numeric capture-group span APIs on
ReggieMatchStateand expand runtime tests to validate JDK-equivalent numeric spans (including unmatched optional captures) and cache isolation. - Add AST-level validation (
CaptureProjection.fullCaptureLayout) and update documentation describing the July 2026 adoption progress and remaining work.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| reggie-runtime/src/test/java/com/datadoghq/reggie/runtime/ReggieCompiledPatternTest.java | Adds/updates tests for numeric spans, rejection shapes, DOTALL behavior, cache isolation, and input mutation safety. |
| reggie-runtime/src/test/java/com/datadoghq/reggie/runtime/InterruptibleCharSequenceTest.java | Adjusts interruption regression coverage to avoid now-rejected alternation shapes under full-capture admission. |
| reggie-runtime/src/main/java/com/datadoghq/reggie/runtime/RuntimeCompiler.java | Implements full-capture LTS admission and supporting deterministic-boundary/capture-layout validation. |
| reggie-runtime/src/main/java/com/datadoghq/reggie/runtime/ReggieNativeCapability.java | Updates capability documentation to refer to full-capture LTS. |
| reggie-runtime/src/main/java/com/datadoghq/reggie/runtime/ReggieMatchState.java | Adds groupCount(), start(int), and end(int) for numeric source capture spans. |
| reggie-runtime/src/main/java/com/datadoghq/reggie/runtime/ReggieCompileFlag.java | Updates documentation to reflect the full-capture LTS flag profile. |
| reggie-runtime/src/main/java/com/datadoghq/reggie/runtime/ReggieCompiledPattern.java | Routes native compilation through the new full-capture LTS admission. |
| reggie-runtime/src/main/java/com/datadoghq/reggie/runtime/ReggieCompilationResult.java | Updates documentation to reflect full-capture native compilation. |
| reggie-runtime/src/main/java/com/datadoghq/reggie/runtime/ReggieCompilationRejection.java | Adds MISSING_CAPTURE to represent missing numeric capture preservation requirements. |
| reggie-codegen/src/main/java/com/datadoghq/reggie/codegen/analysis/CaptureProjection.java | Adds fullCaptureLayout to validate a conservative numeric capture layout at the AST level. |
| doc/plans/logs-backend.md | Updates migration/adoption planning documentation and clarifies current capabilities/limitations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:cea7e08975
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
cea7e08 to
e90972aCompareCodecov Report❌ Patch coverage is ❌ Your patch status has failed because the patch coverage (63.9%) is below the target coverage (70.0%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@## agent/logs-reggie-l1k #121 +/- ##
=========================================================
- Coverage 84.5% 84.4% -0.1%
Complexity 1 1 =========================================================
Files 156 156 Lines 43277 43460 +183 Branches 5910 5985 +75 =========================================================
+ Hits 36571 36702 +131 - Misses 4913 4917 +4 - Partials 1793 1841 +48
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
e90972a to
7a80c41Compare7a80c41 to
ba547cbCompare
Adds a conservative direct native full-capture LTS profile for the logs migration stack.\n\n- preserves numeric spans for admitted source captures\n- fails closed on unproven capture/control-flow transforms\n- keeps legacy named-only routing and caches isolated\n\nValidation: spotlessApply; focused runtime tests; :reggie-runtime:test.