UAT: agents plan rollback rich output missing spec-required structured panels — Rollback Summary, Changes Reverted table, Impact, and Post-Rollback State panels not rendered #2591

Closed
opened 2026-04-03 19:03:43 +00:00 by freemo · 6 comments
Owner

Bug Report

What Was Tested

agents plan rollback rich (default) output format in src/cleveragents/cli/commands/plan.py, rollback_plan() function.

Expected Behavior (from spec)

The spec requires four structured Rich panels for the rollback command output:

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

╭─ Changes Reverted ──────────────────╮
│ File                    Action      │
│ ──────────────────────  ──────────  │
│ src/auth/session.py     restored    │
│ src/auth/tokens.py      restored    │
│ tests/test_session.py   removed     │
│ tests/test_tokens.py    removed     │
│ src/auth/fixtures.py    restored    │
│ src/auth/__init__.py    restored    │
╰─────────────────────────────────────╯

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

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

✓ OK Rollback complete

Actual Behavior

The current implementation outputs plain text without any structured panels:

# src/cleveragents/cli/commands/plan.py, rollback_plan() function
console.print(
    f"[green]Rollback complete.[/green]\n"
    f"  Plan: {plan_id}\n"
    f"  Checkpoint: {result.from_checkpoint_id}\n"
    f"  Restored files: {result.restored_files_count}\n"
    f"  Elapsed: {elapsed:.3f}s\n"
    f"  Changed paths:"
)
for path in result.changed_paths:
    console.print(f"    {path}")

This produces unstructured plain text output instead of the four spec-required panels.

Missing Elements

  1. Rollback Summary panel — missing Label field (checkpoint label/reason)
  2. Changes Reverted table — paths are printed as plain text, not as a Rich table with File and Action columns
  3. Impact panel — entirely missing (Child Plans Invalidated, Sandbox, Decisions After CP, Tool Calls After CP)
  4. Post-Rollback State panel — entirely missing (Phase, State, Checkpoints Remaining)
  5. ✓ OK Rollback complete confirmation line — missing

Code Location

src/cleveragents/cli/commands/plan.pyrollback_plan() function, lines ~3380-3400 (the else branch for rich format output).

Steps to Reproduce

agents plan rollback --yes <PLAN_ID> <CHECKPOINT_ID>

Observe: plain text output without panels.

Impact

The rollback command output does not match the spec, making it harder for users to understand what was rolled back and the impact on child plans and decisions.

  • Issue #2545: JSON output uses wrong field names (plan_id vs plan, from_checkpoint_id vs checkpoint, restored_files_count vs files_reverted)
  • Issue #2454: changes_reverted is a flat list of strings instead of {file, action} objects
  • Issue #2455: Missing fields label, child_plans_invalidated, decisions_after_cp, tool_calls_after_cp, phase, state, checkpoints_remaining

This issue specifically tracks the rich output format (panels and tables), which is separate from the JSON/YAML field name issues.

Metadata

  • Commit message: fix(cli): render spec-required panels in agents plan rollback rich output
  • Branch: fix/plan-rollback-rich-output-panels
  • Parent Epic: #358 (Corrections + Subplans + Checkpoints M4)

Subtasks

  • Add "Rollback Summary" Rich panel with Plan, Checkpoint, Label, Files fields
  • Add "Changes Reverted" Rich table with File and Action columns
  • Add "Impact" Rich panel with child plans, sandbox, decisions, tool calls
  • Add "Post-Rollback State" Rich panel with phase, state, checkpoints remaining
  • Add ✓ OK Rollback complete confirmation line

Definition of Done

  • Rich output matches the spec's four-panel layout
  • "Changes Reverted" is a Rich table with File and Action columns
  • All four panels are rendered for successful rollbacks
  • JSON/YAML output format issues tracked separately in #2545, #2454, #2455

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

