UAT: agents plan correct rich output missing spec-required structured panels (Affected Subtree, Sandbox Rollback, Recompute, History) #2831

Open
opened 2026-04-04 20:43:55 +00:00 by freemo · 2 comments
Owner

Bug Report

What Was Tested

Code analysis of src/cleveragents/cli/commands/plan.py, correct_decision() function (lines 3101–3116).

Expected Behavior (from spec)

Per docs/specification.md lines 14935–14967, the agents plan correct command must render five distinct structured panels in its rich output:

  1. Correction panel — Mode, Impact summary, New Decision ID, Corrects (original decision ID), Attempt number
  2. Affected Subtree panel — Decisions Invalidated, Child Plans Rolled Back, Artifacts Archived, Unaffected Decisions
  3. Sandbox Rollback panel — Checkpoint ID, Files Reverted, Status
  4. Recompute panel — Queued child plans count, ETA
  5. History panel — Audit trail entries (superseded decision, archived artifacts, diff command hint)

Plus a success message: ✓ OK Correction applied

Example from spec:

╭─ Correction ────────────────────────────────────────╮
│ Mode: revert                                        │
│ Impact: 3 decisions, 2 child plans, 5 artifacts     │
│ New Decision: 01HXM9B7Z3Q1Q8K2E9H7K3W2M8            │
│ Corrects: 01HXM9A1C2Q7W3R5G8Z0P4Q1X9                │
│ Attempt: 2                                          │
╰─────────────────────────────────────────────────────╯

╭─ Affected Subtree ──────────────╮
│ Decisions Invalidated: 3        │
│ Child Plans Rolled Back: 2      │
│ Artifacts Archived: 5           │
│ Unaffected Decisions: 2         │
╰─────────────────────────────────╯

╭─ Sandbox Rollback ─────────────╮
│ Checkpoint: cp_01HXM8C2        │
│ Files Reverted: 5              │
│ Status: restored               │
╰────────────────────────────────╯

╭─ Recompute ──────────────╮
│ Queued: 2 child plans    │
│ ETA: 4m                  │
╰──────────────────────────╯

╭─ History ───────────────────────────────────────────╮
│ - Original decision superseded                      │
│ - Prior artifacts archived for comparison           │
│ - agents plan diff --correction 01HXM9B7Z3Q1Q8K2..  │
╰─────────────────────────────────────────────────────╯

✓ OK Correction applied

Actual Behavior

The current implementation at src/cleveragents/cli/commands/plan.py lines 3110–3116 renders only a plain-text one-line confirmation with no structured panels:

console.print(
    f"[green]✓[/green] Correction applied: {result.correction_id}"
)
if result.reverted_decisions:
    console.print(f"  Reverted: {', '.join(result.reverted_decisions)}")
if result.new_decisions:
    console.print(f"  New decisions: {', '.join(result.new_decisions)}")

None of the five spec-required panels ("Correction", "Affected Subtree", "Sandbox Rollback", "Recompute", "History") are rendered. The output is a simple inline string with no Rich Panel structure.

Additional Missing Elements

  1. Affected Subtree paneldecisions_invalidated, child_plans_rolled_back, artifacts_archived, and unaffected_decisions counts are never displayed
  2. Sandbox Rollback panelcheckpoint, files_reverted, and status fields are absent
  3. Recompute panelqueued child plans count and eta are absent
  4. History panel — Audit trail entries and agents plan diff --correction hint are absent
  5. Success message✓ OK Correction applied is never printed (current message includes the correction ID inline but lacks the OK prefix and structured format)

Code Location

src/cleveragents/cli/commands/plan.py:

  • correct_decision() function (lines 3101–3116) — renders plain-text output instead of structured Rich panels; no success message in spec format

Steps to Reproduce

agents plan correct <DECISION_ID> --mode revert --guidance "Some guidance" --yes
  1. Observe: Simple one-line confirmation ✓ Correction applied: <ID> with optional flat reverted/new decision lists
  2. Expected: Rich output with five structured panels (Correction, Affected Subtree, Sandbox Rollback, Recompute, History) followed by ✓ OK Correction applied

Impact

  • Users cannot see the impact of a correction (invalidated decisions, rolled-back child plans, archived artifacts)
  • Users cannot see sandbox rollback details (checkpoint used, files reverted)
  • Users cannot see which child plans are queued for recompute or the ETA
  • The correction audit history and agents plan diff hint are not surfaced
  • The output is significantly incomplete compared to the spec

Metadata

  • Branch: fix/m4-plan-correct-rich-output-panels
  • Commit Message: fix(cli): render spec-required structured panels in agents plan correct output
  • Milestone: v3.3.0
  • Parent Epic: #394

Subtasks

  • Render "Correction" panel with Mode, Impact summary, New Decision ID, Corrects, and Attempt fields
  • Render "Affected Subtree" panel with Decisions Invalidated, Child Plans Rolled Back, Artifacts Archived, and Unaffected Decisions counts
  • Render "Sandbox Rollback" panel with Checkpoint ID, Files Reverted, and Status fields
  • Render "Recompute" panel with Queued child plans count and ETA
  • Render "History" panel with audit trail entries and agents plan diff --correction hint
  • Print ✓ OK Correction applied success message in spec format
  • Add Behave feature scenarios covering all five panels in rich output
  • Add Robot Framework integration test for agents plan correct rich output

Definition of Done

  • Rich output renders all five spec-required panels (Correction, Affected Subtree, Sandbox Rollback, Recompute, History)
  • Success message prints as ✓ OK Correction applied
  • All panel fields match the field names and format defined in docs/specification.md lines 14935–14967
  • All nox stages pass
  • Coverage >= 97%

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

## Bug Report ### What Was Tested Code analysis of `src/cleveragents/cli/commands/plan.py`, `correct_decision()` function (lines 3101–3116). ### Expected Behavior (from spec) Per `docs/specification.md` lines 14935–14967, the `agents plan correct` command must render **five distinct structured panels** in its rich output: 1. **Correction panel** — Mode, Impact summary, New Decision ID, Corrects (original decision ID), Attempt number 2. **Affected Subtree panel** — Decisions Invalidated, Child Plans Rolled Back, Artifacts Archived, Unaffected Decisions 3. **Sandbox Rollback panel** — Checkpoint ID, Files Reverted, Status 4. **Recompute panel** — Queued child plans count, ETA 5. **History panel** — Audit trail entries (superseded decision, archived artifacts, diff command hint) Plus a success message: `✓ OK Correction applied` Example from spec: ``` ╭─ Correction ────────────────────────────────────────╮ │ Mode: revert │ │ Impact: 3 decisions, 2 child plans, 5 artifacts │ │ New Decision: 01HXM9B7Z3Q1Q8K2E9H7K3W2M8 │ │ Corrects: 01HXM9A1C2Q7W3R5G8Z0P4Q1X9 │ │ Attempt: 2 │ ╰─────────────────────────────────────────────────────╯ ╭─ Affected Subtree ──────────────╮ │ Decisions Invalidated: 3 │ │ Child Plans Rolled Back: 2 │ │ Artifacts Archived: 5 │ │ Unaffected Decisions: 2 │ ╰─────────────────────────────────╯ ╭─ Sandbox Rollback ─────────────╮ │ Checkpoint: cp_01HXM8C2 │ │ Files Reverted: 5 │ │ Status: restored │ ╰────────────────────────────────╯ ╭─ Recompute ──────────────╮ │ Queued: 2 child plans │ │ ETA: 4m │ ╰──────────────────────────╯ ╭─ History ───────────────────────────────────────────╮ │ - Original decision superseded │ │ - Prior artifacts archived for comparison │ │ - agents plan diff --correction 01HXM9B7Z3Q1Q8K2.. │ ╰─────────────────────────────────────────────────────╯ ✓ OK Correction applied ``` ### Actual Behavior The current implementation at `src/cleveragents/cli/commands/plan.py` lines 3110–3116 renders only a plain-text one-line confirmation with no structured panels: ```python console.print( f"[green]✓[/green] Correction applied: {result.correction_id}" ) if result.reverted_decisions: console.print(f" Reverted: {', '.join(result.reverted_decisions)}") if result.new_decisions: console.print(f" New decisions: {', '.join(result.new_decisions)}") ``` None of the five spec-required panels ("Correction", "Affected Subtree", "Sandbox Rollback", "Recompute", "History") are rendered. The output is a simple inline string with no Rich Panel structure. ### Additional Missing Elements 1. **Affected Subtree panel** — `decisions_invalidated`, `child_plans_rolled_back`, `artifacts_archived`, and `unaffected_decisions` counts are never displayed 2. **Sandbox Rollback panel** — `checkpoint`, `files_reverted`, and `status` fields are absent 3. **Recompute panel** — `queued` child plans count and `eta` are absent 4. **History panel** — Audit trail entries and `agents plan diff --correction` hint are absent 5. **Success message** — `✓ OK Correction applied` is never printed (current message includes the correction ID inline but lacks the `OK` prefix and structured format) ### Code Location `src/cleveragents/cli/commands/plan.py`: - `correct_decision()` function (lines 3101–3116) — renders plain-text output instead of structured Rich panels; no success message in spec format ### Steps to Reproduce ```bash agents plan correct <DECISION_ID> --mode revert --guidance "Some guidance" --yes ``` 1. Observe: Simple one-line confirmation `✓ Correction applied: <ID>` with optional flat reverted/new decision lists 2. Expected: Rich output with five structured panels (Correction, Affected Subtree, Sandbox Rollback, Recompute, History) followed by `✓ OK Correction applied` ### Impact - Users cannot see the impact of a correction (invalidated decisions, rolled-back child plans, archived artifacts) - Users cannot see sandbox rollback details (checkpoint used, files reverted) - Users cannot see which child plans are queued for recompute or the ETA - The correction audit history and `agents plan diff` hint are not surfaced - The output is significantly incomplete compared to the spec ## Metadata - **Branch**: `fix/m4-plan-correct-rich-output-panels` - **Commit Message**: `fix(cli): render spec-required structured panels in agents plan correct output` - **Milestone**: v3.3.0 - **Parent Epic**: #394 ## Subtasks - [ ] Render "Correction" panel with Mode, Impact summary, New Decision ID, Corrects, and Attempt fields - [ ] Render "Affected Subtree" panel with Decisions Invalidated, Child Plans Rolled Back, Artifacts Archived, and Unaffected Decisions counts - [ ] Render "Sandbox Rollback" panel with Checkpoint ID, Files Reverted, and Status fields - [ ] Render "Recompute" panel with Queued child plans count and ETA - [ ] Render "History" panel with audit trail entries and `agents plan diff --correction` hint - [ ] Print `✓ OK Correction applied` success message in spec format - [ ] Add Behave feature scenarios covering all five panels in rich output - [ ] Add Robot Framework integration test for `agents plan correct` rich output ## Definition of Done - [ ] Rich output renders all five spec-required panels (Correction, Affected Subtree, Sandbox Rollback, Recompute, History) - [ ] Success message prints as `✓ OK Correction applied` - [ ] All panel fields match the field names and format defined in `docs/specification.md` lines 14935–14967 - [ ] All nox stages pass - [ ] Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
freemo added this to the v3.3.0 milestone 2026-04-04 20:44:29 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Medium — The agents plan correct command renders only a plain-text confirmation instead of the five spec-required Rich panels. This is an output completeness issue — the correction functionality itself works.
  • Milestone: v3.3.0 (already set correctly — Corrections + Subplans milestone)
  • MoSCoW: Should Have — The spec defines detailed structured output panels for correction operations. Users need to see the impact of corrections (invalidated decisions, rolled-back child plans, etc.). However, the core correction functionality works without the rich output.
  • Parent Epic: #394 (Epic: Decision Framework)

Valid UAT finding. The five missing panels (Correction, Affected Subtree, Sandbox Rollback, Recompute, History) are well-documented in the spec.


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: ca-project-owner

Issue triaged by project owner: - **State**: Verified - **Priority**: Medium — The `agents plan correct` command renders only a plain-text confirmation instead of the five spec-required Rich panels. This is an output completeness issue — the correction functionality itself works. - **Milestone**: v3.3.0 (already set correctly — Corrections + Subplans milestone) - **MoSCoW**: Should Have — The spec defines detailed structured output panels for correction operations. Users need to see the impact of corrections (invalidated decisions, rolled-back child plans, etc.). However, the core correction functionality works without the rich output. - **Parent Epic**: #394 (Epic: Decision Framework) Valid UAT finding. The five missing panels (Correction, Affected Subtree, Sandbox Rollback, Recompute, History) are well-documented in the spec. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
Author
Owner

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

Issue analysis complete:

  • 8 subtasks to implement (all unchecked)
  • Target file: src/cleveragents/cli/commands/plan.pycorrect_decision() function
  • Required panels: Correction, Affected Subtree, Sandbox Rollback, Recompute, History
  • Spec reference: docs/specification.md lines 14935–14967

Beginning TDD implementation of all 5 Rich structured panels.


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

Starting implementation on branch `fix/m4-plan-correct-rich-output-panels`. Issue analysis complete: - **8 subtasks** to implement (all unchecked) - **Target file**: `src/cleveragents/cli/commands/plan.py` — `correct_decision()` function - **Required panels**: Correction, Affected Subtree, Sandbox Rollback, Recompute, History - **Spec reference**: `docs/specification.md` lines 14935–14967 Beginning TDD implementation of all 5 Rich structured panels. --- **Automated by CleverAgents Bot** Supervisor: Implementation | Agent: ca-issue-worker
freemo removed this from the v3.3.0 milestone 2026-04-07 00:41:56 +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.

Blocks
#394 Epic: Decision Framework
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#2831
No description provided.