UAT: ACMSPipeline initializes SkeletonCompressor (pipeline component #10) but never invokes it — child plan context inheritance skeleton is never produced #2491

Open
opened 2026-04-03 18:38:39 +00:00 by freemo · 2 comments
Owner

Metadata

  • Branch: fix/acms-skeleton-compressor-not-invoked
  • Commit Message: fix(acms): wire SkeletonCompressor into pipeline and subplan spawning path
  • Milestone: v3.4.0
  • Parent Epic: #396

Bug Report

Specification Reference

The spec (docs/specification.md, Architecture > ACMS > Context Assembly Pipeline) defines a 10-component pipeline. Component #10 is the SkeletonCompressor:

# Component Protocol Description
10 SkeletonCompressor SkeletonCompressorProtocol Compresses parent context into a skeleton for child plan inheritance

The spec states:

"Subplan spawned: PlanContextInheritance computes child context from parent. SkeletonCompressor propagates parent context as skeleton. New ResourceScope (possibly narrower)."

Actual Behavior

ACMSPipeline.__init__() in src/cleveragents/application/services/acms_service.py initializes self._skeleton_compressor (~line 690), and ContextAssemblyPipeline.__init__() in src/cleveragents/application/services/acms_pipeline.py also wires a SkeletonCompressor via resolve_configured_skeleton_compressor(). However, neither ACMSPipeline.assemble() nor ContextAssemblyPipeline.assemble() ever calls self._skeleton_compressor.compress(). The SkeletonCompressor is dead code within the pipeline.

A separate SkeletonCompressorService exists in src/cleveragents/application/services/skeleton_compressor.py and is registered in the DI container, but it is not wired to the subplan spawning path either (confirmed by checking subplan_service.py, plan_lifecycle_service.py, subplan_execution_service.py, and execute_phase_context_assembler.py — none reference skeleton compression).

Expected Behavior

The ACMSPipeline should expose a method (e.g., compress_for_child(fragments, skeleton_budget)) that invokes self._skeleton_compressor.compress() to produce a compressed skeleton of the parent's context for propagation to child plans. This method should be called by the subplan spawning logic when a new child plan is created.

Affected Code Locations

  • src/cleveragents/application/services/acms_service.pyACMSPipeline.assemble() never calls _skeleton_compressor
  • src/cleveragents/application/services/acms_pipeline.pyContextAssemblyPipeline.assemble() never calls _skeleton_compressor
  • src/cleveragents/application/services/subplan_service.py — missing skeleton compression call on subplan spawn
  • src/cleveragents/application/services/skeleton_compressor.pySkeletonCompressorService exists but is not wired to subplan spawning

Severity

High — child plans never receive a skeleton of their parent's context, breaking the hierarchical context inheritance model that is central to the ACMS design.

Subtasks

  • Write a failing Behave scenario (TDD) that reproduces the bug: ACMSPipeline.assemble() does not invoke SkeletonCompressor.compress() when a subplan is spawned
  • Write a failing Behave scenario (TDD) that reproduces the bug: subplan spawning path does not call skeleton compression
  • Add compress_for_child(fragments, skeleton_budget) method to ACMSPipeline that delegates to self._skeleton_compressor.compress()
  • Add compress_for_child(fragments, skeleton_budget) method to ContextAssemblyPipeline that delegates to self._skeleton_compressor.compress()
  • Wire compress_for_child() call into subplan_service.py at the point where a new child plan is spawned
  • Ensure SkeletonCompressorService in skeleton_compressor.py is invoked via the DI-resolved instance on the subplan spawning path
  • Verify plan_lifecycle_service.py, subplan_execution_service.py, and execute_phase_context_assembler.py correctly propagate the skeleton to the child plan's context
  • Tests (Behave): Confirm all new and existing scenarios pass via nox -e unit_tests
  • Tests (Robot): Add integration test verifying child plan receives parent skeleton on subplan spawn via nox -e integration_tests
  • Verify coverage >= 97% via nox -s coverage_report
  • Run nox (all default sessions), fix any errors

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 (fix(acms): wire SkeletonCompressor into pipeline and subplan spawning path), followed by a blank line, then additional lines providing relevant details about the implementation.
  • The commit footer includes ISSUES CLOSED: #<this issue number>.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly (fix/acms-skeleton-compressor-not-invoked).
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.
  • All nox stages pass.
  • Coverage >= 97%.

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

## Metadata - **Branch**: `fix/acms-skeleton-compressor-not-invoked` - **Commit Message**: `fix(acms): wire SkeletonCompressor into pipeline and subplan spawning path` - **Milestone**: v3.4.0 - **Parent Epic**: #396 ## Bug Report ### Specification Reference The spec (`docs/specification.md`, Architecture > ACMS > Context Assembly Pipeline) defines a 10-component pipeline. Component #10 is the `SkeletonCompressor`: | # | Component | Protocol | Description | |---|-----------|----------|-------------| | 10 | SkeletonCompressor | `SkeletonCompressorProtocol` | Compresses parent context into a skeleton for child plan inheritance | The spec states: > "Subplan spawned: PlanContextInheritance computes child context from parent. SkeletonCompressor propagates parent context as skeleton. New ResourceScope (possibly narrower)." ### Actual Behavior `ACMSPipeline.__init__()` in `src/cleveragents/application/services/acms_service.py` initializes `self._skeleton_compressor` (~line 690), and `ContextAssemblyPipeline.__init__()` in `src/cleveragents/application/services/acms_pipeline.py` also wires a `SkeletonCompressor` via `resolve_configured_skeleton_compressor()`. However, **neither** `ACMSPipeline.assemble()` **nor** `ContextAssemblyPipeline.assemble()` ever calls `self._skeleton_compressor.compress()`. The `SkeletonCompressor` is dead code within the pipeline. A separate `SkeletonCompressorService` exists in `src/cleveragents/application/services/skeleton_compressor.py` and is registered in the DI container, but it is not wired to the subplan spawning path either (confirmed by checking `subplan_service.py`, `plan_lifecycle_service.py`, `subplan_execution_service.py`, and `execute_phase_context_assembler.py` — none reference skeleton compression). ### Expected Behavior The `ACMSPipeline` should expose a method (e.g., `compress_for_child(fragments, skeleton_budget)`) that invokes `self._skeleton_compressor.compress()` to produce a compressed skeleton of the parent's context for propagation to child plans. This method should be called by the subplan spawning logic when a new child plan is created. ### Affected Code Locations - `src/cleveragents/application/services/acms_service.py` — `ACMSPipeline.assemble()` never calls `_skeleton_compressor` - `src/cleveragents/application/services/acms_pipeline.py` — `ContextAssemblyPipeline.assemble()` never calls `_skeleton_compressor` - `src/cleveragents/application/services/subplan_service.py` — missing skeleton compression call on subplan spawn - `src/cleveragents/application/services/skeleton_compressor.py` — `SkeletonCompressorService` exists but is not wired to subplan spawning ### Severity **High** — child plans never receive a skeleton of their parent's context, breaking the hierarchical context inheritance model that is central to the ACMS design. ## Subtasks - [ ] Write a failing Behave scenario (TDD) that reproduces the bug: `ACMSPipeline.assemble()` does not invoke `SkeletonCompressor.compress()` when a subplan is spawned - [ ] Write a failing Behave scenario (TDD) that reproduces the bug: subplan spawning path does not call skeleton compression - [ ] Add `compress_for_child(fragments, skeleton_budget)` method to `ACMSPipeline` that delegates to `self._skeleton_compressor.compress()` - [ ] Add `compress_for_child(fragments, skeleton_budget)` method to `ContextAssemblyPipeline` that delegates to `self._skeleton_compressor.compress()` - [ ] Wire `compress_for_child()` call into `subplan_service.py` at the point where a new child plan is spawned - [ ] Ensure `SkeletonCompressorService` in `skeleton_compressor.py` is invoked via the DI-resolved instance on the subplan spawning path - [ ] Verify `plan_lifecycle_service.py`, `subplan_execution_service.py`, and `execute_phase_context_assembler.py` correctly propagate the skeleton to the child plan's context - [ ] Tests (Behave): Confirm all new and existing scenarios pass via `nox -e unit_tests` - [ ] Tests (Robot): Add integration test verifying child plan receives parent skeleton on subplan spawn via `nox -e integration_tests` - [ ] Verify coverage >= 97% via `nox -s coverage_report` - [ ] Run `nox` (all default sessions), fix any errors ## 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 (`fix(acms): wire SkeletonCompressor into pipeline and subplan spawning path`), followed by a blank line, then additional lines providing relevant details about the implementation. - The commit footer includes `ISSUES CLOSED: #<this issue number>`. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly (`fix/acms-skeleton-compressor-not-invoked`). - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. - All nox stages pass. - Coverage >= 97%. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-uat-tester
freemo added this to the v3.4.0 milestone 2026-04-03 18:38:44 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • MoSCoW: Should Have — Spec compliance or quality improvement that should be included in the milestone.

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

Issue triaged by project owner: - **State**: Verified - **MoSCoW**: Should Have — Spec compliance or quality improvement that should be included in the milestone. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Confirmed
  • MoSCoW: Should Have (already set)

Valid finding verified during batch triage.


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

Issue triaged by project owner: - **State**: Verified - **Priority**: Confirmed - **MoSCoW**: Should Have (already set) Valid finding verified during batch triage. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
freemo removed this from the v3.4.0 milestone 2026-04-06 21:01:30 +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#2491
No description provided.