Skip to content

Code review sweep (run 25222958420)#18490

Merged
trask merged 7 commits into
mainfrom
otelbot/code-review-sweep-25222958420
May 1, 2026
Merged

Code review sweep (run 25222958420)#18490
trask merged 7 commits into
mainfrom
otelbot/code-review-sweep-25222958420

Conversation

@otelbot

@otelbot otelbot Bot commented May 1, 2026

Copy link
Copy Markdown
Contributor

Automated code review sweep walked the following modules in order
and stopped after accumulating at least 10 modified files:

  • ratpack-1.4:javaagent
  • ratpack-1.4:testing
  • ratpack-1.7:javaagent
  • ratpack-1.7:library
  • reactor-3.1:javaagent
  • reactor-3.1:library
  • reactor-3.1:testing
  • reactor-3.4:javaagent
  • reactor-kafka-1.0:javaagent

Module: ratpack-1.4:javaagent

Module path: instrumentation/ratpack/ratpack-1.4/javaagent

Summary

No safe fixes were applied. The only deterministic guideline issue found was reverted because validation showed it is not safe for this module.

Applied Changes

No safe automated changes were applied.

Unresolved Items

File: build.gradle.kts
Reason: The `muzzle` pass range `[1.4.0,)` lacks `assertInverse.set(true)`, which `gradle-conventions.md` normally requires for bounded ranges; adding it caused `./gradlew :instrumentation:ratpack:ratpack-1.4:javaagent:muzzle` to fail because inverse Ratpack versions still pass for the dependent `NettyInstrumentationModule`, so this needs a manual module-specific decision.

Module: ratpack-1.4:testing

Module path: instrumentation/ratpack/ratpack-1.4/testing

Summary

Applied 1 safe repository-guideline fix in ratpack-1.4 testing and committed it as 0a9cfb72.

Applied Changes

General

File: AbstractRatpackRoutesTest.java:51
Change: Changed mutable `RatpackServer app` and `WebClient client` lifecycle fields from `static` to instance fields.
Reason: `AbstractRatpackRoutesTest` uses JUnit `@TestInstance(PER_CLASS)`, so per-class mutable test lifecycle state should not be shared across concrete subclasses; this follows the repository correctness guideline to avoid cross-test state hazards.

Module: ratpack-1.7:javaagent

Module path: instrumentation/ratpack/ratpack-1.7/javaagent

Summary

Applied and committed one safe review fix for ratpack-1.7 javaagent test wiring.

Applied Changes

Build

File: build.gradle.kts:21
Change: Added `testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent"))`.
Reason: `gradle-conventions.md` requires javaagent tests to load instrumented internal library dependencies; Ratpack propagates client context through Netty, so the Netty javaagent must be active in tests.

Module: ratpack-1.7:library

Module path: instrumentation/ratpack/ratpack-1.7/library

Summary

Applied and committed 2 safe repository-guideline fixes for ratpack-1.7 library review.

Applied Changes

Nullability

File: RatpackHttpClientAttributesGetter.java:23
Change: Removed inaccurate `@Nullable` return annotations from `getUrlFull()` and `getHttpRequestMethod()`.
Reason: Repository nullability guidance says return types should be annotated `@Nullable` only when the implementation can actually return `null`; both methods return non-null values from `RequestSpec`.

Config

File: metadata.yaml:68
Change: Added `declarative_name: general.sanitization.url.sensitive_query_parameters/development` for `otel.instrumentation.sanitization.url.experimental.sensitive-query-parameters`.
Reason: `metadata-yaml-format.md` requires declarative names for config entries, and its special mappings define this exact declarative path for the sensitive query parameter property.

Module: reactor-3.1:javaagent

Module path: instrumentation/reactor/reactor-3.1/javaagent

Summary

No safe repository-guideline fixes were applied. One issue needs manual handling because the review workflow explicitly says not to auto-fix missing testExperimental task wiring when an experimental flag is applied unconditionally.

Applied Changes

No safe automated changes were applied.

Unresolved Items

File: build.gradle.kts
Reason: `-Dotel.instrumentation.reactor.experimental-span-attributes=true` is configured in `tasks.withType<Test>().configureEach`, so all test tasks run only with experimental attributes enabled. The `testing-experimental-flags.md` guideline requires a dedicated `testExperimental` task, but the review instructions classify this exact missing-task case as `Do not auto-fix`; add `testExperimental`, move the flag there, wire it into `check`, and gate affected assertions with an `EXPERIMENTAL_ATTRIBUTES` test flag.

Module: reactor-3.1:library

Module path: instrumentation/reactor/reactor-3.1/library

Summary

Applied and committed safe repository-guideline fixes for instrumentation/reactor/reactor-3.1/library.

Applied Changes

General

File: build.gradle.kts:7
Change: Fixed an inaccurate comment typo describing the `reactor-core` compile target compatibility.
Reason: `knowledge/general-rules.md` requires fixing incorrect comments when they are clear and deterministic.

Style

File: ContextPropagationOperator.java:68
Change: Moved static and instance fields into the repository style-guide class organization order and renamed unused caught exceptions from `e` to `ignored`.
Reason: `docs/contributing/style-guide.md` prefers static fields before instance fields and methods; `knowledge/general-rules.md` says intentionally unused catch parameters should be named `ignored`.

File: HooksTest.java:113
Change: Renamed an intentionally unused `NoSuchMethodException` catch parameter from `e` to `ignored`.
Reason: `knowledge/general-rules.md` says intentionally unused catch parameters should be named `ignored`.

File: ReactorCoreTest.java:57
Change: Renamed an intentionally unused multi-catch parameter from `e` to `ignored`.
Reason: `knowledge/general-rules.md` says intentionally unused catch parameters should be named `ignored`.

Module: reactor-3.1:testing

Module path: instrumentation/reactor/reactor-3.1/testing

Summary

No safe repository-guideline fixes were needed under instrumentation/reactor/reactor-3.1/testing; reviewed source, Gradle configuration, and mandatory metadata.yaml coverage.

Applied Changes

No safe automated changes were applied.

Module: reactor-3.4:javaagent

Module path: instrumentation/reactor/reactor-3.4/javaagent

Summary

Applied one safe repository-guideline fix in reactor-3.4 javaagent and committed it.

Applied Changes

Build

File: build.gradle.kts:29
Change: Removed unused `testLibrary("io.projectreactor:reactor-test:3.1.0.RELEASE")` dependency.
Reason: Gradle conventions say to flag and remove unused or redundant dependencies; this module’s tests do not reference `reactor-test`, and the shared `reactor-3.1:testing` dependency path does not require it.

Module: reactor-kafka-1.0:javaagent

Module path: instrumentation/reactor/reactor-kafka-1.0/javaagent

Summary

Applied one safe build.gradle.kts metadata wiring fix and committed it. The affected javaagent module :check, :check -PtestLatestDeps=true, and final spotlessApply completed successfully.

Applied Changes

Build

File: build.gradle.kts:109
Change: Added `metadataConfig` to the default `test` task for `otel.instrumentation.messaging.experimental.receive-telemetry.enabled=true`.
Reason: Gradle conventions require `metadataConfig` on each non-default test task/configuration when `collectMetadata` is already configured, so collected metadata describes the active non-default instrumentation config.

Unresolved Items

File: build.gradle.kts
Reason: The default `test` task still enables experimental receive telemetry via `-Dotel.instrumentation.messaging.experimental.receive-telemetry.enabled=true`; the review workflow says not to auto-fix missing/dedicated `testExperimental` task wiring for unconditionally enabled experimental flags. Next action: decide whether to move this mode into a dedicated task and keep default `test` on default config.


Download code review diagnostics

otelbot Bot added 6 commits May 1, 2026 17:25
Automated code review of instrumentation/ratpack/ratpack-1.4/testing.
Automated code review of instrumentation/ratpack/ratpack-1.7/javaagent.
Automated code review of instrumentation/ratpack/ratpack-1.7/library.
Automated code review of instrumentation/reactor/reactor-3.1/library.
Automated code review of instrumentation/reactor/reactor-3.4/javaagent.
Automated code review of instrumentation/reactor/reactor-kafka-1.0/javaagent.
@otelbot otelbot Bot requested a review from a team as a code owner May 1, 2026 17:50
Comment thread instrumentation/ratpack/ratpack-1.7/javaagent/build.gradle.kts Outdated
@trask trask enabled auto-merge (squash) May 1, 2026 19:46
@trask trask merged commit 63485ae into main May 1, 2026
93 checks passed
@trask trask deleted the otelbot/code-review-sweep-25222958420 branch May 1, 2026 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant