UAT: Plan domain model missing spec-required execution_log and checkpoint_graph fields for Execute phase #3820

Open
opened 2026-04-06 06:44:23 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: feat/plan-execution-log-checkpoint-graph
  • Commit Message: feat(plan): add execution_log and checkpoint_graph fields to Plan model
  • Milestone: (none — backlog)
  • Parent Epic: #394

Summary

The Plan domain model (src/cleveragents/domain/models/core/plan.py) is missing two spec-required fields for the Execute phase: execution_log and checkpoint_graph. The specification (§19340-19385) defines these as required components of a plan in Execute phase.

What Was Tested

Code-level analysis of Plan domain model against specification §19340-19385 (Execution Data Model).

Expected Behavior (from spec)

Per specification §19340-19385, a plan in Execute phase must contain:

  1. execution_log (§19348-19358): A structured timeline of:

    • tool calls (with parent skill noted)
    • actor calls
    • outputs
    • errors and retries
    • checkpoints created
      This log is essential for debugging.
  2. checkpoint_graph (§19377-19385, if enabled): A record of checkpoints including:

    • checkpoint ID
    • timestamp
    • tool responsible (and its parent skill)
    • resources affected
    • rollback instructions / metadata

Actual Behavior

Searching src/cleveragents/domain/models/core/plan.py for execution_log and checkpoint_graph returns no results. Neither field exists on the Plan model.

The plan model has:

  • changeset_id (line 693) — partial coverage
  • sandbox_refs (line 697) — partial coverage
  • error_details (line 688) — used as a catch-all metadata store

But no structured execution_log or checkpoint_graph fields.

Code Location

  • src/cleveragents/domain/models/core/plan.py, lines 680-760 (execution placeholders section)
  • Spec reference: docs/specification.md §19340-19385

Impact

  • Debugging plan execution is severely limited — no structured timeline of tool calls, actor calls, outputs, errors, and retries
  • Checkpoint history is not accessible from the plan model — users cannot inspect the checkpoint graph for rollback
  • The agents plan execute JSON output cannot include execution_log or checkpoint_graph data

Subtasks

  • Add execution_log: list[ExecutionLogEntry] | None field to Plan model
  • Define ExecutionLogEntry model with: tool_name, skill_name, actor_name, inputs, outputs, error, timestamp, checkpoint_id
  • Add checkpoint_graph: list[CheckpointRecord] | None field to Plan model
  • Define CheckpointRecord model with: checkpoint_id, timestamp, tool_name, skill_name, resources_affected, rollback_metadata
  • Update PlanExecutor to populate execution_log during Execute phase
  • Update CheckpointManager to populate checkpoint_graph during Execute phase
  • Add Behave tests for execution_log and checkpoint_graph population

Definition of Done

  • Plan model has execution_log and checkpoint_graph fields matching spec §19340-19385
  • PlanExecutor populates execution_log during Execute phase
  • CheckpointManager populates checkpoint_graph when checkpoints are created
  • All existing tests pass
  • New Behave tests cover the new fields
  • All nox stages pass
  • Coverage >= 97%

Backlog note: This issue was discovered during autonomous operation
on milestone v3.3.0. It does not block milestone completion and has been
placed in the backlog for human review and future milestone assignment.


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

## Metadata - **Branch**: `feat/plan-execution-log-checkpoint-graph` - **Commit Message**: `feat(plan): add execution_log and checkpoint_graph fields to Plan model` - **Milestone**: *(none — backlog)* - **Parent Epic**: #394 --- ## Summary The `Plan` domain model (`src/cleveragents/domain/models/core/plan.py`) is missing two spec-required fields for the Execute phase: `execution_log` and `checkpoint_graph`. The specification (§19340-19385) defines these as required components of a plan in Execute phase. ## What Was Tested Code-level analysis of `Plan` domain model against specification §19340-19385 (Execution Data Model). ## Expected Behavior (from spec) Per specification §19340-19385, a plan in Execute phase must contain: 1. **`execution_log`** (§19348-19358): A structured timeline of: - tool calls (with parent skill noted) - actor calls - outputs - errors and retries - checkpoints created This log is essential for debugging. 2. **`checkpoint_graph`** (§19377-19385, if enabled): A record of checkpoints including: - checkpoint ID - timestamp - tool responsible (and its parent skill) - resources affected - rollback instructions / metadata ## Actual Behavior Searching `src/cleveragents/domain/models/core/plan.py` for `execution_log` and `checkpoint_graph` returns no results. Neither field exists on the `Plan` model. The plan model has: - `changeset_id` (line 693) — partial coverage - `sandbox_refs` (line 697) — partial coverage - `error_details` (line 688) — used as a catch-all metadata store But no structured `execution_log` or `checkpoint_graph` fields. ## Code Location - `src/cleveragents/domain/models/core/plan.py`, lines 680-760 (execution placeholders section) - Spec reference: `docs/specification.md` §19340-19385 ## Impact - Debugging plan execution is severely limited — no structured timeline of tool calls, actor calls, outputs, errors, and retries - Checkpoint history is not accessible from the plan model — users cannot inspect the checkpoint graph for rollback - The `agents plan execute` JSON output cannot include `execution_log` or `checkpoint_graph` data --- ## Subtasks - [ ] Add `execution_log: list[ExecutionLogEntry] | None` field to `Plan` model - [ ] Define `ExecutionLogEntry` model with: tool_name, skill_name, actor_name, inputs, outputs, error, timestamp, checkpoint_id - [ ] Add `checkpoint_graph: list[CheckpointRecord] | None` field to `Plan` model - [ ] Define `CheckpointRecord` model with: checkpoint_id, timestamp, tool_name, skill_name, resources_affected, rollback_metadata - [ ] Update `PlanExecutor` to populate `execution_log` during Execute phase - [ ] Update `CheckpointManager` to populate `checkpoint_graph` during Execute phase - [ ] Add Behave tests for execution_log and checkpoint_graph population ## Definition of Done - [ ] `Plan` model has `execution_log` and `checkpoint_graph` fields matching spec §19340-19385 - [ ] `PlanExecutor` populates `execution_log` during Execute phase - [ ] `CheckpointManager` populates `checkpoint_graph` when checkpoints are created - [ ] All existing tests pass - [ ] New Behave tests cover the new fields - [ ] All nox stages pass - [ ] Coverage >= 97% --- > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.3.0. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
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
#394 Epic: Decision Framework
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#3820
No description provided.