Skip to content

fix: enable DI for FeatureOptInService#13

Open
tomerqodo wants to merge 2 commits into
codex_full_base_fix_enable_di_for_featureoptinservice_pr13from
codex_full_head_fix_enable_di_for_featureoptinservice_pr13
Open

fix: enable DI for FeatureOptInService#13
tomerqodo wants to merge 2 commits into
codex_full_base_fix_enable_di_for_featureoptinservice_pr13from
codex_full_head_fix_enable_di_for_featureoptinservice_pr13

Conversation

@tomerqodo

Copy link
Copy Markdown

Benchmark PR from agentic-review-benchmarks#13

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 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".

Comment on lines +19 to +21
export const moduleLoader: ModuleLoader = {
token: moduleToken,
loadModule,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

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.

1 participant