refactor(di): consolidate DI containers into a single tested implementation#124
Open
kangeunchan wants to merge 2 commits intoaltuslabsxyz:mainfrom
Open
refactor(di): consolidate DI containers into a single tested implementation#124kangeunchan wants to merge 2 commits intoaltuslabsxyz:mainfrom
kangeunchan wants to merge 2 commits intoaltuslabsxyz:mainfrom
Conversation
Signed-off-by: kangeunchan <kangeunchan080310@gmail.com>
Signed-off-by: kangeunchan <kangeunchan080310@gmail.com>
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.
Enhancement Description
Consolidate DI container implementations into a single tested path to reduce ambiguity and wiring drift.
Summary
This PR standardizes DI construction on one canonical implementation and adds focused tests for wiring behavior.
Previously, multiple container paths increased maintenance risk:
Now DI creation and wiring follow one clear path with dedicated tests.
What Changed
1) Consolidated DI creation path
Updated:
internal/di/container_v2.gointernal/di/factory.go2) Removed duplicate wiring ambiguity
3) Kept external behavior stable
4) Tests
Added/updated tests:
internal/di/container_test.gointernal/di/factory_test.goWhy This Is Needed
This is a maintainability and correctness refactor.
One container path improves readability, lowers review risk, and increases confidence in wiring changes.
Behavior Notes / Regression Impact
No intentional runtime behavior change.
Refactor scope is limited to DI internals and tests.
Validation Performed
go test ./internal/di/...go test ./...golangci-lint run