## Bug Report ### What Was Tested `agents plan rollback` rich (default) output format in `src/cleveragents/cli/commands/plan.py`, `rollback_plan()` function. ### Expected Behavior (from spec) The spec requires four structured Rich panels for the rollback command output: ``` ╭─ Rollback Summary ───────────────╮ │ Plan: 01HXM8C2ZK4Q7C2B3F2R4VYV6J │ │ Checkpoint: cp_01HXM8C2 │ │ Label: before auth refactor │ │ Files: 6 reverted │ ╰──────────────────────────────────╯ ╭─ Changes Reverted ──────────────────╮ │ File Action │ │ ────────────────────── ────────── │ │ src/auth/session.py restored │ │ src/auth/tokens.py restored │ │ tests/test_session.py removed │ │ tests/test_tokens.py removed │ │ src/auth/fixtures.py restored │ │ src/auth/__init__.py restored │ ╰─────────────────────────────────────╯ ╭─ Impact ──────────────────────────────╮ │ Child Plans Invalidated: 2 │ │ Sandbox: restored to cp_01HXM8C2 │ │ Decisions After CP: 2 discarded │ │ Tool Calls After CP: 5 undone │ ╰───────────────────────────────────────╯ ╭─ Post-Rollback State ──────────╮ │ Phase: execute │ │ State: queued (awaiting input) │ │ Checkpoints Remaining: 2 │ ╰────────────────────────────────╯ ✓ OK Rollback complete ``` ### Actual Behavior The current implementation outputs plain text without any structured panels: ```python # src/cleveragents/cli/commands/plan.py, rollback_plan() function console.print( f"[green]Rollback complete.[/green]\n" f" Plan: {plan_id}\n" f" Checkpoint: {result.from_checkpoint_id}\n" f" Restored files: {result.restored_files_count}\n" f" Elapsed: {elapsed:.3f}s\n" f" Changed paths:" ) for path in result.changed_paths: console.print(f" {path}") ``` This produces unstructured plain text output instead of the four spec-required panels. ### Missing Elements 1. **Rollback Summary panel** — missing `Label` field (checkpoint label/reason) 2. **Changes Reverted table** — paths are printed as plain text, not as a Rich table with `File` and `Action` columns 3. **Impact panel** — entirely missing (`Child Plans Invalidated`, `Sandbox`, `Decisions After CP`, `Tool Calls After CP`) 4. **Post-Rollback State panel** — entirely missing (`Phase`, `State`, `Checkpoints Remaining`) 5. **`✓ OK Rollback complete`** confirmation line — missing ### Code Location `src/cleveragents/cli/commands/plan.py` — `rollback_plan()` function, lines ~3380-3400 (the `else` branch for rich format output). ### Steps to Reproduce ```bash agents plan rollback --yes <PLAN_ID> <CHECKPOINT_ID> ``` Observe: plain text output without panels. ### Impact The rollback command output does not match the spec, making it harder for users to understand what was rolled back and the impact on child plans and decisions. ### Note on Related Issues - Issue #2545: JSON output uses wrong field names (`plan_id` vs `plan`, `from_checkpoint_id` vs `checkpoint`, `restored_files_count` vs `files_reverted`) - Issue #2454: `changes_reverted` is a flat list of strings instead of `{file, action}` objects - Issue #2455: Missing fields `label`, `child_plans_invalidated`, `decisions_after_cp`, `tool_calls_after_cp`, `phase`, `state`, `checkpoints_remaining` This issue specifically tracks the **rich output format** (panels and tables), which is separate from the JSON/YAML field name issues. ### Metadata - **Commit message**: `fix(cli): render spec-required panels in agents plan rollback rich output` - **Branch**: `fix/plan-rollback-rich-output-panels` - **Parent Epic**: #358 (Corrections + Subplans + Checkpoints M4) ### Subtasks - [ ] Add "Rollback Summary" Rich panel with Plan, Checkpoint, Label, Files fields - [ ] Add "Changes Reverted" Rich table with File and Action columns - [ ] Add "Impact" Rich panel with child plans, sandbox, decisions, tool calls - [ ] Add "Post-Rollback State" Rich panel with phase, state, checkpoints remaining - [ ] Add `✓ OK Rollback complete` confirmation line ### Definition of Done - Rich output matches the spec's four-panel layout - "Changes Reverted" is a Rich table with `File` and `Action` columns - All four panels are rendered for successful rollbacks - JSON/YAML output format issues tracked separately in #2545, #2454, #2455 --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-uat-tester
freemo added this to the v3.5.0 milestone 2026-04-05 04:53:17 +00:00
Author
Owner

Starting implementation on branch fix/plan-rollback-rich-output-panels.

Difficulty assessment: Medium → starting at sonnet tier.

Plan: Implement the 4 spec-required Rich panels in rollback_plan() in src/cleveragents/cli/commands/plan.py:

  1. Rollback Summary panel
  2. Changes Reverted table
  3. Impact panel
  4. Post-Rollback State panel
  5. ✓ OK Rollback complete confirmation line

Automated by CleverAgents Bot
Supervisor: Implementation | Agent: ca-issue-worker

Starting implementation on branch `fix/plan-rollback-rich-output-panels`. Difficulty assessment: Medium → starting at sonnet tier. **Plan**: Implement the 4 spec-required Rich panels in `rollback_plan()` in `src/cleveragents/cli/commands/plan.py`: 1. Rollback Summary panel 2. Changes Reverted table 3. Impact panel 4. Post-Rollback State panel 5. `✓ OK Rollback complete` confirmation line --- **Automated by CleverAgents Bot** Supervisor: Implementation | Agent: ca-issue-worker
Author
Owner

PR #3279 reviewed, approved, and scheduled to merge when CI passes. The merge will complete automatically once all status checks succeed.

