fix(acms): invoke SkeletonCompressor in ContextAssembler.assemble() to propagate skeleton context to child plans #3676
No reviewers
Labels
No labels
auto/needs-reevaluation
controller-managed
auto/blocked-by-deps
auto/ci-timeout
auto/claimed-implementer
auto/claimed-merge
auto/claimed-reviewer
auto/driver-down
auto/invariant-violation
auto/last-attempt-tier-0
auto/last-attempt-tier-1
auto/last-attempt-tier-2
auto/last-attempt-tier-min
Automation Tracking
auto/needs-conflict-resolution
auto/needs-implementer
auto/postmortem
auto/ready-to-merge
auto/restart-throttled
auto/revert
auto/sentinel
auto/stale-inactivity
auto/unstable
Blocked
Bounty
$100
Bounty
$1000
Bounty
$10000
Bounty
$20
Bounty
$2000
Bounty
$250
Bounty
$50
Bounty
$500
Bounty
$5000
Bounty
$750
MoSCoW
Could have
MoSCoW
Must have
MoSCoW
Should have
Needs Feedback
Points
1
Points
13
Points
2
Points
21
Points
3
Points
34
Points
5
Points
55
Points
8
Points
88
Priority
Backlog
Priority
CI Blocker
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Signed-off: Owner
Signed-off: Scrum Master
Signed-off: Tech Lead
Spike
State
Completed
State
Duplicate
State
In Progress
State
In Review
State
Paused
State
Unverified
State
Verified
State
Wont Do
Type
Automation
Type
Bug
Type
Discussion
Type
Documentation
Type
Epic
Type
Feature
Type
Legendary
Type
Refactor
Type
Support
Type
Task
Type
Testing
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Reference
cleveragents/cleveragents-core!3676
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/acms-skeleton-compressor-never-invoked"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Fixes a critical bug where
SkeletonCompressorwas wired intoACMSPipelinebut never actually invoked during context assembly, rendering the entire context inheritance mechanism for hierarchical plan decomposition non-functional. Child plans now correctly receive a compressed skeleton of their parent plan's accumulated context.Changes
context_fragment.py— Addedskeleton_fragments: tuple[ContextFragment, ...]field toContextPayload. Previously, there was no field on the payload to carry compressed skeleton output, so even if the compressor had been called, its results would have had nowhere to go.acms_service.py— Addedskeleton_ratio: float = 0.15andparent_fragments: tuple[ContextFragment, ...] | None = Noneparameters toACMSPipeline.assemble(). In Phase 3 ofassemble(), now computesskeleton_budget = int(budget.available_tokens * skeleton_ratio)and invokesself._skeleton_compressor.compress(parent_fragments, skeleton_budget). The resulting compressed fragments are included in the returnedContextPayload.skeleton_fragments. Previously,self._skeleton_compressorwas assigned in__init__()at line 690 and never referenced again anywhere in the file.acms_pipeline.py— Applied the sameskeleton_ratioandparent_fragmentsparameter additions andself._skeleton_compressor.compress()invocation toContextAssemblyPipeline.assemble(), mirroring the fix inacms_service.pyto maintain consistency across both pipeline entry points.helper_acms_pipeline.py— Addedskeleton-context-inheritancecommand to support the new Robot Framework integration test scenario.Behave unit tests — Added a TDD issue-capture scenario tagged
@tdd_issue @tdd_issue_3563and 4 new scenarios asserting: (1) compressor is invoked duringassemble(), (2) compressor receives correctparent_fragmentsandskeleton_budgetarguments, (3) assembledContextPayloadcontains non-emptyskeleton_fragments, and (4)skeleton_ratiocorrectly governs the skeleton token budget.Robot Framework integration test — Added end-to-end test: a parent plan accumulates context → a child plan is spawned → the child plan's assembled context contains a non-empty skeleton, verifying the full context inheritance chain.
Design Decisions
skeleton_ratiodefaults to0.15— Matches the--skeleton-ratioCLI flag default defined in the specification.parent_fragmentsdefaults toNone— Preserves full backward compatibility; existing call sites require no changes.budget.available_tokens—skeleton_budget = int(budget.available_tokens * skeleton_ratio)ties the skeleton size to the same token budget governing the rest of context assembly.ACMSPipelineandContextAssemblyPipelinefixed in tandem — Both exposeassemble()and both had the same omission.Testing
Closes #3563
Automated by CleverAgents Bot
Supervisor: Implementation | Agent: ca-pr-api-creator
SkeletonCompressoris stored but never invoked inContextAssembler.assemble()— context inheritance to child plans is brokenCode Review — PR #3676
Focus Areas: specification-compliance, test-coverage-quality, behavior-correctness
VERDICT: APPROVE ✅
Overview
This PR fixes a critical bug where
SkeletonCompressorwas wired intoACMSPipelinebut never actually invoked during context assembly. Child plans now correctly receive compressed skeleton context from their parent plans.✅ Specification Compliance
skeleton_ratiodefaults to0.15— matches the--skeleton-ratioCLI flag default per spec ✅parent_fragmentsdefaults toNone— backward compatible ✅ACMSPipelineandContextAssemblyPipelinefixed in tandem ✅✅ Test Coverage Quality
@tdd_issue @tdd_issue_3563✅✅ Design Decisions
skeleton_budget = int(budget.available_tokens * skeleton_ratio)— ties skeleton size to token budget ✅ContextPayload.skeleton_fragmentsfield added — provides a place for compressed output ✅This PR is ready to merge.
Automated by CleverAgents Bot
Supervisor: PR Review | Agent: ca-continuous-pr-reviewer
SkeletonCompressoris stored but never invoked inContextAssembler.assemble()— context inheritance to child plans is broken #3563HAL9000 referenced this pull request2026-04-09 05:48:51 +00:00