Code review sweep (run 25232568515)#18496
Merged
Merged
Conversation
Automated code review of instrumentation/restlet/restlet-2.0/library.
Automated code review of instrumentation/rmi/javaagent.
Automated code review of instrumentation/rocketmq/rocketmq-client-4.8/testing.
Automated code review of instrumentation/rocketmq/rocketmq-client-5.0/javaagent.
Automated code review of instrumentation/runtime-telemetry/javaagent.
Automated code review of instrumentation/runtime-telemetry/library.
Automated code review of instrumentation/runtime-telemetry/testing.
trask
approved these changes
May 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated code review sweep walked the following modules in order
and stopped after accumulating at least 10 modified files:
restlet-2.0:libraryrestlet-2.0:testingrmi:bootstraprmi:javaagentrocketmq-client-4.8:javaagentrocketmq-client-4.8:libraryrocketmq-client-4.8:testingrocketmq-client-5.0:javaagentruntime-telemetry:javaagentruntime-telemetry:jfr-testingruntime-telemetry:libraryruntime-telemetry:testingModule:
restlet-2.0:libraryModule path:
instrumentation/restlet/restlet-2.0/librarySummary
Applied 1 safe repository-guideline fix and committed it in
a410a8ad.Applied Changes
Build
File:
build.gradle.kts:31Change: Changed `collectMetadata` wiring from `tasks.withType<Test>().configureEach` to `tasks.test`.
Reason: `gradle-conventions.md` says single-test-task modules should use `tasks.test`; `withType<Test>().configureEach` is reserved for modules that explicitly register additional `Test` tasks.
Module:
restlet-2.0:testingModule path:
instrumentation/restlet/restlet-2.0/testingSummary
No safe repository-guideline fixes were applied under
instrumentation/restlet/restlet-2.0/testing; reviewed checked-in source/resource files andmetadata.yamlcoverage, with generatedbuild/outputs treated as non-reviewable.Applied Changes
No safe automated changes were applied.
Module:
rmi:bootstrapModule path:
instrumentation/rmi/bootstrapSummary
No safe repository-guideline fixes were needed under
instrumentation/rmi/bootstrap. The bootstrap Gradle file andThreadLocalContextalready follow the applicable style, visibility, and module conventions;instrumentation/rmi/metadata.yamlhas no config entries requiring correction.Applied Changes
No safe automated changes were applied.
Module:
rmi:javaagentModule path:
instrumentation/rmi/javaagentSummary
Applied and committed one safe repository-guideline fix in
instrumentation/rmi/javaagent: narrowed broad@Testthrows Exceptionclauses where the checked exception exposed by the test setup isRemoteException.Applied Changes
Testing
File:
RmiTest.java:91Change: Changed `serverBuiltinMethods()` and `serviceThrownException()` from `throws Exception` to `throws RemoteException` and added the required import.
Reason: `testing-general-patterns.md` says `@Test` methods should use a single exception type that is as specific as possible; these methods only expose RMI setup calls requiring `RemoteException` outside assertion lambdas.
Module:
rocketmq-client-4.8:javaagentModule path:
instrumentation/rocketmq/rocketmq-client-4.8/javaagentSummary
No safe fixes were applied; the target
javaagentfiles and modulemetadata.yamlwere reviewed. One Gradle test-task issue remains because the review workflow says not to auto-fix experimental flags that are enabled unconditionally across all test tasks.Applied Changes
No safe automated changes were applied.
Unresolved Items
File:
build.gradle.ktsReason: `-Dotel.instrumentation.common.experimental.controller-telemetry.enabled=true` is configured in `withType<Test>().configureEach`, so it applies to every test task instead of being isolated in a dedicated experimental task; the review guideline classifies missing `testExperimental` isolation for unconditional experimental flags as report-only, not auto-fix.
Module:
rocketmq-client-4.8:libraryModule path:
instrumentation/rocketmq/rocketmq-client-4.8/librarySummary
No safe repository-guideline fixes were applied. One in-scope issue remains report-only because the review instructions classify missing
testExperimentaltask wiring as a non-auto-fix item.Applied Changes
No safe automated changes were applied.
Unresolved Items
File:
build.gradle.ktsReason: The default `test` task enables `-Dotel.instrumentation.rocketmq-client.experimental-span-attributes=true`; testing guidance expects experimental flags to be isolated in a dedicated `testExperimental` task with `metadataConfig` and `check` wiring, but this review policy marks missing `testExperimental` as report-only rather than an auto-fix.
Module:
rocketmq-client-4.8:testingModule path:
instrumentation/rocketmq/rocketmq-client-4.8/testingSummary
Applied safe repository-guideline fixes in 3 files under
instrumentation/rocketmq/rocketmq-client-4.8/testingand committed them asde4d3c94.Applied Changes
Style
File:
AbstractRocketMqClientTest.java:65Change: Moved `logger` into the static field section and changed `experimental(...)` from package-private to `private`.
Reason: The style guide requires static fields before methods and minimal necessary visibility; `experimental(...)` is only used inside `AbstractRocketMqClientTest`.
File:
BaseConf.java:21Change: Removed unused `broker1Addr` and `broker1Name` fields and made internal helper fields `private`.
Reason: The style guide requires static fields to be `private` except constant-like public fields, and unused fields should be removed when no in-repo callers exist.
File:
IntegrationTestBase.java:140Change: Renamed the unused fallback catch parameter from `e` to `ignored`.
Reason: The general review rules prefer `ignored` for intentionally unused catch parameters.
Unresolved Items
File:
AbstractRocketMqClientTest.javaReason: `testRocketmqProduceCallback()` still has a multi-exception `@Test` throws clause. Collapsing it to `throws Exception` failed Error Prone `InterruptedExceptionSwallowed`; a safe fix needs a more targeted refactor that preserves explicit `InterruptedException` handling.
File:
BaseConf.javaReason: Adding `brokerController.shutdown()` to cleanup caused `:instrumentation:rocketmq:rocketmq-client-4.8:library:check` to fail with a RocketMQ `InaccessibleObjectException`; safe broker cleanup needs an alternate shutdown strategy or Java module opens decision.
Module:
rocketmq-client-5.0:javaagentModule path:
instrumentation/rocketmq/rocketmq-client-5.0/javaagentSummary
Applied safe repository-guideline fixes for
rocketmq-client-5.0javaagentand committed them ind20bc408d31a275bb5fecbd71406f74de49dd1c4.Applied Changes
Build
File:
build.gradle.kts:43Change: Added `metadataConfig` for the `otel.instrumentation.messaging.experimental.receive-telemetry.enabled=true` test JVM flag.
Reason: Gradle test-task metadata collection should declare non-default instrumentation config via `metadataConfig` so metadata validation can associate emitted telemetry with the active config.
Style
File:
VirtualFieldStore.java:16Change: Renamed private static final `VirtualField` handles to constant-style names such as `MESSAGE_CONTEXT` and `MESSAGE_EXTRA_PROPERTIES`.
Reason: The style guide treats semantic handles such as `VirtualField` as constant-like fields that should use `SCREAMING_SNAKE_CASE`.
Module:
runtime-telemetry:javaagentModule path:
instrumentation/runtime-telemetry/javaagentSummary
Applied one safe review fix and committed it as
f0a76da:JarDetailsno longer calls overridable methods while constructing embedded archive details and closes archive/stream resources.Applied Changes
General
File:
JarDetails.java:45Change: Refactored `JarDetails` embedded archive handling to compute `pom`, `Manifest`, and checksum before constructing the immutable details object, removed `EmbeddedJarDetails`, and closed `JarFile`/`InputStream` resources with scoped cleanup.
Reason: The repository review checklist requires fixing correctness and resource-leak issues; the old superclass constructor called overridable methods that used `jarEntry` before initialization for embedded JARs, and opened `JarFile` resources were not closed.
Module:
runtime-telemetry:jfr-testingModule path:
instrumentation/runtime-telemetry/jfr-testingSummary
No safe repository-guideline fixes were found under
instrumentation/runtime-telemetry/jfr-testing. ThetestBackcompatcustomTesttask is wired intocheckwithtestClassesDirsandclasspath, the test classes follow the relevant JUnit/AssertJ patterns, and the requiredruntime-telemetrymetadata validation found no in-scope change to apply.Applied Changes
No safe automated changes were applied.
Module:
runtime-telemetry:libraryModule path:
instrumentation/runtime-telemetry/librarySummary
Applied one safe repository-guideline fix and committed it as
e23a2bfe(Review fixes for runtime-telemetry library).Applied Changes
Testing
File:
ClassesTest.java:46Change: Replaced zero-attribute metric point assertions from no-arg `hasAttributesSatisfyingExactly()` to `hasAttributes(Attributes.empty())`.
Reason: `testing-general-patterns.md` says metric point assertions should use `hasAttributes(Attributes.empty())` for empty attributes because metric points do not support the span-style `hasTotalAttributeCount(0)` form.
Module:
runtime-telemetry:testingModule path:
instrumentation/runtime-telemetry/testingSummary
Applied one safe Gradle convention fix in
instrumentation/runtime-telemetry/testingand committed it asa845ec32.Applied Changes
Build
File:
build.gradle.kts:28Change: Moved default test task wiring from `tasks.named("test")` plus `withType<Test>().configureEach` into a single `tasks.test` block and used `dependsOn(tasks.war)`.
Reason: `gradle-conventions.md` says single-test-task modules should prefer simple `tasks.test` configuration and reserve `withType<Test>().configureEach` for modules with explicit additional `Test` tasks.
Download code review diagnostics