Skip to content

feat: expose native pattern capabilities - #119

Open
jbachorik wants to merge 1 commit into
agent/logs-reggie-l1hfrom
agent/logs-reggie-l1j
Open

feat: expose native pattern capabilities#119
jbachorik wants to merge 1 commit into
agent/logs-reggie-l1hfrom
agent/logs-reggie-l1j

Conversation

@jbachorik

Copy link
Copy Markdown
Collaborator

Summary

Exposes explicit immutable capabilities for native named-LTS compiled patterns:

  • native-only execution;
  • native-algorithm linearity, scoped to caller-controlled sequence cost;
  • caller-thread cooperative interruptible CharSequence matching.

The capability set is stable across direct compilation, bounded-cache hits, eviction/recompile, and independent compiler instances.

Validation

  • ./gradlew :reggie-runtime:test --tests com.datadoghq.reggie.runtime.ReggieNativeCapabilityTest --tests com.datadoghq.reggie.runtime.InterruptibleCharSequenceTest
  • ./gradlew :reggie-runtime:test
  • ./gradlew spotlessApply
  • final implementation-plan validation: clean
  • final independent code review: clean

CopilotAI 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.

Pull request overview

This PR introduces an explicit, immutable “capabilities” surface for native named-LTS compiled patterns, and extends tests to ensure those capabilities remain stable across compilation paths and that interruptibility checks execute on the caller thread.

Changes:

  • Add ReggieNativeCapability enum to represent guaranteed properties of native named-LTS patterns.
  • Expose ReggieCompiledPattern.capabilities() returning a shared immutable capability set.
  • Add/extend runtime tests covering capability stability (direct compile, cached compile, eviction/recompile, separate compiler instances) and verifying interrupt checks run on the matching caller thread.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

FileDescription
reggie-runtime/src/main/java/com/datadoghq/reggie/runtime/ReggieNativeCapability.javaDefines the stable capability enum and documents interruptibility/linearity guarantees.
reggie-runtime/src/main/java/com/datadoghq/reggie/runtime/ReggieCompiledPattern.javaExposes an immutable capability set via capabilities().
reggie-runtime/src/test/java/com/datadoghq/reggie/runtime/ReggieNativeCapabilityTest.javaAdds coverage for capability immutability and stability across caching/eviction/compiler instances.
reggie-runtime/src/test/java/com/datadoghq/reggie/runtime/InterruptibleCharSequenceTest.javaAdds a test asserting interruption checks run on the matching caller thread.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jbachorik
jbachorik marked this pull request as ready for review August 14, 2026 12:55

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:d08019ddde

ℹ️ 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".

@jbachorik
jbachorikforce-pushed the agent/logs-reggie-l1j branch from d08019d to 2e68756CompareAugust 14, 2026 13:05
@codecov-commenter

codecov-commenter commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.5%. Comparing base (9d259b3) to head (c3fcc3e).

Additional details and impacted files
@@ Coverage Diff @@## agent/logs-reggie-l1h #119 +/- ##
=======================================================
Coverage 84.4% 84.5% Complexity 1 1 =======================================================
Files 155 156 +1 Lines 43283 43277 -6 Branches 5910 5910 =======================================================
Hits 36571 36571 + Misses 4918 4913 -5 + Partials 1794 1793 -1 
Files with missing linesCoverage Δ
...atadoghq/reggie/runtime/ReggieCompiledPattern.java100.0% <100.0%> (+30.0%)⬆️
.../reggie/runtime/ReggieCompiledPatternCompiler.java85.7% <100.0%> (-1.2%)⬇️
...tadoghq/reggie/runtime/ReggieNativeCapability.java100.0% <100.0%> (ø)

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9d259b3...c3fcc3e. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jbachorik
jbachorikforce-pushed the agent/logs-reggie-l1j branch 2 times, most recently from 6e38c24 to 64923c1CompareAugust 14, 2026 13:34
@jbachorik
jbachorikforce-pushed the agent/logs-reggie-l1j branch from 64923c1 to c3fcc3eCompareAugust 14, 2026 13:42
Sign up for freeto 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.

3 participants

@jbachorik@codecov-commenter