Skip to content

chore(agents): add dd-trace-java overrides for dd-apm-sdk-review - #12460

Closed
robertomonteromiguel wants to merge 31 commits into
robertomonteromiguel/dd-apm-sdk-review-core-copyfrom
robertomonteromiguel/dd-apm-sdk-review-java-overrides
Closed

robertomonteromiguel wants to merge 31 commits into
robertomonteromiguel/dd-apm-sdk-review-core-copyfrom
robertomonteromiguel/dd-apm-sdk-review-java-overrides

Conversation

@robertomonteromiguel

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds the dd-trace-java layer on top of the shared skill copy.

  • .agents/dd-apm-sdk-review-overrides/ — Java reviewer facts (performance, conventions, design, security, maintainability, repo context)
  • AGENTS.md — short hook: local agents run the skill; Codex reads review-without-harness.md
  • .llm-validation/ — cases that exercise those rules, plus the GitLab "llm validation" include
  • Replaces the retired /perf-review skill (deleted here; its Java-specific rubric lives in the performance override)

Stacked on the core-copy PR. Shared skill source: dd-apm-sdk-review-core#1.

Motivation

This is the half of #12364 that Java reviewers should actually read.

Additional Notes

How to review

  • Start here: .agents/dd-apm-sdk-review-overrides/
  • Then: the AGENTS.md Review Guidelines block
  • Then: .llm-validation/ if you care about the gate
  • Skip .agents/skills/dd-apm-sdk-review/ — that is the parent PR / core repo

Merge with the parent skill-copy PR, not as a standalone.

Made with Cursor

Mirror the shared skill plus Claude/Cursor links. Repo-specific
overrides and the perf-review replacement land in the follow-up.
Repo-specific reviewer facts, AGENTS.md hook, llm-validation suite,
and replace the retired perf-review skill. Stacked on the verbatim
skill copy.
The previous commit copied .gitlab-ci.yml from the old combined
branch and dropped unrelated master changes.
@robertomonteromiguel

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: 2ab24b4dc9

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@datadog-datadog-prod-us1

This comment has been minimized.

@dd-octo-sts

dd-octo-sts Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 14.02 s 14.02 s [-1.0%; +0.9%] (no difference)
startup:insecure-bank:tracing:Agent 12.93 s 12.99 s [-1.2%; +0.3%] (no difference)
startup:petclinic:appsec:Agent 17.67 s 17.57 s [-0.4%; +1.4%] (no difference)
startup:petclinic:iast:Agent 17.44 s 17.59 s [-1.6%; -0.1%] (maybe better)
startup:petclinic:profiling:Agent 17.62 s 17.42 s [-0.1%; +2.4%] (no difference)
startup:petclinic:sca:Agent 17.09 s 17.51 s [-6.6%; +1.8%] (no difference)
startup:petclinic:tracing:Agent 16.64 s 16.72 s [-1.4%; +0.5%] (no difference)

Commit: d7c647dc · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

Bring in the portable gh --repo pin, optional repo-context, and
.claude/.cursor instruction-only shortcut without tracer-specific edits.
Keep the stacked overrides branch on the latest verbatim skill copy.
Use the current platform SHA for the GitLab include and the job clone.
@robertomonteromiguel

Copy link
Copy Markdown
Contributor Author

@codex review

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f8f15a0d73

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread .llm-validation/config.yaml Resolved
Load the data-not-instructions rule before repo-context.md.
Keep the stacked overrides branch on the latest verbatim skill copy.
Evaluate crash-handler ordering as a security-lens report, not the
orchestrator's redacted output. Require firstSpanWritten to reset on
the payload-flush hook, not at every map().
@robertomonteromiguel

Copy link
Copy Markdown
Contributor Author

@codex review

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7a96d17e1f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Scan PR title, labels, and commit subjects before printing, using
the same SECRET_GREP path as the diffs.
Don't flag feature-flagging modules against an aspirational -lib split;
point J1 at EscapeShapeBenchmark; make the HashMap fixture lookup-only.
Also merge the skill-copy secret-scan sync.
…robertomonteromiguel/dd-apm-sdk-review-java-overrides
@robertomonteromiguel

Copy link
Copy Markdown
Contributor Author

@codex review

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 84bb97ad43

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@pr-commenter

pr-commenter Bot commented Sep 11, 2026 •

Copy link
Copy Markdown

LLM Validation

LLM Validation Gate — dd-apm-sdk-review

✅ PASS

  • No blocking-case regressions; the quality change is within noise (baseline/candidate confidence intervals overlap).

Analysis

Changed instruction file(s): .agents/skills/dd-apm-sdk-review/SKILL.md, .agents/skills/dd-apm-sdk-review/reviewers/_common.md, .agents/skills/dd-apm-sdk-review/reviewers/correctness.md, .agents/skills/dd-apm-sdk-review/reviewers/performance.md, .agents/skills/dd-apm-sdk-review/reviewers/report-template.md, .agents/skills/dd-apm-sdk-review/review-without-harness.md, .agents/skills/dd-apm-sdk-review/reviewers/coherence.md, .agents/skills/dd-apm-sdk-review/reviewers/design.md, .agents/skills/dd-apm-sdk-review/reviewers/maintainability.md, .agents/skills/dd-apm-sdk-review/reviewers/conventions.md, .agents/skills/dd-apm-sdk-review/reviewers/cross-sdk.md, .agents/dd-apm-sdk-review-overrides/repo-context.md, .agents/dd-apm-sdk-review-overrides/reviewers/performance.md, .agents/dd-apm-sdk-review-overrides/reviewers/design.md, .agents/dd-apm-sdk-review-overrides/reviewers/conventions.md, .agents/dd-apm-sdk-review-overrides/reviewers/maintainability.md.

No safety or blocking-case regressions across 7 case(s). Overall pairwise win-rate 70% [61%–78%], quality +4.6 — see the verdict above for whether that clears the noise band.

Results

  • Pairwise win-rate: 70% [61%–78%] — candidate's share of blind comparisons (90% CI; spanning 50% = no clear difference)
  • Overall quality: 82.6 → 87.2 (/100, +4.6)
  • Bad signals introduced (advisory): 0
  • Candidate criteria coverage (advisory): 31/31 (100%) — expected_criteria the candidate met; does not affect the gate
  • Blocking-case regressions: 0

Cases

Case Mode Quality Δ Win-rate (90% CI) Safety
java-perf-lens-wrong-collection-001 block -0.8 50% [50%–50%] ok
java-perf-pipeline-full-review-002 block +15.8 75% [51%–99%] ok
java-correctness-capture-before-send block +10.8 88% [67%–100%] ok
java-correctness-sqs-queue-name-incomplete block -5.8 50% [16%–84%] ok
java-maintainability-resource-leak-streams block +11.3 100% [100%–100%] ok
java-correctness-span-events-list-only block +1.2 75% [51%–99%] ok
java-correctness-mapper-state-leak block -0.4 50% [50%–50%] ok

Per-dimension scores, token usage, latency, and estimated cost are in the CI job logs.

Auto-instrumentations still require InstrumenterModule; product
transformers do not. The full-review fixture now states the J10/J12
preconditions the performance override already requires.
@robertomonteromiguel

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 8cbdbb070e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@robertomonteromiguel
robertomonteromiguel marked this pull request as ready for review September 11, 2026 14:44
@robertomonteromiguel robertomonteromiguel added tag: no release notes Changes to exclude from release notes tag: ai generated Largely based on code generated by an AI or LLM type: feature Enhancements and improvements labels Sep 14, 2026
…robertomonteromiguel/dd-apm-sdk-review-java-overrides
Verbatim copy: binary secret-scan fail-closed, LC_ALL=C git diff,
and private routing for no-harness security findings.
…robertomonteromiguel/dd-apm-sdk-review-java-overrides
The full-skill run was losing the gate to an uninstructed baseline.
Evaluate firstSpanWritten the same way as the JS correctness cases.
The security override already calls this P0; the eval case should
not accept P1.
@bric3
bric3 added this pull request to stack #12505 September 15, 2026 12:29
@robertomonteromiguel

Copy link
Copy Markdown
Contributor Author

@codex review

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a41fdff152

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread .llm-validation/README.md Resolved
First-parent stacked parent, Cross-SDK system-tests/docs evidence.
Take the verbatim skill from the copy so the stacked PR no longer
conflicts on SKILL.md / reviewers.
Pick up 22 commits including the perf-review update so the stacked
copy PR is not stale against master.
Copy now includes master. Keep the perf-review deletion from this
branch; that replacement is the overrides PR, not the verbatim copy.
@robertomonteromiguel

Copy link
Copy Markdown
Contributor Author

@codex review

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bf40eaddb1

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Restore the @NoEscape field-storage check the retired perf-review skill
owned, split Agent.start() from the very-early premain ban, and stop
treating a source-level Optional return as proven escape. The lens eval
now requires a cache bound and covers J10; the README gate count is 7.

Co-authored-by: Cursor <cursoragent@cursor.com>
The gate lost to a baseline that reviewed TraceMapperV0_4.java, where
reset() already clears firstSpanWritten. Keep the bug in the snippet.

Co-authored-by: Cursor <cursoragent@cursor.com>
@dougqh

dougqh commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Back-test: new Performance lens vs. existing perf-review corpus

I ran the new dd-apm-sdk-review Performance lens (#12459's core doc + this PR's Java override) against my private back-test corpus previously used to validate the old /perf-review skill — 21 blind, context-free review passes (fresh sessions, given only the lens docs + a diff, no repo access), scored for precision, recall, and nuance.

Result: ~19–20 of 21 correct.

  • Recall (known true-positive cases): 6/6 flagged, one partial divergence on which specific sub-finding got surfaced.
  • Precision (known true-negative/silent cases): 10/11 correctly silent; one soft false positive that self-hedged to low severity rather than firing loudly.
  • Nuance (severity-demotion, resolve-via-sink, cold-path, correctness-vs-performance routing, same-diff discrimination between a real issue and decoys): all passed cleanly.

No SEV-1 misses, no false-positive spam. Comparable to (or slightly better than) the old /perf-review skill's reconciled full-pass performance on the same corpus.

🤖 Generated with Claude Code

@robertomonteromiguel
robertomonteromiguel marked this pull request as draft September 18, 2026 15:09
@robertomonteromiguel
robertomonteromiguel deleted the robertomonteromiguel/dd-apm-sdk-review-java-overrides branch October 13, 2026 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: tooling Build & Tooling tag: ai generated Largely based on code generated by an AI or LLM tag: no release notes Changes to exclude from release notes type: feature Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants