UAT: agents plan rollback Impact panel missing spec-required fields — child_plans_invalidated, decisions_after_cp, tool_calls_after_cp, checkpoints_remaining #4439

Open
opened 2026-04-08 12:38:09 +00:00 by HAL9000 · 0 comments
Owner

Metadata

  • Milestone: (none — backlog)
  • Parent Epic: (sandbox and checkpoint safety)

Bug Report

What Was Tested

The agents plan rollback command output was analyzed against the spec (Example 15 and agents plan rollback command reference).

Expected Behavior (from spec)

Per docs/specification.md agents plan rollback command reference and Example 15, the rollback output should include:

Impact panel:

╭─ Impact ──────────────────────────────────╮
│ Child Plans Invalidated: 2                │
│ Sandbox: restored to cp_01HXM8C2          │
│ Decisions After CP: 2 discarded           │
│ Tool Calls After CP: 5 undone             │
╰───────────────────────────────────────────╯

Post-Rollback State panel:

╭─ Post-Rollback State ──────────╮
│ Phase: execute                 │
│ State: queued (awaiting input) │
│ Checkpoints Remaining: 2       │
╰────────────────────────────────╯

Rollback Summary panel:

╭─ Rollback Summary ───────────────╮
│ Plan: 01HXM8C2ZK4Q7C2B3F2R4VYV6J │
│ Checkpoint: cp_01HXM8C2          │
│ Label: before auth refactor      │
│ Files: 6 reverted                │
╰──────────────────────────────────╯

Actual Behavior

The RollbackResult domain model (src/cleveragents/domain/models/core/checkpoint.py) only has three fields:

  • restored_files_count
  • changed_paths
  • from_checkpoint_id

The CLI (src/cleveragents/cli/commands/plan.py lines 3734-3772) uses getattr(result, "child_plans_invalidated", None), getattr(result, "decisions_after_cp", None), getattr(result, "tool_calls_after_cp", None), and getattr(result, "checkpoints_remaining", None) — all of which return None since these fields don't exist on RollbackResult.

As a result:

  1. Child Plans Invalidated is never shown in the Impact panel
  2. Decisions After CP is never shown in the Impact panel
  3. Tool Calls After CP is never shown in the Impact panel
  4. Checkpoints Remaining is never shown in the Post-Rollback State panel
  5. Label is never shown in the Rollback Summary panel (the label field is also missing from RollbackResult)

Code Locations

  • RollbackResult model: src/cleveragents/domain/models/core/checkpoint.py
  • CLI rollback command: src/cleveragents/cli/commands/plan.py (lines ~3673-3780)
  • CheckpointService.selective_rollback(): src/cleveragents/application/services/checkpoint_service.py

Steps to Reproduce

  1. Create a plan with a sandbox and checkpoint
  2. Run agents plan rollback --yes <PLAN_ID> <CHECKPOINT_ID>
  3. Observe the Impact panel — Child Plans Invalidated, Decisions After CP, Tool Calls After CP are absent
  4. Observe the Post-Rollback State panel — Checkpoints Remaining is absent

Fix Required

  1. Add child_plans_invalidated, decisions_after_cp, tool_calls_after_cp, checkpoints_remaining, and label fields to RollbackResult
  2. Populate these fields in CheckpointService.selective_rollback() by querying the decision service and plan state
  3. Ensure the CLI renders these fields when present

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

## Metadata - **Milestone**: *(none — backlog)* - **Parent Epic**: *(sandbox and checkpoint safety)* ## Bug Report ### What Was Tested The `agents plan rollback` command output was analyzed against the spec (Example 15 and `agents plan rollback` command reference). ### Expected Behavior (from spec) Per `docs/specification.md` `agents plan rollback` command reference and Example 15, the rollback output should include: **Impact panel:** ``` ╭─ Impact ──────────────────────────────────╮ │ Child Plans Invalidated: 2 │ │ Sandbox: restored to cp_01HXM8C2 │ │ Decisions After CP: 2 discarded │ │ Tool Calls After CP: 5 undone │ ╰───────────────────────────────────────────╯ ``` **Post-Rollback State panel:** ``` ╭─ Post-Rollback State ──────────╮ │ Phase: execute │ │ State: queued (awaiting input) │ │ Checkpoints Remaining: 2 │ ╰────────────────────────────────╯ ``` **Rollback Summary panel:** ``` ╭─ Rollback Summary ───────────────╮ │ Plan: 01HXM8C2ZK4Q7C2B3F2R4VYV6J │ │ Checkpoint: cp_01HXM8C2 │ │ Label: before auth refactor │ │ Files: 6 reverted │ ╰──────────────────────────────────╯ ``` ### Actual Behavior The `RollbackResult` domain model (`src/cleveragents/domain/models/core/checkpoint.py`) only has three fields: - `restored_files_count` - `changed_paths` - `from_checkpoint_id` The CLI (`src/cleveragents/cli/commands/plan.py` lines 3734-3772) uses `getattr(result, "child_plans_invalidated", None)`, `getattr(result, "decisions_after_cp", None)`, `getattr(result, "tool_calls_after_cp", None)`, and `getattr(result, "checkpoints_remaining", None)` — all of which return `None` since these fields don't exist on `RollbackResult`. As a result: 1. **`Child Plans Invalidated`** is never shown in the Impact panel 2. **`Decisions After CP`** is never shown in the Impact panel 3. **`Tool Calls After CP`** is never shown in the Impact panel 4. **`Checkpoints Remaining`** is never shown in the Post-Rollback State panel 5. **`Label`** is never shown in the Rollback Summary panel (the `label` field is also missing from `RollbackResult`) ### Code Locations - `RollbackResult` model: `src/cleveragents/domain/models/core/checkpoint.py` - CLI rollback command: `src/cleveragents/cli/commands/plan.py` (lines ~3673-3780) - `CheckpointService.selective_rollback()`: `src/cleveragents/application/services/checkpoint_service.py` ### Steps to Reproduce 1. Create a plan with a sandbox and checkpoint 2. Run `agents plan rollback --yes <PLAN_ID> <CHECKPOINT_ID>` 3. Observe the Impact panel — `Child Plans Invalidated`, `Decisions After CP`, `Tool Calls After CP` are absent 4. Observe the Post-Rollback State panel — `Checkpoints Remaining` is absent ### Fix Required 1. Add `child_plans_invalidated`, `decisions_after_cp`, `tool_calls_after_cp`, `checkpoints_remaining`, and `label` fields to `RollbackResult` 2. Populate these fields in `CheckpointService.selective_rollback()` by querying the decision service and plan state 3. Ensure the CLI renders these fields when present --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.5.0 milestone 2026-04-08 17:42:26 +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.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#4439
No description provided.