You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deep modules calling ConfigManager().config creates hidden coupling and environment-dependent behavior. This is especially problematic with cloud mode.
Scope
Establish a rule: Only composition roots read ConfigManager/env vars.
Refactor high-impact modules to accept:
BasicMemoryConfig explicitly, or
a narrow Protocol/dataclass containing only required fields.
Remove/avoid direct ConfigManager().config usage in non-root modules.
Acceptance criteria
No new ConfigManager().config usage outside containers.
Reduce existing usages substantially; remaining ones are tracked with follow-ups.
This issue is part of a larger architectural refactoring effort (umbrella issue #490) to reduce coupling and improve SOLID principles in the codebase.
Key Points:
Problem: Deep modules calling ConfigManager().config creates hidden coupling and makes the system difficult to test, especially problematic for cloud mode
Goal: Establish rule that only composition roots (containers) read ConfigManager/env vars
Scope: Refactor modules to accept explicit config injection via BasicMemoryConfig or narrow Protocol/dataclass
Implementation Approach:
Should be tackled incrementally in small PRs after #492 is complete, focusing on high-impact modules first while maintaining test coverage.
Activity
claude commentedon Dec 31, 2025
Claude finished @phernandez's task in 1m 29s —— View job
Triage Analysis for Issue #496
Classification
Type: Enhancement / Refactoring
Priority: Medium-High
Component: Architecture / Configuration Management
Complexity: Medium-Complex
Analysis
This issue is part of a larger architectural refactoring effort (umbrella issue #490) to reduce coupling and improve SOLID principles in the codebase.
Key Points:
ConfigManager().configcreates hidden coupling and makes the system difficult to test, especially problematic for cloud modeBasicMemoryConfigor narrow Protocol/dataclassRelated Issues:
No duplicates found - This is a distinct part of the larger refactoring effort.
Recommendation
This is a valuable architectural improvement that follows SOLID principles. The issue is well-scoped with clear acceptance criteria:
ConfigManager().configusage outside containersPriority Justification: Medium-High because:
Implementation Approach:
Should be tackled incrementally in small PRs after #492 is complete, focusing on high-impact modules first while maintaining test coverage.
Labels Applied
enhancement✓refactor: add composition roots for API, MCP, and CLI entrypoints (#492)
refactor: add explicit config injection to high-impact modules (#496)