UAT: DI container wires base ACMSPipeline instead of production ContextAssemblyPipeline — Phase 1 production components never used #4559

Open
opened 2026-04-08 14:33:22 +00:00 by HAL9000 · 0 comments
Owner

Bug Report

Feature Area: ACMS / Dependency Injection / Pipeline wiring
Severity: Medium
File: src/cleveragents/application/container.py

What Was Tested

The DI container's acms_pipeline provider was inspected to verify it wires the correct production pipeline implementation.

Expected Behavior (from spec)

The spec (docs/specification.md lines 30779–30791) defines production pipeline component implementations:

  • ConfidenceWeightedSelector (default: builtin:ConfidenceWeightedSelector)
  • ProportionalBudgetAllocator (default: builtin:ProportionalBudgetAllocator)
  • ParallelStrategyExecutor (default: builtin:ParallelStrategyExecutor)

These production implementations are implemented in src/cleveragents/application/services/acms_pipeline.py as ContextAssemblyPipeline, which extends ACMSPipeline with:

  • ConfidenceWeightedSelector (replaces DefaultStrategySelector)
  • ProportionalBudgetAllocator (replaces DefaultBudgetAllocator)
  • ParallelStrategyExecutor (replaces DefaultStrategyExecutor)
  • Per-stage timing instrumentation
  • CONTEXT_BUILT event emission

Actual Behavior

The DI container in src/cleveragents/application/container.py (lines 850–854) wires the base ACMSPipeline class instead of ContextAssemblyPipeline:

# container.py line 20
from cleveragents.application.services.acms_service import ACMSPipeline

# container.py lines 850-854
acms_pipeline = providers.Singleton(
    ACMSPipeline,  # ← Should be ContextAssemblyPipeline
    settings=settings,
    unit_of_work=unit_of_work,
    plugin_manager=plugin_manager,
)

The base ACMSPipeline uses pass-through default implementations:

  • DefaultStrategySelector (no confidence weighting)
  • DefaultBudgetAllocator (no min-budget enforcement)
  • DefaultStrategyExecutor (synchronous, no parallelism, no circuit breaking)

Steps to Reproduce

  1. Inspect src/cleveragents/application/container.py line 20 and lines 850–854
  2. Note ACMSPipeline is imported from acms_service (not acms_pipeline)
  3. Note ContextAssemblyPipeline is never imported or used in the container

Impact

  • All context assembly operations use synchronous, non-parallel strategy execution
  • No circuit breaking for failing strategies
  • No confidence-weighted strategy selection
  • No proportional budget allocation with min-budget enforcement
  • No per-stage timing metrics (last_timings property)
  • No CONTEXT_BUILT event emission
  • The builtin/context skill's request_context tool uses the base pipeline via _get_pipeline()container.acms_pipeline()

Code Location

  • src/cleveragents/application/container.py lines 20, 850–854
  • src/cleveragents/application/services/acms_pipeline.pyContextAssemblyPipeline (production implementation, never wired)

Fix

Change the container to use ContextAssemblyPipeline:

# Replace:
from cleveragents.application.services.acms_service import ACMSPipeline

# With:
from cleveragents.application.services.acms_pipeline import ContextAssemblyPipeline

# And update the provider:
acms_pipeline = providers.Singleton(
    ContextAssemblyPipeline,
    settings=settings,
    unit_of_work=unit_of_work,
    plugin_manager=plugin_manager,
    event_bus=event_bus,
)

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: uat-tester

## Bug Report **Feature Area:** ACMS / Dependency Injection / Pipeline wiring **Severity:** Medium **File:** `src/cleveragents/application/container.py` ### What Was Tested The DI container's `acms_pipeline` provider was inspected to verify it wires the correct production pipeline implementation. ### Expected Behavior (from spec) The spec (docs/specification.md lines 30779–30791) defines production pipeline component implementations: - `ConfidenceWeightedSelector` (default: `builtin:ConfidenceWeightedSelector`) - `ProportionalBudgetAllocator` (default: `builtin:ProportionalBudgetAllocator`) - `ParallelStrategyExecutor` (default: `builtin:ParallelStrategyExecutor`) These production implementations are implemented in `src/cleveragents/application/services/acms_pipeline.py` as `ContextAssemblyPipeline`, which extends `ACMSPipeline` with: - `ConfidenceWeightedSelector` (replaces `DefaultStrategySelector`) - `ProportionalBudgetAllocator` (replaces `DefaultBudgetAllocator`) - `ParallelStrategyExecutor` (replaces `DefaultStrategyExecutor`) - Per-stage timing instrumentation - `CONTEXT_BUILT` event emission ### Actual Behavior The DI container in `src/cleveragents/application/container.py` (lines 850–854) wires the **base `ACMSPipeline`** class instead of `ContextAssemblyPipeline`: ```python # container.py line 20 from cleveragents.application.services.acms_service import ACMSPipeline # container.py lines 850-854 acms_pipeline = providers.Singleton( ACMSPipeline, # ← Should be ContextAssemblyPipeline settings=settings, unit_of_work=unit_of_work, plugin_manager=plugin_manager, ) ``` The base `ACMSPipeline` uses pass-through default implementations: - `DefaultStrategySelector` (no confidence weighting) - `DefaultBudgetAllocator` (no min-budget enforcement) - `DefaultStrategyExecutor` (synchronous, no parallelism, no circuit breaking) ### Steps to Reproduce 1. Inspect `src/cleveragents/application/container.py` line 20 and lines 850–854 2. Note `ACMSPipeline` is imported from `acms_service` (not `acms_pipeline`) 3. Note `ContextAssemblyPipeline` is never imported or used in the container ### Impact - All context assembly operations use synchronous, non-parallel strategy execution - No circuit breaking for failing strategies - No confidence-weighted strategy selection - No proportional budget allocation with min-budget enforcement - No per-stage timing metrics (`last_timings` property) - No `CONTEXT_BUILT` event emission - The `builtin/context` skill's `request_context` tool uses the base pipeline via `_get_pipeline()` → `container.acms_pipeline()` ### Code Location - `src/cleveragents/application/container.py` lines 20, 850–854 - `src/cleveragents/application/services/acms_pipeline.py` — `ContextAssemblyPipeline` (production implementation, never wired) ### Fix Change the container to use `ContextAssemblyPipeline`: ```python # Replace: from cleveragents.application.services.acms_service import ACMSPipeline # With: from cleveragents.application.services.acms_pipeline import ContextAssemblyPipeline # And update the provider: acms_pipeline = providers.Singleton( ContextAssemblyPipeline, settings=settings, unit_of_work=unit_of_work, plugin_manager=plugin_manager, event_bus=event_bus, ) ``` --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.5.0 milestone 2026-04-08 17:41:41 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#4559
No description provided.