fix: enable DI for FeatureOptInService#13
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a7679a0ffd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| export const moduleLoader: ModuleLoader = { | ||
| token: moduleToken, | ||
| loadModule, |
There was a problem hiding this comment.
Use repository token instead of module token
Here moduleLoader.token is set to the module token, but bindModuleToClassOnToken binds the class under FLAGS_DI_TOKENS.FEATURES_REPOSITORY and uses dep.token for DI (see packages/features/di/di.ts). As a result, getFeaturesRepository() and any consumers (e.g., FeatureOptInService via dep: featuresRepositoryModuleLoader) will request the module token instead of the bound repository token, causing runtime resolution failures. The module token is only meant for container.load, not container.get; set moduleLoader.token to the repository token.
Useful? React with 👍 / 👎.
Benchmark PR from agentic-review-benchmarks#13