Skip to content

fix: refactor process collection to centralize provider materialization - #145

Merged
cdsap merged 1 commit into
mainfrom
issue/144-hermes-refactor-process-collection-to-centr-a1
Sep 23, 2026
Merged

cdsap merged 1 commit into
mainfrom
issue/144-hermes-refactor-process-collection-to-centr-a1

Conversation

@cdsap

@cdsap cdsap commented Sep 23, 2026

Copy link
Copy Markdown
Owner

Summary

Problem

InfoKotlinProcessBuildService.close and DevelocityWrapperConfiguration.buildScanDevelocityReporting both independently read jStat/jInfo providers and invoke KotlinProcessCollector, duplicating the infrastructure-to-domain handoff.

Why this matters

The duplicated boundary can drift between console and Build Scan reporting, while tests must inspect adapter implementation details to ensure consistent collection behavior.

Proposed change

Add one internal helper beside KotlinProcessProviders that materializes both providers and delegates to KotlinProcessCollector, then use it from both reporting adapters. Preserve KotlinProcessCollector's raw-string API and all output behavior.

Notes

This keeps provider access in the infrastructure-facing consolidation boundary while leaving raw process parsing in the core collector, reducing coupling without introducing a broader abstraction.

Fixes #144

Changes

  • plugin/src/main/kotlin/io/github/cdsap/kotlinprocess/DevelocityWrapperConfiguration.kt
  • plugin/src/main/kotlin/io/github/cdsap/kotlinprocess/InfoKotlinProcessBuildService.kt
  • plugin/src/main/kotlin/io/github/cdsap/kotlinprocess/KotlinProcessConsolidation.kt
  • plugin/src/test/kotlin/io/github/cdsap/kotlinprocess/KotlinProcessCollectorOwnershipTest.kt
  • plugin/src/test/kotlin/io/github/cdsap/kotlinprocess/KotlinProcessConsolidationTest.kt

Verification

  • ./gradlew ktlintCheck
  • ./gradlew test

@cdsap
cdsap merged commit da8f654 into main Sep 23, 2026
23 checks passed
@cdsap
cdsap deleted the issue/144-hermes-refactor-process-collection-to-centr-a1 branch September 23, 2026 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor process collection to centralize provider materialization

1 participant