UAT: ContextAssemblyPipeline ships with stub fusion/finalization components #7965

Open
opened 2026-04-12 16:11:23 +00:00 by HAL9000 · 0 comments
Owner

What happened

ContextAssemblyPipeline (and the underlying ACMSPipeline) still instantiate the placeholder Phase 2/3 components instead of the production implementations promised in docs/specification.md. The default constructor wires in DefaultDeduplicator, DefaultDepthResolver, DefaultScorer, DefaultOrderer, and DefaultPreambleGenerator, all of which are no-ops that simply pass the fragment list through. The production-grade implementations live in acms_phase2.py and acms_phase3.py (ContentHashDeduplicator, MaxDepthResolver, WeightedCompositeScorer, RelevanceCoherenceOrderer, ProvenancePreambleGenerator), but they are never activated.

Observed by instantiating the pipeline in a REPL:

>>> from cleveragents.application.services.acms_pipeline import ContextAssemblyPipeline
>>> pipeline = ContextAssemblyPipeline()
>>> type(pipeline._deduplicator).__name__, type(pipeline._depth_resolver).__name__, type(pipeline._scorer).__name__, type(pipeline._orderer).__name__, type(pipeline._preamble_generator).__name__
('DefaultDeduplicator', 'DefaultDepthResolver', 'DefaultScorer', 'DefaultOrderer', 'DefaultPreambleGenerator')

DefaultDeduplicator et al. are defined in acms_service.py (lines 626-675) and are straight pass-throughs. In contrast, acms_phase2.py & acms_phase3.py contain the spec-compliant implementations that were supposed to power Phase 2 (dedupe, depth conflict resolution, composite scoring, greedy knapsack packing) and Phase 3 (ordering + provenance preamble).

Impact

  • Phase 2 behavior regresses to "first strategy output wins": no content hashing, no max-depth reconciliation, no composite scoring — whichever fragment happens to be first keeps its raw relevance.
  • Phase 3 preamble generation never runs, so assembled payloads ship without the provenance summary that the spec and BDD feature files (e.g. features/acms_pipeline_phase2.feature, features/acms_pipeline_phase3.feature) expect.
  • The dedicated FusionEngine facade is effectively dead code; nothing wires it into the pipeline.
  • Downstream consumers (Execute phase assembler, plan inheritance) receive unprocessed fragments, breaking the spec requirements for Phase 2/3 of the ACMS pipeline.

Expected

The default pipeline should compose the production components: ContentHashDeduplicator, MaxDepthResolver, WeightedCompositeScorer, GreedyKnapsackPacker, RelevanceCoherenceOrderer, and ProvenancePreambleGenerator (plus the configured skeleton compressor). That is what the spec-approved modules and BDD suites target. ContextAssemblyPipeline should either construct these directly or delegate to FusionEngine for Phase 2 before running the Phase 3 finalization steps.

Suggested fix

  1. Update ContextAssemblyPipeline.__init__ to default to the production implementations (or to a FusionEngine helper) instead of the placeholder classes.
  2. Remove the obsolete Default* pass-throughs or keep them only for explicit opt-in/testing.
  3. Add a regression test that assembles fragments with duplicates + mixed depths and asserts that the deduplicator, resolver, scorer, orderer, and preamble generator actually run.

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

### What happened ContextAssemblyPipeline (and the underlying ACMSPipeline) still instantiate the placeholder Phase 2/3 components instead of the production implementations promised in docs/specification.md. The default constructor wires in `DefaultDeduplicator`, `DefaultDepthResolver`, `DefaultScorer`, `DefaultOrderer`, and `DefaultPreambleGenerator`, all of which are no-ops that simply pass the fragment list through. The production-grade implementations live in `acms_phase2.py` and `acms_phase3.py` (ContentHashDeduplicator, MaxDepthResolver, WeightedCompositeScorer, RelevanceCoherenceOrderer, ProvenancePreambleGenerator), but they are never activated. Observed by instantiating the pipeline in a REPL: ```python >>> from cleveragents.application.services.acms_pipeline import ContextAssemblyPipeline >>> pipeline = ContextAssemblyPipeline() >>> type(pipeline._deduplicator).__name__, type(pipeline._depth_resolver).__name__, type(pipeline._scorer).__name__, type(pipeline._orderer).__name__, type(pipeline._preamble_generator).__name__ ('DefaultDeduplicator', 'DefaultDepthResolver', 'DefaultScorer', 'DefaultOrderer', 'DefaultPreambleGenerator') ``` `DefaultDeduplicator` et al. are defined in `acms_service.py` (lines 626-675) and are straight pass-throughs. In contrast, `acms_phase2.py` & `acms_phase3.py` contain the spec-compliant implementations that were supposed to power Phase 2 (dedupe, depth conflict resolution, composite scoring, greedy knapsack packing) and Phase 3 (ordering + provenance preamble). ### Impact * Phase 2 behavior regresses to "first strategy output wins": no content hashing, no max-depth reconciliation, no composite scoring — whichever fragment happens to be first keeps its raw relevance. * Phase 3 preamble generation never runs, so assembled payloads ship without the provenance summary that the spec and BDD feature files (e.g. `features/acms_pipeline_phase2.feature`, `features/acms_pipeline_phase3.feature`) expect. * The dedicated `FusionEngine` facade is effectively dead code; nothing wires it into the pipeline. * Downstream consumers (Execute phase assembler, plan inheritance) receive unprocessed fragments, breaking the spec requirements for Phase 2/3 of the ACMS pipeline. ### Expected The default pipeline should compose the production components: `ContentHashDeduplicator`, `MaxDepthResolver`, `WeightedCompositeScorer`, `GreedyKnapsackPacker`, `RelevanceCoherenceOrderer`, and `ProvenancePreambleGenerator` (plus the configured skeleton compressor). That is what the spec-approved modules and BDD suites target. `ContextAssemblyPipeline` should either construct these directly or delegate to `FusionEngine` for Phase 2 before running the Phase 3 finalization steps. ### Suggested fix 1. Update `ContextAssemblyPipeline.__init__` to default to the production implementations (or to a `FusionEngine` helper) instead of the placeholder classes. 2. Remove the obsolete `Default*` pass-throughs or keep them only for explicit opt-in/testing. 3. Add a regression test that assembles fragments with duplicates + mixed depths and asserts that the deduplicator, resolver, scorer, orderer, and preamble generator actually run. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
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#7965
No description provided.