Skip to content

Refactor: explicit config injection (only roots read ConfigManager) #496

Description

@phernandez

Refactor: explicit confnjection (only roots read ConfigManager)

Why

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.
  • Tests pass.

Dependencies

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions