Skip to content

Move to dependency injection for PSBs - #824

Merged
nolag merged 2 commits into
mainfrom
rtinianov_diOnly
Oct 15, 2026
Merged

nolag merged 2 commits into
mainfrom
rtinianov_diOnly

Conversation

@nolag

@nolag nolag commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Nil-constructor validation and capability-specific configuration support need to be restored.

2 open findings
What changed in this PR

Migrates the PSB capability runner from reflection-based constructors to dependency injection using samber/do.

Changes:

  • Introduces typed constructors and injector-provided runtime dependencies.
  • Removes reflection-based dependency resolution and capability configuration binding.
  • Adapts runner and telemetry tests to the new constructor signature.
File Description
libs/​go.sum Adds dependency checksums.
libs/​go.mod Declares dependency injection packages.
libs/​capability/​telemetry_test.go Updates test constructors.
libs/​capability/​runner.go Creates and populates the injector.
libs/​capability/​runner_test.go Adapts lifecycle tests.
libs/​capability/​run.go Switches public APIs to typed constructors.
libs/​capability/​run_test.go Revises constructor and dependency tests.
libs/​capability/​capability.go Removes configuration markers and dependency resolution helpers.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread libs/capability/run.go
Comment thread libs/capability/run.go
@cl-sonarqube-production

Copy link
Copy Markdown

@nolag
nolag marked this pull request as ready for review October 15, 2026 19:17
@nolag
nolag requested review from a team as code owners October 15, 2026 19:17
@nolag
nolag enabled auto-merge October 15, 2026 19:17
@nolag
nolag added this pull request to the merge queue Oct 15, 2026
Merged via the queue into main with commit 2e66238 Oct 15, 2026
20 checks passed
@nolag
nolag deleted the rtinianov_diOnly branch October 15, 2026 19:30
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.

4 participants