UAT: ACMSPipeline.assemble() silently filters to single-strategy execution — multi-strategy parallel fusion not implemented #3598

Open
opened 2026-04-05 20:16:36 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: fix/v3.5.0/acms-multi-strategy-parallel-fusion
  • Commit Message: fix(acms): remove single-strategy filter to enable parallel multi-strategy fusion
  • Milestone: v3.5.0 (M6 - Autonomy Hardening + Stubs)
  • Parent Epic: #396

Summary

The ACMSPipeline.assemble() method in acms_service.py and ContextAssemblyPipeline.assemble() in acms_pipeline.py both contain a filter that silently reduces multi-strategy candidate lists to a single strategy, preventing the spec-required parallel multi-strategy fusion from ever executing.

What Was Tested

Code-level analysis of src/cleveragents/application/services/acms_service.py and src/cleveragents/application/services/acms_pipeline.py.

Expected Behavior (from spec)

Per docs/specification.md §25203 and §44780:

"Multiple independent context strategies can be registered, each working with different data backends and different abstraction levels of the UKO. The pipeline orchestrates strategy selection, budget allocation, parallel execution, fragment deduplication, depth resolution, scoring, budget packing, ordering, preamble generation, and skeleton compression."

The StrategyExecutor is explicitly described as executing strategies in parallel (§42918: ParallelStrategyExecutor). The BudgetAllocator distributes budget across multiple strategies proportionally.

Actual Behavior

In both acms_service.py (line ~490) and acms_pipeline.py (line ~490), after the StrategySelector returns candidates, the code immediately filters them to a single strategy:

# From acms_service.py and acms_pipeline.py:
candidates = [(s, c) for s, c in candidates if s.name == strategy_name] or [
    (resolved, 1.0)
]

This means:

  1. Even when multiple strategies are registered and selected by ConfidenceWeightedSelector, only the one matching strategy_name is passed to BudgetAllocator and StrategyExecutor
  2. The ParallelStrategyExecutor never actually executes strategies in parallel — it always receives exactly one strategy
  3. The ProportionalBudgetAllocator always allocates 100% of budget to a single strategy
  4. The spec's multi-strategy fusion (deduplication across strategy outputs, cross-strategy scoring) never occurs

The comment in the code acknowledges this: "future multi-strategy support will remove this filter".

Code Locations

  • src/cleveragents/application/services/acms_service.py lines ~488-492
  • src/cleveragents/application/services/acms_pipeline.py lines ~488-492

Impact

The ACMS's core value proposition — combining multiple context strategies (semantic search + graph navigation + keyword matching) for higher-quality context assembly — is completely disabled. All context assembly uses only a single strategy regardless of configuration. This directly blocks M6 acceptance criteria for "context scaling" and "context-aware execution".

Steps to Reproduce

  1. Create an ACMSPipeline with multiple strategies registered
  2. Call assemble() without specifying a strategy parameter
  3. Observe that only the default_strategy is ever invoked, regardless of how many strategies are registered

Subtasks

  • Remove the single-strategy filter from ACMSPipeline.assemble() in acms_service.py (~line 488-492)
  • Remove the single-strategy filter from ContextAssemblyPipeline.assemble() in acms_pipeline.py (~line 488-492)
  • Verify ParallelStrategyExecutor correctly receives and executes all selected strategies concurrently
  • Verify ProportionalBudgetAllocator correctly distributes budget across multiple strategies
  • Verify multi-strategy fragment deduplication and cross-strategy scoring execute correctly
  • Write BDD scenario: multi-strategy parallel fusion produces merged context output
  • Write BDD scenario: single-strategy fallback still works when only one strategy is registered
  • Update integration test in robot/ to exercise multi-strategy assembly end-to-end

Definition of Done

  • Single-strategy filter removed from both acms_service.py and acms_pipeline.py
  • ParallelStrategyExecutor executes all selected strategies in parallel
  • ProportionalBudgetAllocator distributes budget proportionally across all selected strategies
  • Multi-strategy fragment deduplication and scoring execute as specified in §25203 and §44780
  • All new BDD scenarios pass under nox -e unit_tests
  • Integration test exercises multi-strategy assembly end-to-end under nox -e integration_tests
  • All nox stages pass
  • Coverage >= 97%

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: ca-new-issue-creator

## Metadata - **Branch**: `fix/v3.5.0/acms-multi-strategy-parallel-fusion` - **Commit Message**: `fix(acms): remove single-strategy filter to enable parallel multi-strategy fusion` - **Milestone**: v3.5.0 (M6 - Autonomy Hardening + Stubs) - **Parent Epic**: #396 ## Summary The `ACMSPipeline.assemble()` method in `acms_service.py` and `ContextAssemblyPipeline.assemble()` in `acms_pipeline.py` both contain a filter that silently reduces multi-strategy candidate lists to a single strategy, preventing the spec-required parallel multi-strategy fusion from ever executing. ## What Was Tested Code-level analysis of `src/cleveragents/application/services/acms_service.py` and `src/cleveragents/application/services/acms_pipeline.py`. ## Expected Behavior (from spec) Per `docs/specification.md` §25203 and §44780: > "Multiple independent context strategies can be registered, each working with different data backends and different abstraction levels of the UKO. The pipeline orchestrates strategy selection, budget allocation, **parallel execution**, fragment deduplication, depth resolution, scoring, budget packing, ordering, preamble generation, and skeleton compression." The `StrategyExecutor` is explicitly described as executing strategies **in parallel** (§42918: `ParallelStrategyExecutor`). The `BudgetAllocator` distributes budget across **multiple** strategies proportionally. ## Actual Behavior In both `acms_service.py` (line ~490) and `acms_pipeline.py` (line ~490), after the `StrategySelector` returns candidates, the code immediately filters them to a single strategy: ```python # From acms_service.py and acms_pipeline.py: candidates = [(s, c) for s, c in candidates if s.name == strategy_name] or [ (resolved, 1.0) ] ``` This means: 1. Even when multiple strategies are registered and selected by `ConfidenceWeightedSelector`, only the one matching `strategy_name` is passed to `BudgetAllocator` and `StrategyExecutor` 2. The `ParallelStrategyExecutor` never actually executes strategies in parallel — it always receives exactly one strategy 3. The `ProportionalBudgetAllocator` always allocates 100% of budget to a single strategy 4. The spec's multi-strategy fusion (deduplication across strategy outputs, cross-strategy scoring) never occurs The comment in the code acknowledges this: `"future multi-strategy support will remove this filter"`. ## Code Locations - `src/cleveragents/application/services/acms_service.py` lines ~488-492 - `src/cleveragents/application/services/acms_pipeline.py` lines ~488-492 ## Impact The ACMS's core value proposition — combining multiple context strategies (semantic search + graph navigation + keyword matching) for higher-quality context assembly — is completely disabled. All context assembly uses only a single strategy regardless of configuration. This directly blocks M6 acceptance criteria for "context scaling" and "context-aware execution". ## Steps to Reproduce 1. Create an `ACMSPipeline` with multiple strategies registered 2. Call `assemble()` without specifying a `strategy` parameter 3. Observe that only the `default_strategy` is ever invoked, regardless of how many strategies are registered ## Subtasks - [ ] Remove the single-strategy filter from `ACMSPipeline.assemble()` in `acms_service.py` (~line 488-492) - [ ] Remove the single-strategy filter from `ContextAssemblyPipeline.assemble()` in `acms_pipeline.py` (~line 488-492) - [ ] Verify `ParallelStrategyExecutor` correctly receives and executes all selected strategies concurrently - [ ] Verify `ProportionalBudgetAllocator` correctly distributes budget across multiple strategies - [ ] Verify multi-strategy fragment deduplication and cross-strategy scoring execute correctly - [ ] Write BDD scenario: multi-strategy parallel fusion produces merged context output - [ ] Write BDD scenario: single-strategy fallback still works when only one strategy is registered - [ ] Update integration test in `robot/` to exercise multi-strategy assembly end-to-end ## Definition of Done - [ ] Single-strategy filter removed from both `acms_service.py` and `acms_pipeline.py` - [ ] `ParallelStrategyExecutor` executes all selected strategies in parallel - [ ] `ProportionalBudgetAllocator` distributes budget proportionally across all selected strategies - [ ] Multi-strategy fragment deduplication and scoring execute as specified in §25203 and §44780 - [ ] All new BDD scenarios pass under `nox -e unit_tests` - [ ] Integration test exercises multi-strategy assembly end-to-end under `nox -e integration_tests` - [ ] All nox stages pass - [ ] Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
freemo added this to the v3.5.0 milestone 2026-04-05 20:16:41 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Critical — ACMSPipeline.assemble() silently filters to single-strategy execution. Multi-strategy parallel execution is broken — only one strategy runs even when multiple are configured.
  • Milestone: v3.5.0 (already assigned)
  • Story Points: 5 — L — Requires fixing the strategy execution pipeline to support parallel multi-strategy execution as specified.
  • MoSCoW: Must Have — Multi-strategy context assembly is a core ACMS v1 feature. The spec requires parallel strategy execution with result fusion. Single-strategy fallback produces incomplete context views.

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

Issue triaged by project owner: - **State**: Verified - **Priority**: Critical — `ACMSPipeline.assemble()` silently filters to single-strategy execution. Multi-strategy parallel execution is broken — only one strategy runs even when multiple are configured. - **Milestone**: v3.5.0 (already assigned) - **Story Points**: 5 — L — Requires fixing the strategy execution pipeline to support parallel multi-strategy execution as specified. - **MoSCoW**: Must Have — Multi-strategy context assembly is a core ACMS v1 feature. The spec requires parallel strategy execution with result fusion. Single-strategy fallback produces incomplete context views. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
freemo removed this from the v3.5.0 milestone 2026-04-06 21:05:31 +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.

Blocks
#396 Epic: ACMS Context Pipeline
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#3598
No description provided.