Skip to content

[config] Wire ProfileConfig into ContextManager, Router, and TreeBuilder #131

@dgenio

Description

@dgenio

Context

Split from #45. Wires ProfileConfig into ContextManager, Router, and TreeBuilder so users can pass a single config object.

Depends on the presets child issue (ProfileConfig must exist first).

Acceptance Criteria

  • ContextManager gains optional profile: ProfileConfig | None parameter that pre-fills budget, policy, scoring
  • Router gains optional routing_config: RoutingConfig | None parameter as alternative to individual kwargs
  • TreeBuilder gains optional routing_config: RoutingConfig | None parameter for max_children/target_group_size
  • Individual kwargs still work (backward-compatible)
  • ProfileConfig kwargs override individual kwargs when both are provided (with clear precedence)
  • Tests for ProfileConfig integration path

File Paths

  • src/contextweaver/context/manager.py (edit)
  • src/contextweaver/routing/router.py (edit)
  • src/contextweaver/routing/tree.py (edit)
  • tests/test_config.py (edit)
  • tests/test_manager.py (edit)

Parent Issue

Part of #45 (ProfileConfig).

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/contextContext engine: manager, pipeline, firewallarea/routingRouting engine: catalog, graph, router, cardscomplexity/averageStandard effort, moderate familiarity neededenhancementNew feature or requestmilestone/v0.4v0.4 Observability & evaluationpriority/mediumMedium priority — production readiness

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions