Skip to content

Code review sweep (run 25083201560)#18392

Merged
trask merged 10 commits into
mainfrom
otelbot/code-review-sweep-25083201560
Apr 29, 2026
Merged

Code review sweep (run 25083201560)#18392
trask merged 10 commits into
mainfrom
otelbot/code-review-sweep-25083201560

Conversation

@otelbot

@otelbot otelbot Bot commented Apr 29, 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:

  • spring-boot-actuator-autoconfigure-2.0:javaagent
  • spring:spring-boot-autoconfigure
  • spring-boot-autoconfigure:testing
  • spring-boot-resources:javaagent
  • spring-boot-resources:javaagent-unit-tests
  • spring-cloud-aws-3.0:javaagent
  • spring-cloud-gateway-2.0:javaagent
  • spring-cloud-gateway-2.2:testing
  • spring-cloud-gateway-common:javaagent
  • spring-cloud-gateway-common:testing
  • spring-cloud-gateway-webflux-4.3:testing
  • spring-cloud-gateway-webmvc-4.3:javaagent
  • spring-core-2.0:javaagent
  • spring-data-1.8:javaagent
  • spring-data-3.0:kotlin-testing
  • spring-data-3.0:testing
  • spring-data-common:testing
  • spring-integration-4.1:javaagent
  • spring-integration-4.1:library

Module: spring-boot-actuator-autoconfigure-2.0:javaagent

Module path: instrumentation/spring/spring-boot-actuator-autoconfigure-2.0/javaagent

Summary

Applied and committed 1 safe repository-guideline fix in spring-boot-actuator-autoconfigure-2.0 javaagent.

Applied Changes

Build

File: build.gradle.kts:11
Change: Moved `assertInverse.set(true)` immediately after `versions.set(...)` in the `muzzle` `pass` block.
Reason: `gradle-conventions.md` requires `assertInverse.set(true)` to be inserted immediately after `versions.set(...)` unless `skip(...)` is present, without otherwise reordering the block.

Module: spring:spring-boot-autoconfigure

Module path: instrumentation/spring/spring-boot-autoconfigure

Summary

No safe repository-guideline fixes were applied under instrumentation/spring/spring-boot-autoconfigure; review scans did not find deterministic low-risk issues requiring source changes.

Applied Changes

No safe automated changes were applied.

Module: spring-boot-autoconfigure:testing

Module path: instrumentation/spring/spring-boot-autoconfigure/testing

Summary

Reviewed all files under instrumentation/spring/spring-boot-autoconfigure/testing; no deterministic repository-guideline fixes were needed, so no source changes were applied.

Applied Changes

No safe automated changes were applied.

Module: spring-boot-resources:javaagent

Module path: instrumentation/spring/spring-boot-resources/javaagent

Summary

Applied safe review fixes for spring-boot-resources javaagent and committed them in 263eb715.

Applied Changes

General

File: SpringBootServiceNameDetector.java:40
Change: Updated `COMMANDLINE_PATTERN` to capture non-whitespace `spring.application.name` values and aligned the detector Javadoc with the actual lookup order.
Reason: The review checklist requires fixing correctness issues and incorrect comments; the old regex rejected valid names such as `bullpen-2`, and the Javadoc described a stale lookup order.

Testing

File: SpringBootServiceNameDetectorTest.java:135
Change: Narrowed `yamlFileInCurrentDir(...)` from `throws Exception` to `throws IOException`, removed the broad `readString(...)` helper, and extended the command-line fallback test to cover a digit-containing service name.
Reason: `testing-general-patterns.md` requires `@Test` methods to use a single, specific checked exception where possible, and the added assertion coverage verifies the corrected command-line parsing behavior.

Module: spring-boot-resources:javaagent-unit-tests

Module path: instrumentation/spring/spring-boot-resources/javaagent-unit-tests

Summary

No safe repository-guideline fixes were needed under instrumentation/spring/spring-boot-resources/javaagent-unit-tests. The module metadata.yaml contains no instrumentation config entries requiring correction.

Applied Changes

No safe automated changes were applied.

Module: spring-cloud-aws-3.0:javaagent

Module path: instrumentation/spring/spring-cloud-aws-3.0/javaagent

Summary

Reviewed 11 files under instrumentation/spring/spring-cloud-aws-3.0/javaagent and the module metadata.yaml; no safe repository-guideline fixes were found to apply.

Applied Changes

No safe automated changes were applied.

Module: spring-cloud-gateway-2.0:javaagent

Module path: instrumentation/spring/spring-cloud-gateway/spring-cloud-gateway-2.0/javaagent

Summary

Applied and committed safe review fixes for spring-cloud-gateway-2.0 javaagent; one experimental-test-task issue remains because the review rules mark it as not safe to auto-fix.

Applied Changes

Build

File: build.gradle.kts:19
Change: Changed the WebFlux muzzle `versions.set()` range to `"[4.3.0,)"` and replaced `tasks.withType<Test>().configureEach` with `tasks.test`.
Reason: `gradle-conventions.md` requires proper Maven range syntax for `muzzle` pass blocks and prefers `tasks.test` for modules with only the default test task; `latestDepTest` does not count as a second custom `Test` task.

Style

File: GatewayTestApplication.java:16
Change: Made `GatewayTestApplication` and its `@Bean` method package-private.
Reason: The style guide and testing guidance prefer minimal necessary visibility; test classes and test support code should avoid unnecessary `public` visibility.

Unresolved Items

File: build.gradle.kts
Reason: The default `test` task still enables experimental flags without a dedicated `testExperimental` task. The review instructions classify this as not safe to auto-fix; next action is to add a dedicated `testExperimental` task and gate assertions accordingly.

Module: spring-cloud-gateway-2.2:testing

Module path: instrumentation/spring/spring-cloud-gateway/spring-cloud-gateway-2.2/testing

Summary

No safe repository-guideline fixes were applied in spring-cloud-gateway-2.2/testing; the only issue found is report-only under the review rules.

Applied Changes

No safe automated changes were applied.

Unresolved Items

File: build.gradle.kts
Reason: `otel.instrumentation.spring-cloud-gateway.experimental-span-attributes=true` is set in `tasks.withType<Test>().configureEach` without a dedicated `testExperimental` task; `testing-experimental-flags.md` says this should be isolated, but the review workflow marks missing `testExperimental` wiring as `do not auto-fix` because it can require broader assertion/task changes.

Module: spring-cloud-gateway-common:javaagent

Module path: instrumentation/spring/spring-cloud-gateway/spring-cloud-gateway-common/javaagent

Summary

No safe repository-guideline fixes were needed under instrumentation/spring/spring-cloud-gateway/spring-cloud-gateway-common/javaagent; reviewed build.gradle.kts, GatewayRouteHelper.java, and the related Spring Cloud Gateway metadata.yaml configuration coverage.

Applied Changes

No safe automated changes were applied.

Module: spring-cloud-gateway-common:testing

Module path: instrumentation/spring/spring-cloud-gateway/spring-cloud-gateway-common/testing

Summary

No safe fixes were applied under instrumentation/spring/spring-cloud-gateway/spring-cloud-gateway-common/testing; the only deterministic-looking candidate changed shared test semantics and was reverted.

Applied Changes

No safe automated changes were applied.

Unresolved Items

File: AbstractRouteMappingTest.java
Reason: The testing guideline prefers `hasAttributesSatisfyingExactly(...)`, but replacing the existing `hasAttributesSatisfying(...)` assertions requires enumerating standard HTTP/network span attributes that vary across dependent sibling modules, so this needs a broader manual assertion design rather than a safe local fix.

Module: spring-cloud-gateway-webflux-4.3:testing

Module path: instrumentation/spring/spring-cloud-gateway/spring-cloud-gateway-webflux-4.3/testing

Summary

Applied 1 safe repository-guideline fix and committed it. One issue remains unresolved because the review rules explicitly say not to auto-fix missing testExperimental task wiring.

Applied Changes

Build

File: build.gradle.kts:21
Change: Changed `tasks.withType<Test>().configureEach` to `tasks.test` for JVM argument configuration.
Reason: `gradle-conventions.md` says single-test-task modules should use `tasks.test`; implicit `latestDepTest` does not count as an additional custom `Test` task.

Unresolved Items

File: build.gradle.kts
Reason: Experimental JVM flags are enabled on the default `test` task and no dedicated `testExperimental` task exists; review guidelines say missing `testExperimental` wiring should be reported, not auto-fixed. Next action: add canonical `testExperimental` task wiring and gate experimental assertions.

Module: spring-cloud-gateway-webmvc-4.3:javaagent

Module path: instrumentation/spring/spring-cloud-gateway/spring-cloud-gateway-webmvc-4.3/javaagent

Summary

Applied and committed one safe repository-guideline fix for spring-cloud-gateway-webmvc-4.3 javaagent.

Applied Changes

Build

File: build.gradle.kts:29
Change: Changed single-test-task JVM argument configuration from `tasks.withType<Test>().configureEach` to `tasks.test`.
Reason: `gradle-conventions.md` says single-test-task modules should use `tasks.test`; `latestDepTest` does not count as an additional custom `Test` task.

Unresolved Items

File: GatewayWebMvcInstrumentationModule.java
Reason: The Javaagent module guideline prefers compact single-class `hasClassesNamed(...)` landmark form, but applying that change failed `spotlessJavaCheck`; no safe source change was left for this item.

Module: spring-core-2.0:javaagent

Module path: instrumentation/spring/spring-core-2.0/javaagent

Summary

No safe repository-guideline fixes were needed for instrumentation/spring/spring-core-2.0/javaagent; no files were changed.

Applied Changes

No safe automated changes were applied.

Module: spring-data-1.8:javaagent

Module path: instrumentation/spring/spring-data/spring-data-1.8/javaagent

Summary

Applied and committed one safe review fix for spring-data-1.8 javaagent: normalized open-ended muzzle version ranges in build.gradle.kts.

Applied Changes

Build

File: build.gradle.kts:10
Change: Changed `versions.set("[1.8.0.RELEASE,]")` and `versions.set("[1.2,]")` to Maven-style open-ended ranges using `)` as the upper bound delimiter.
Reason: `gradle-conventions.md` requires javaagent `muzzle` `versions.set(...)` values to use proper Maven ranges such as `[1.0,)`.

Module: spring-data-3.0:kotlin-testing

Module path: instrumentation/spring/spring-data/spring-data-3.0/kotlin-testing

Summary

Applied one safe repository-guideline fix in spring-data-3.0/kotlin-testing and committed it.

Applied Changes

Style

File: KotlinSpringDataTest.kt:27
Change: Changed companion-object `testing` `@RegisterExtension` field to `private`.
Reason: Repository style guide requires minimal necessary visibility and says static fields should be `private` unless they are constant-like fields.

Module: spring-data-3.0:testing

Module path: instrumentation/spring/spring-data/spring-data-3.0/testing

Summary

No safe repository-guideline fixes were applied under instrumentation/spring/spring-data/spring-data-3.0/testing; reviewed files and metadata.yaml showed no deterministic issues in scope.

Applied Changes

No safe automated changes were applied.

Module: spring-data-common:testing

Module path: instrumentation/spring/spring-data/spring-data-common/testing

Summary

No safe repository-guideline fixes were applied. Reviewed instrumentation/spring/spring-data/spring-data-common/testing, skipped generated build/ artifacts, confirmed Spring Data metadata.yaml files have no config entries and no matching config usage, and found the source/helper patterns already aligned with the loaded review rules.

Applied Changes

No safe automated changes were applied.

Module: spring-integration-4.1:javaagent

Module path: instrumentation/spring/spring-integration-4.1/javaagent

Summary

No safe repository-guideline fixes were found in instrumentation/spring/spring-integration-4.1/javaagent; no files were changed.

Applied Changes

No safe automated changes were applied.

Module: spring-integration-4.1:library

Module path: instrumentation/spring/spring-integration-4.1/library

Summary

Applied and committed one safe repository-guideline fix for spring-integration-4.1 library.

Applied Changes

Style

File: TracingChannelInterceptor.java:36
Change: Moved `directWithAttributesChannelClass`, `channelGetAttributeMh`, and their static initialization helpers into the class static-field section.
Reason: The repository style guide requires static fields to be placed before instance fields and methods, with helper methods for `static final` initialization allowed immediately after those fields.


Download code review diagnostics

otelbot Bot added 8 commits April 28, 2026 23:48
Automated code review of instrumentation/spring/spring-boot-actuator-autoconfigure-2.0/javaagent.
Automated code review of instrumentation/spring/spring-boot-resources/javaagent.
Automated code review of instrumentation/spring/spring-cloud-gateway/spring-cloud-gateway-2.0/javaagent.
Automated code review of instrumentation/spring/spring-cloud-gateway/spring-cloud-gateway-webflux-4.3/testing.
Automated code review of instrumentation/spring/spring-cloud-gateway/spring-cloud-gateway-webmvc-4.3/javaagent.
Automated code review of instrumentation/spring/spring-data/spring-data-1.8/javaagent.
Automated code review of instrumentation/spring/spring-data/spring-data-3.0/kotlin-testing.
Automated code review of instrumentation/spring/spring-integration-4.1/library.
@otelbot otelbot Bot requested a review from a team as a code owner April 29, 2026 00:41
@trask trask enabled auto-merge (squash) April 29, 2026 02:26
@trask trask merged commit 96ccfee into main Apr 29, 2026
94 checks passed
@trask trask deleted the otelbot/code-review-sweep-25083201560 branch April 29, 2026 03:19
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