Skip to content

test: stress bounded native pattern cache - #120

Open
jbachorik wants to merge 1 commit into
agent/logs-reggie-l1jfrom
agent/logs-reggie-l1k
Open

test: stress bounded native pattern cache#120
jbachorik wants to merge 1 commit into
agent/logs-reggie-l1jfrom
agent/logs-reggie-l1k

Conversation

@jbachorik

Copy link
Copy Markdown
Collaborator

Summary

Adds deterministic high-cardinality stress coverage for the bounded native pattern compiler cache.

  • 128 unique sequential native admissions and 400 concurrent admissions remain bounded at configured capacity.
  • Eviction is proven by recompiling the oldest key with a new identity.
  • Legacy static compiler caches remain unchanged; evicted-but-held patterns still match guarded input without materialization.

Validation

  • ./gradlew :reggie-runtime:test --tests com.datadoghq.reggie.runtime.ReggieCompiledPatternCacheCardinalityTest
  • ./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

Adds deterministic stress tests to validate that the instance-owned, bounded native pattern compiler cache remains capped at its configured capacity under high-cardinality sequential and concurrent admissions, while ensuring legacy RuntimeCompiler static caches are not mutated.

Changes:

  • Introduces a sequential high-cardinality test proving cache plateauing and eviction via identity change on recompilation of the oldest key.
  • Adds a concurrent admission stress test ensuring the cache remains bounded and legacy caches remain unchanged.
  • Verifies evicted-but-still-referenced compiled patterns can still match without materializing the input (guarded CharSequence).

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

@datadog-datadog-prod-us1

This comment has been minimized.

@jbachorik
jbachorik marked this pull request as ready for review August 14, 2026 12:55
@jbachorik
jbachorikforce-pushed the agent/logs-reggie-l1k branch from 31ae00b to ab94994CompareAugust 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 (c3fcc3e) to head (61206a8).

Additional details and impacted files
@@ Coverage Diff @@## agent/logs-reggie-l1j #120 +/- ##
=======================================================
Coverage 84.5% 84.5% Complexity 1 1 =======================================================
Files 156 156 Lines 43277 43277 Branches 5910 5910 =======================================================
Hits 36571 36571 Misses 4913 4913 Partials 1793 1793 

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 c3fcc3e...61206a8. 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-l1k branch from ab94994 to 7d6c90cCompareAugust 14, 2026 13:34
@jbachorik
jbachorikforce-pushed the agent/logs-reggie-l1k branch from 7d6c90c to 61206a8CompareAugust 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