Skip to content

Commit 0d4d2fd

Browse files
authored
Code review agent: clarify deprecation policy (#18117)
1 parent 4f9a237 commit 0d4d2fd

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

.github/agents/code-review-and-fix.agent.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,12 @@ Auto-fix boundaries:
305305
add the correctly named/shaped method with the implementation, deprecate the old method
306306
to delegate to the new one, and add a `@deprecated` Javadoc tag naming the replacement.
307307
For stable modules, annotate instead: the fix requires a broader compatibility decision.
308+
**Exception — javaagent modules**: javaagent modules (Gradle path ends with `:javaagent`,
309+
including shared `-common` javaagent modules) are bundled into the agent jar and are not
310+
a public API. Do **not** apply a deprecation cycle; rename or change the API directly
311+
and update all in-repo callers in the same commit. A deprecation cycle is only required
312+
for non-stable modules whose artifacts are published for external consumption (e.g.,
313+
`:library`, `:testing`, `instrumentation-api*`).
308314
- Do not auto-fix (report in the final output instead):
309315
- missing `testExperimental` task — when experimental flags are set unconditionally
310316
on all test tasks instead of being isolated in a dedicated task

.github/agents/knowledge/api-deprecation-policy.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@ The CHANGELOG uses distinct headings to distinguish:
1818
- `⚠️ Breaking changes to non-stable APIs` — alpha/non-stable modules (routine)
1919
- `⚠️ Breaking Changes` — stable module changes (rare, requires strong justification)
2020

21+
### Javaagent modules are not a public API
22+
23+
Javaagent modules (Gradle path ends with `:javaagent`, including shared `-common` javaagent
24+
modules) are bundled into the agent jar and are **not** published for external consumption.
25+
Do **not** apply a deprecation cycle to symbols in javaagent modules — rename or change the
26+
API directly and update all in-repo callers in the same commit. The deprecate-then-remove
27+
cycle described below applies only to non-stable modules whose artifacts are published
28+
(e.g., `:library`, `:testing`, `instrumentation-api*`).
29+
2130
## The Deprecate-Then-Remove Cycle
2231

2332
### Alpha (non-stable) modules

0 commit comments

Comments
 (0)