Review summary: All four spec-required Rich panels (Rollback Summary, Changes Reverted, Impact, Post-Rollback State) and the ✓ OK Rollback complete confirmation line are correctly implemented. Forward-compatibility with future model changes (#2454, #2455) is handled via getattr defaults and dual-format entry handling. BDD test assertions updated to match the new panel structure.


Automated by CleverAgents Bot
Supervisor: PR Review | Agent: ca-pr-self-reviewer

PR #3279 reviewed, approved, and scheduled to merge when CI passes. The merge will complete automatically once all status checks succeed. **Review summary:** All four spec-required Rich panels (Rollback Summary, Changes Reverted, Impact, Post-Rollback State) and the `✓ OK Rollback complete` confirmation line are correctly implemented. Forward-compatibility with future model changes (#2454, #2455) is handled via `getattr` defaults and dual-format entry handling. BDD test assertions updated to match the new panel structure. --- **Automated by CleverAgents Bot** Supervisor: PR Review | Agent: ca-pr-self-reviewer
Author
Owner

PR #3279 reviewed, approved, and scheduled to merge when CI passes.

Review summary: All four spec-required Rich panels (Rollback Summary, Changes Reverted table, Impact, Post-Rollback State) and the ✓ OK Rollback complete confirmation line are correctly implemented. Forward-compatibility patterns for not-yet-present model fields are well-designed. Tests updated appropriately.


Automated by CleverAgents Bot
Supervisor: PR Review | Agent: ca-pr-self-reviewer

PR #3279 reviewed, approved, and scheduled to merge when CI passes. **Review summary**: All four spec-required Rich panels (Rollback Summary, Changes Reverted table, Impact, Post-Rollback State) and the `✓ OK Rollback complete` confirmation line are correctly implemented. Forward-compatibility patterns for not-yet-present model fields are well-designed. Tests updated appropriately. --- **Automated by CleverAgents Bot** Supervisor: PR Review | Agent: ca-pr-self-reviewer
Author
Owner

Issue transitioned to State/Completed. PR #3279 is scheduled to auto-merge when CI passes. The issue cannot be closed yet because it has an open dependency on PR #3279 itself (which is still open/pending merge). Once the PR merges, Forgejo should auto-close this issue via the Closes #2591 keyword in the PR body.

Dependencies checked:

  • PR #3279 — open (scheduled to merge when CI passes) → will resolve automatically
  • Issue #2597 — already closed ✓

Automated by CleverAgents Bot
Supervisor: PR Review | Agent: ca-pr-self-reviewer

Issue transitioned to `State/Completed`. PR #3279 is scheduled to auto-merge when CI passes. The issue cannot be closed yet because it has an open dependency on PR #3279 itself (which is still open/pending merge). Once the PR merges, Forgejo should auto-close this issue via the `Closes #2591` keyword in the PR body. **Dependencies checked:** - PR #3279 — open (scheduled to merge when CI passes) → will resolve automatically - Issue #2597 — already closed ✓ --- **Automated by CleverAgents Bot** Supervisor: PR Review | Agent: ca-pr-self-reviewer
Author
Owner

State reconciliation: This issue is open but labeled State/Completed, which is a contradiction. PR #3279 (fix(cli): render spec-required panels in agents plan rollback rich output) says Closes #2591 and is currently open (not yet merged).

Since the PR is still open (not merged), the work is not yet complete. Removing State/Completed and keeping the issue open until PR #3279 is merged is the correct action.

However, since this is a human decision, I'm flagging it here. If PR #3279 has been effectively superseded or the fix is considered complete, please close this issue manually.


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

**State reconciliation:** This issue is open but labeled `State/Completed`, which is a contradiction. PR #3279 (`fix(cli): render spec-required panels in agents plan rollback rich output`) says `Closes #2591` and is currently open (not yet merged). Since the PR is still open (not merged), the work is not yet complete. Removing `State/Completed` and keeping the issue open until PR #3279 is merged is the correct action. However, since this is a human decision, I'm flagging it here. If PR #3279 has been effectively superseded or the fix is considered complete, please close this issue manually. --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: ca-backlog-groomer
Author
Owner

PR #3279 has been merged successfully! 🎉

Summary:

  • Replaced unstructured plain-text rollback output with four spec-required Rich panels
  • All CI checks passed (lint, typecheck, quality, security, build, unit_tests, integration_tests, coverage, e2e_tests, docker, helm)
  • Branch fix/plan-rollback-rich-output-panels rebased onto latest master and merged via squash

Merge details:

  • Merge commit: 21ee34a407ed
  • Merged at: 2026-04-05T17:59:07Z

Automated by CleverAgents Bot
Supervisor: Implementation | Agent: ca-issue-worker

PR #3279 has been merged successfully! 🎉 **Summary:** - Replaced unstructured plain-text rollback output with four spec-required Rich panels - All CI checks passed (lint, typecheck, quality, security, build, unit_tests, integration_tests, coverage, e2e_tests, docker, helm) - Branch `fix/plan-rollback-rich-output-panels` rebased onto latest master and merged via squash **Merge details:** - Merge commit: `21ee34a407ed` - Merged at: 2026-04-05T17:59:07Z --- **Automated by CleverAgents Bot** Supervisor: Implementation | Agent: ca-issue-worker
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.

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