UAT: AssembledContext in crp.py missing spec-required skeleton_fragments field for child plan context inheritance #4429

Closed
opened 2026-04-08 12:32:55 +00:00 by HAL9000 · 2 comments
Owner

Bug Report

Feature Area: ACMS — Context Request Protocol (CRP) / AssembledContext
Severity: Medium
Found by: UAT tester worker (ACMS context management)

What Was Tested

The AssembledContext dataclass in src/cleveragents/domain/models/acms/crp.py compared against the spec's definition (spec line 25563–25574).

Expected Behavior (from spec §25563-25574)

The spec defines AssembledContext with the following fields:

@dataclass
class AssembledContext:
    """The fused, budget-respecting context payload."""
    fragments: list[ContextFragment]
    total_tokens: int
    budget_used: float
    strategies_used: list[str]
    context_hash: str
    preamble: str | None
    provenance_map: dict
    skeleton_fragments: tuple[ContextFragment, ...] = ()  # Compressed parent context for child plan inheritance

The skeleton_fragments field is required by the spec and is used for child plan context inheritance — it carries the compressed parent context skeleton that child plans receive to maintain the "big picture" while focusing on a narrow area.

Actual Behavior

AssembledContext in src/cleveragents/domain/models/acms/crp.py is missing the skeleton_fragments field:

# Actual fields in crp.py AssembledContext:
# fragments, total_tokens, budget_used, strategies_used, context_hash, preamble, provenance_map
# MISSING: skeleton_fragments

Verified via runtime check:

from cleveragents.domain.models.acms.crp import AssembledContext
fields = AssembledContext.model_fields
# 'skeleton_fragments' NOT in fields

Note: The ContextPayload class in src/cleveragents/domain/models/core/context_fragment.py does have skeleton_fragments (line 212), but AssembledContext (the CRP-level type) does not. This creates an inconsistency between the CRP domain model and the core implementation.

Code Location

  • src/cleveragents/domain/models/acms/crp.pyAssembledContext class (lines 322–365)
  • Spec reference: docs/specification.md line 25574

Impact

Any code that uses AssembledContext directly (rather than ContextPayload) cannot access skeleton_fragments. Strategies and pipeline components that produce AssembledContext objects cannot include skeleton context for child plan inheritance, breaking the hierarchical context inheritance described in the spec.

Steps to Reproduce

from cleveragents.domain.models.acms.crp import AssembledContext
fields = AssembledContext.model_fields
assert 'skeleton_fragments' in fields  # FAILS

Definition of Done

  • AssembledContext in crp.py has a skeleton_fragments: tuple[ContextFragment, ...] = () field
  • The field is documented as "Compressed parent context for child plan inheritance"
  • Tests verify that skeleton_fragments can be set and retrieved from AssembledContext

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

## Bug Report **Feature Area:** ACMS — Context Request Protocol (CRP) / AssembledContext **Severity:** Medium **Found by:** UAT tester worker (ACMS context management) ### What Was Tested The `AssembledContext` dataclass in `src/cleveragents/domain/models/acms/crp.py` compared against the spec's definition (spec line 25563–25574). ### Expected Behavior (from spec §25563-25574) The spec defines `AssembledContext` with the following fields: ```python @dataclass class AssembledContext: """The fused, budget-respecting context payload.""" fragments: list[ContextFragment] total_tokens: int budget_used: float strategies_used: list[str] context_hash: str preamble: str | None provenance_map: dict skeleton_fragments: tuple[ContextFragment, ...] = () # Compressed parent context for child plan inheritance ``` The `skeleton_fragments` field is **required by the spec** and is used for child plan context inheritance — it carries the compressed parent context skeleton that child plans receive to maintain the "big picture" while focusing on a narrow area. ### Actual Behavior `AssembledContext` in `src/cleveragents/domain/models/acms/crp.py` is missing the `skeleton_fragments` field: ```python # Actual fields in crp.py AssembledContext: # fragments, total_tokens, budget_used, strategies_used, context_hash, preamble, provenance_map # MISSING: skeleton_fragments ``` Verified via runtime check: ```python from cleveragents.domain.models.acms.crp import AssembledContext fields = AssembledContext.model_fields # 'skeleton_fragments' NOT in fields ``` Note: The `ContextPayload` class in `src/cleveragents/domain/models/core/context_fragment.py` **does** have `skeleton_fragments` (line 212), but `AssembledContext` (the CRP-level type) does not. This creates an inconsistency between the CRP domain model and the core implementation. ### Code Location - `src/cleveragents/domain/models/acms/crp.py` — `AssembledContext` class (lines 322–365) - Spec reference: `docs/specification.md` line 25574 ### Impact Any code that uses `AssembledContext` directly (rather than `ContextPayload`) cannot access `skeleton_fragments`. Strategies and pipeline components that produce `AssembledContext` objects cannot include skeleton context for child plan inheritance, breaking the hierarchical context inheritance described in the spec. ### Steps to Reproduce ```python from cleveragents.domain.models.acms.crp import AssembledContext fields = AssembledContext.model_fields assert 'skeleton_fragments' in fields # FAILS ``` ### Definition of Done - `AssembledContext` in `crp.py` has a `skeleton_fragments: tuple[ContextFragment, ...] = ()` field - The field is documented as "Compressed parent context for child plan inheritance" - Tests verify that `skeleton_fragments` can be set and retrieved from `AssembledContext` --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.5.0 milestone 2026-04-08 17:42:28 +00:00
Author
Owner

🔁 Duplicate Detection

This issue duplicates #4555 ("UAT: AssembledContext in crp.py missing spec-required skeleton_fragments field"), which was filed later but has already been closed as completed.

Both issues report the same bug: AssembledContext in crp.py is missing the skeleton_fragments field.

Action: Closing this issue as a duplicate of #4555 (which is already resolved).


Automated by CleverAgents Bot
Supervisor: Backlog Grooming | Agent: backlog-groomer

## 🔁 Duplicate Detection This issue duplicates #4555 ("UAT: `AssembledContext` in `crp.py` missing spec-required `skeleton_fragments` field"), which was filed later but has already been closed as completed. Both issues report the same bug: `AssembledContext` in `crp.py` is missing the `skeleton_fragments` field. **Action:** Closing this issue as a duplicate of #4555 (which is already resolved). --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: backlog-groomer
Author
Owner

State label reconciliation:

  • Previous state: State/In Progress
  • Corrected to: State/Completed
  • Reason: Issue is closed but had a non-terminal state label. Per CONTRIBUTING.md, closed issues must have State/Completed or State/Wont Do.

Automated by CleverAgents Bot
Supervisor: Backlog Grooming | Agent: backlog-groomer

State label reconciliation: - Previous state: `State/In Progress` - Corrected to: `State/Completed` - Reason: Issue is closed but had a non-terminal state label. Per CONTRIBUTING.md, closed issues must have `State/Completed` or `State/Wont Do`. --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: backlog-groomer
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#4429
No description provided.