Skip to content

Fix invalid shaded helper package names - #12925

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
masterfrom
mcculls/fix-jakarta-jms-shading
Oct 20, 2026
Merged

gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
masterfrom
mcculls/fix-jakarta-jms-shading

Conversation

@mcculls

@mcculls mcculls commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

What Does This Do

Encode advice relocation hashes as hexadecimal when generating shaded helper package names, preserving all hash bits while keeping the generated segment a valid Java identifier.

Motivation

The signed decimal hash could introduce a hyphen into helper package names. For the javax-to-jakarta relocation, this produced shaded-1796220700, an invalid Java identifier that could break code generation referencing the helper.

Additional Notes

Added regression coverage for Jakarta JMS helper names and references, plus zero, positive, and Integer.MIN_VALUE hashes.

Validation: all four cases in AdviceShaderTest pass; Spotless formatting applied.

Jira ticket: APMS-20809

@mcculls mcculls added type: bug fix Bug fix inst: jms JMS instrumentation tag: ai generated Largely based on code generated by an AI or LLM labels Oct 18, 2026
@mcculls
mcculls marked this pull request as ready for review October 18, 2026 18:54
@mcculls
mcculls requested a review from a team as a code owner October 18, 2026 18:54
@mcculls
mcculls requested review from bric3 and removed request for a team October 18, 2026 18:54
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-18T18:54:24.264671Z 55f5888 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-18T18:56:52.589436Z 55f5888 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@datadog-prod-us1-5 datadog-prod-us1-5 Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: PASS

More details

Hexadecimal encoding makes negative relocation hashes valid in Java package names while keeping helper injection and reference remapping consistent. The static reviewer identified no actionable regressions.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 55f5888

@datadog-prod-us1-5

This comment has been minimized.

@dd-octo-sts

dd-octo-sts Bot commented Oct 18, 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 13.93 s 13.83 s [+0.1%; +1.3%] (maybe worse)
startup:insecure-bank:tracing:Agent 12.84 s 13.00 s [-1.8%; -0.7%] (maybe better)
startup:petclinic:appsec:Agent 17.07 s 16.94 s [-0.1%; +1.8%] (no difference)
startup:petclinic:iast:Agent 16.89 s 16.97 s [-1.3%; +0.4%] (no difference)
startup:petclinic:profiling:Agent 16.58 s 16.64 s [-1.4%; +0.6%] (no difference)
startup:petclinic:sca:Agent 16.97 s 16.79 s [+0.2%; +1.9%] (maybe worse)
startup:petclinic:tracing:Agent 15.98 s 16.08 s [-1.4%; +0.2%] (no difference)

Commit: d7185a80 · 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.

@mcculls
mcculls force-pushed the mcculls/fix-jakarta-jms-shading branch from 55f5888 to 288f0d7 Compare October 19, 2026 09:30
Advice shading appended the signed relocation hash directly to helper package names.
Negative hashes introduced a hyphen into the generated package segment, making it an
invalid Java identifier and potentially breaking code generation that referenced it.

Encode the hash as hexadecimal to keep every generated package segment valid while
preserving all hash bits. Add regression coverage for Jakarta JMS helper references
and zero, positive, and minimum integer hashes.
@mcculls
mcculls force-pushed the mcculls/fix-jakarta-jms-shading branch from 288f0d7 to d7185a8 Compare October 19, 2026 10:24
@mcculls
mcculls requested a review from amarziali October 19, 2026 15:41
@mcculls
mcculls added this pull request to the merge queue Oct 20, 2026
@dd-octo-sts

dd-octo-sts Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-10-20 22:09:59 UTC ℹ️ Start processing command /merge


2026-10-20 22:10:03 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in master is approximately 1h (p90).


2026-10-20 23:23:46 UTC ℹ️ MergeQueue: This merge request was merged

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 20, 2026
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit d87fe11 into master Oct 20, 2026
609 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the mcculls/fix-jakarta-jms-shading branch October 20, 2026 23:23
@github-actions github-actions Bot added this to the 1.68.0 milestone Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

inst: jms JMS instrumentation tag: ai generated Largely based on code generated by an AI or LLM type: bug fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants