Skip to content

skill(apm-integrations): split tests.md into mandatory rules + situational style guide - #12410

Open
jordan-wong wants to merge 1 commit into
masterfrom
skill/restructure-tests-md
Open

skill(apm-integrations): split tests.md into mandatory rules + situational style guide#12410
jordan-wong wants to merge 1 commit into
masterfrom
skill/restructure-tests-md

Conversation

@jordan-wong

Copy link
Copy Markdown
Contributor

🤖 Generated with APM Instrumentation Toolkit

Reference / skill-fix PR. Two apm-integrations skill files; docs-only, no instrumentation code changes.

Splits tests.md so the rules every module needs aren't buried in the ones only some modules hit — restructuring alternative to #12359's inline trim, opened for comparison.

Changes

references/tests.md mixed always-applicable rules (DSL choice, error-test coverage, no-sleep hygiene) with situational rules and code examples that only apply to specific circumstances (version-mismatch comments, mutual-exclusion deps, latestDepTest source-set routing, banner-comment style) — 179 lines every reader loaded via SKILL.md Step 9.1's pointer, regardless of whether their module hit any of those cases.

  • tests.md (28 lines) — the mandatory checklist only: DSL rule, error-test requirement, ForkedTest naming, integration-name registration, no-Thread.sleep()/no-default-jvmArgs hygiene.
  • tests-style.md (148 lines, new) — situational rules + all code examples, linked from tests.md for the specific cases that need them.

Also folds in the DSL-rule clarification from #12359 (the old "Full Java instrumentation test support is not yet available" read as an absolute ban the repo's own Java-DSL test suites contradict).

Scope

references/tests.md, references/tests-style.md (new), SKILL.md — docs-only.

Alternative to #12359 — pick one; they overlap on the DSL-rule content.

…ional style guide

tests.md mixed always-applicable rules (DSL choice, error-test coverage, no-sleep
hygiene) with situational rules that only apply to specific circumstances
(version-mismatch comments, mutual-exclusion deps, latestDepTest source-set routing,
banner-comment style) and their code examples — 179 lines every reader loaded via
SKILL.md's Step 9.1 pointer, regardless of whether their module hit any of those cases.

Split into:
- tests.md (28 lines) — the mandatory checklist: DSL rule, error-test requirement,
  ForkedTest naming, integration-name registration, no-Thread.sleep/no-default-jvmArgs
  hygiene. This is what SKILL.md Step 9.1 points to.
- tests-style.md (148 lines) — situational rules + all code examples, linked from
  tests.md for the specific cases that need them.

Also folds in the DSL-rule clarification from #12359 ("Full Java instrumentation test
support is not yet available" read as an absolute ban that the repo's own Java-DSL
test suites contradict — restated as unconditional-unless-already-Java-DSL).

Updated SKILL.md's two references/tests.md pointers (Step 9.1, Step 9.3's
latestDepTest pointer) to match the new file split.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jordan-wong jordan-wong added tag: ai generated Largely based on code generated by an AI or LLM tag: apm integration toolkit Changes generated by DataDog/apm-instrumentation-toolkit as part of IDM AIT experimentation labels Sep 4, 2026
@datadog-prod-us1-5

datadog-prod-us1-5 Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 57.25% (-1.80%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 3a927df | Docs | View more details | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Sep 4, 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.01 s 14.00 s [-0.8%; +0.8%] (no difference)
startup:insecure-bank:tracing:Agent 12.92 s 13.02 s [-1.5%; +0.0%] (no difference)
startup:petclinic:appsec:Agent 17.50 s 17.28 s [+0.2%; +2.3%] (maybe worse)
startup:petclinic:iast:Agent 17.50 s 17.59 s [-1.3%; +0.3%] (no difference)
startup:petclinic:profiling:Agent 17.33 s 17.40 s [-1.6%; +0.8%] (no difference)
startup:petclinic:sca:Agent 17.41 s 17.25 s [-0.1%; +2.0%] (no difference)
startup:petclinic:tracing:Agent 16.52 s 16.57 s [-1.4%; +0.7%] (no difference)

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

@jordan-wong
jordan-wong marked this pull request as ready for review September 8, 2026 17:37
@jordan-wong
jordan-wong requested a review from a team as a code owner September 8, 2026 17:37
@jordan-wong
jordan-wong requested review from dougqh and removed request for a team September 8, 2026 17:37
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 8, 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-09-08T17:53:13.100837Z 3a927df 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.

@jordan-wong
jordan-wong removed the request for review from dougqh September 8, 2026 17:39

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

Datadog Autotest: PASS

More details

The split keeps the mandatory rules in tests.md. It moves the situational rules to tests-style.md and updates all affected links.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Datadog Autotest · Commit 3a927df · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

@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: 3a927df5b8

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

## 1. Instrumentation test (mandatory)

**Write Groovy/Spock tests for instrumentation tests** (per `AGENTS.md`: "Only use Groovy / Spock tests for instrumentation and smoke tests"). Full Java instrumentation test support is not yet available. Adding new `.groovy` files to a PR will trigger the `Enforce Groovy Migration` bot — add the `tag: override groovy enforcement` label to bypass it.
**Write Groovy/Spock tests for instrumentation tests** (per `AGENTS.md`: "Only use Groovy / Spock tests for instrumentation and smoke tests"). This is unconditional — including for modules whose existing siblings happen to use Java/JUnit — an existing Java-DSL sibling is NOT license to add more Java tests; do not migrate a Groovy family to Java either. Confirm what the family is on with `ls src/test/` on the module's master version and its version-siblings (e.g. `jedis-1.4/`, `jedis-4.0/` for `jedis-3.0`) before writing tests. Java examples in [tests-style.md](tests-style.md) are style-only illustrations for modules ALREADY on the Java/JUnit DSL — NOT a license to introduce Java into a Groovy family. Adding new `.groovy` files to a PR will trigger the `Enforce Groovy Migration` bot — add the `tag: override groovy enforcement` label to bypass it.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge State the Java-module exception consistently

When the skill edits an instrumentation module already using Java/JUnit, this sentence gives mutually exclusive directions: it declares Groovy/Spock unconditional, but later recognizes modules already on the Java/JUnit DSL. Java instrumentation tests are explicitly supported by docs/how_to_test_with_junit.md:284-287, while .github/workflows/enforce-groovy-migration.yaml:70-102 rejects newly added Groovy files and recommends Java/JUnit unless an exception is justified. Clarify that an existing Java module should remain Java, and reserve Groovy plus the override label for the intended exceptional cases.

AGENTS.md reference: AGENTS.md:L64-L65

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tag: ai generated Largely based on code generated by an AI or LLM tag: apm integration toolkit Changes generated by DataDog/apm-instrumentation-toolkit as part of IDM AIT experimentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant