UAT: [AUTO-UAT-7] ACMSPipeline DI container wires sequential DefaultStrategyExecutor instead of ParallelStrategyExecutor — v3.4.0 Deliverable #10 not met #8965

Open
opened 2026-04-14 04:27:50 +00:00 by HAL9000 · 1 comment
Owner

Metadata

  • Commit Message: fix(acms): wire ParallelStrategyExecutor as default strategy executor in DI container
  • Branch: bugfix/m5-acms-parallel-strategy-executor

Background and Context

v3.4.0 Deliverable #10 states: "Pluggable context strategies execute in parallel" with the verifiable check: "Multiple strategies run concurrently; results fused by FragmentFusionCoordinator."

The spec's Key Architectural Constraints also state: "ParallelStrategyExecutor runs strategies concurrently with circuit-breaker protection per strategy."

ParallelStrategyExecutor is implemented in cleveragents.application.services.acms_pipeline and uses ThreadPoolExecutor for concurrent execution with circuit-breaker protection. However, the DI container (cleveragents.application.container) wires ACMSPipeline from cleveragents.application.services.acms_service, which defaults to DefaultStrategyExecutor — a sequential (non-parallel) executor.

The DefaultStrategyExecutor.execute() docstring explicitly states: "Future versions will invoke strategies in parallel with timeouts and circuit breaking."

Current Behavior

The DI container wires ACMSPipeline (from acms_service.py) with DefaultStrategyExecutor as the default strategy executor. Strategies are executed sequentially in a for loop, not concurrently.

# In acms_service.py DefaultStrategyExecutor.execute():
for strategy, _confidence, allocated_tokens in allocations:
    collected.extend(strategy.assemble(fragments, scoped_budget))

The ParallelStrategyExecutor (in acms_pipeline.py) exists and is correctly implemented with ThreadPoolExecutor, timeouts, and circuit-breaker protection, but is not wired as the default.

Expected Behavior

The DI container should wire ParallelStrategyExecutor as the default strategy_executor for ACMSPipeline, so that multiple context strategies execute concurrently per the spec.

Alternatively, the ACMSPipeline in acms_service.py should default to ParallelStrategyExecutor instead of DefaultStrategyExecutor.

Acceptance Criteria

  • The DI container wires ParallelStrategyExecutor as the default strategy executor for ACMSPipeline
  • Multiple context strategies execute concurrently when ACMSPipeline.assemble() is called
  • Circuit-breaker protection is active per strategy
  • BDD scenario verifies parallel execution (strategies run concurrently, not sequentially)
  • Existing ACMS pipeline tests continue to pass

Supporting Information

  • Spec reference: docs/specification.md §v3.4.0 Deliverable #10, Key Architectural Constraints
  • ParallelStrategyExecutor implementation: src/cleveragents/application/services/acms_pipeline.py
  • DefaultStrategyExecutor (sequential): src/cleveragents/application/services/acms_service.py
  • DI container wiring: src/cleveragents/application/container.py (line ~849)
  • Related: #7400 (feat: implement ACMS pipeline core components — StrategySelector, BudgetAllocator, StrategyExecutor)

Subtasks

  • Update DI container to wire ParallelStrategyExecutor as default for ACMSPipeline
  • Verify ACMSPipeline in acms_service.py uses ParallelStrategyExecutor by default
  • Add BDD scenario: parallel strategy execution produces concurrent results
  • Verify circuit-breaker protection is active per strategy
  • Run nox (all default sessions), fix any errors
  • Verify coverage ≥ 97% via nox -s coverage_report

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly.
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.

Filed by [AUTO-UAT-7] UAT Test Worker — v3.4.0 ACMS v1 Context Assembly & Budget Enforcement
Bot signature: CleverAgents UAT Bot | hal9000@cleverthis.com


Automated by CleverAgents Bot
Agent: new-issue-creator

## Metadata - **Commit Message**: `fix(acms): wire ParallelStrategyExecutor as default strategy executor in DI container` - **Branch**: `bugfix/m5-acms-parallel-strategy-executor` ## Background and Context v3.4.0 Deliverable #10 states: "Pluggable context strategies execute in parallel" with the verifiable check: "Multiple strategies run concurrently; results fused by `FragmentFusionCoordinator`." The spec's Key Architectural Constraints also state: "`ParallelStrategyExecutor` runs strategies concurrently with circuit-breaker protection per strategy." `ParallelStrategyExecutor` is implemented in `cleveragents.application.services.acms_pipeline` and uses `ThreadPoolExecutor` for concurrent execution with circuit-breaker protection. However, the DI container (`cleveragents.application.container`) wires `ACMSPipeline` from `cleveragents.application.services.acms_service`, which defaults to `DefaultStrategyExecutor` — a **sequential** (non-parallel) executor. The `DefaultStrategyExecutor.execute()` docstring explicitly states: "Future versions will invoke strategies in parallel with timeouts and circuit breaking." ## Current Behavior The DI container wires `ACMSPipeline` (from `acms_service.py`) with `DefaultStrategyExecutor` as the default strategy executor. Strategies are executed **sequentially** in a `for` loop, not concurrently. ```python # In acms_service.py DefaultStrategyExecutor.execute(): for strategy, _confidence, allocated_tokens in allocations: collected.extend(strategy.assemble(fragments, scoped_budget)) ``` The `ParallelStrategyExecutor` (in `acms_pipeline.py`) exists and is correctly implemented with `ThreadPoolExecutor`, timeouts, and circuit-breaker protection, but is not wired as the default. ## Expected Behavior The DI container should wire `ParallelStrategyExecutor` as the default `strategy_executor` for `ACMSPipeline`, so that multiple context strategies execute concurrently per the spec. Alternatively, the `ACMSPipeline` in `acms_service.py` should default to `ParallelStrategyExecutor` instead of `DefaultStrategyExecutor`. ## Acceptance Criteria - [ ] The DI container wires `ParallelStrategyExecutor` as the default strategy executor for `ACMSPipeline` - [ ] Multiple context strategies execute concurrently when `ACMSPipeline.assemble()` is called - [ ] Circuit-breaker protection is active per strategy - [ ] BDD scenario verifies parallel execution (strategies run concurrently, not sequentially) - [ ] Existing ACMS pipeline tests continue to pass ## Supporting Information - Spec reference: `docs/specification.md` §v3.4.0 Deliverable #10, Key Architectural Constraints - `ParallelStrategyExecutor` implementation: `src/cleveragents/application/services/acms_pipeline.py` - `DefaultStrategyExecutor` (sequential): `src/cleveragents/application/services/acms_service.py` - DI container wiring: `src/cleveragents/application/container.py` (line ~849) - Related: #7400 (feat: implement ACMS pipeline core components — StrategySelector, BudgetAllocator, StrategyExecutor) ## Subtasks - [ ] Update DI container to wire `ParallelStrategyExecutor` as default for `ACMSPipeline` - [ ] Verify `ACMSPipeline` in `acms_service.py` uses `ParallelStrategyExecutor` by default - [ ] Add BDD scenario: parallel strategy execution produces concurrent results - [ ] Verify circuit-breaker protection is active per strategy - [ ] Run `nox` (all default sessions), fix any errors - [ ] Verify coverage ≥ 97% via `nox -s coverage_report` ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. --- *Filed by [AUTO-UAT-7] UAT Test Worker — v3.4.0 ACMS v1 Context Assembly & Budget Enforcement* *Bot signature: CleverAgents UAT Bot | hal9000@cleverthis.com* --- **Automated by CleverAgents Bot** Agent: new-issue-creator
Author
Owner

Verified — UAT-identified bug: ACMS pipeline DI container wires wrong executor (sequential instead of parallel). This is a v3.4.0 deliverable failure. MoSCoW: Must-have. Priority: High.


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: project-owner-pool-supervisor

✅ **Verified** — UAT-identified bug: ACMS pipeline DI container wires wrong executor (sequential instead of parallel). This is a v3.4.0 deliverable failure. MoSCoW: Must-have. Priority: High. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner-pool-supervisor
HAL9000 added this to the v3.4.0 milestone 2026-04-14 05:28:28 +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#8965
No description provided.