UAT: agents plan correct --mode=revert rich output missing spec-required structured panels #3222

Open
opened 2026-04-05 07:58:36 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: bugfix/m3-plan-correct-revert-rich-output
  • Commit Message: fix(cli): render spec-required rich panels for plan correct --mode=revert output
  • Milestone: v3.2.0
  • Parent Epic: #357

Bug Report

Feature Area: agents plan correct CLI Command — revert mode rich output (v3.2.0)

Background and Context

The agents plan correct --mode=revert command is specified in docs/specification.md (lines 14932–15003) to display rich structured output panels when a revert correction is applied. The specification defines five panels that must be rendered as part of the user-facing contract for the correction feature.

What was tested

Code analysis of src/cleveragents/cli/commands/plan.py, lines 3124–3131: the else branch handling --mode=revert output in the plan correction command.

Actual Behavior

The current implementation only outputs:

✓ Correction applied: {correction_id}
  Reverted: {comma-separated list of reverted decision IDs}

None of the five spec-required panels are rendered. The output is bare text with no structured panel layout.

Code locationsrc/cleveragents/cli/commands/plan.py, lines 3124–3131:

else:
    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)}")

Expected Behavior

Five Rich panels must be rendered as specified in docs/specification.md lines 14932–15003:

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

Spec output example (lines 14932–15003):

╭─ 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

Steps to Reproduce

  1. Create a plan with decisions
  2. Run: agents plan correct --mode=revert --guidance "Fix this" --yes <DECISION_ID>
  3. Observe: Only a single line of text is output — no structured panels

Impact

This is a critical spec violation for v3.2.0. The structured panel output is part of the user-facing contract for the correction feature and is required for milestone acceptance.

Subtasks

  • Identify all data fields required by each of the five panels and confirm they are available on the result object returned by the revert correction handler
  • Implement the Correction Rich panel in the --mode=revert output branch
  • Implement the Affected Subtree Rich panel
  • Implement the Sandbox Rollback Rich panel
  • Implement the Recompute Rich panel
  • Implement the History Rich panel with diff command hint
  • Render the ✓ OK Correction applied confirmation line after all panels
  • Tests (Behave): Add/update scenario for agents plan correct --mode=revert verifying all five panels appear in output
  • Tests (Robot): Add integration test verifying rich panel output for revert correction
  • Verify coverage ≥ 97% via nox -s coverage_report
  • Run nox (all default sessions), fix any errors

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly (fix(cli): render spec-required rich panels for plan correct --mode=revert output), followed by a blank line, then additional lines providing relevant implementation details.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly (bugfix/m3-plan-correct-revert-rich-output).
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.
  • All nox stages pass.
  • Coverage ≥ 97%.

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

## Metadata - **Branch**: `bugfix/m3-plan-correct-revert-rich-output` - **Commit Message**: `fix(cli): render spec-required rich panels for plan correct --mode=revert output` - **Milestone**: v3.2.0 - **Parent Epic**: #357 ## Bug Report **Feature Area**: `agents plan correct` CLI Command — revert mode rich output (v3.2.0) ### Background and Context The `agents plan correct --mode=revert` command is specified in `docs/specification.md` (lines 14932–15003) to display rich structured output panels when a revert correction is applied. The specification defines five panels that must be rendered as part of the user-facing contract for the correction feature. ### What was tested Code analysis of `src/cleveragents/cli/commands/plan.py`, lines 3124–3131: the `else` branch handling `--mode=revert` output in the plan correction command. ### Actual Behavior The current implementation only outputs: ``` ✓ Correction applied: {correction_id} Reverted: {comma-separated list of reverted decision IDs} ``` None of the five spec-required panels are rendered. The output is bare text with no structured panel layout. **Code location** — `src/cleveragents/cli/commands/plan.py`, lines 3124–3131: ```python else: 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)}") ``` ### Expected Behavior Five Rich panels must be rendered as specified in `docs/specification.md` lines 14932–15003: 1. **Correction panel** — Mode, Impact summary, New Decision ID, Corrects (original decision ID), Attempt number 2. **Affected Subtree panel** — Decisions Invalidated count, Child Plans Rolled Back count, Artifacts Archived count, Unaffected Decisions count 3. **Sandbox Rollback panel** — Checkpoint ID, Files Reverted count, Status 4. **Recompute panel** — Queued child plans count, ETA 5. **History panel** — Original decision superseded note, prior artifacts archived note, diff command hint Spec output example (lines 14932–15003): ``` ╭─ 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 ``` ### Steps to Reproduce 1. Create a plan with decisions 2. Run: `agents plan correct --mode=revert --guidance "Fix this" --yes <DECISION_ID>` 3. Observe: Only a single line of text is output — no structured panels ### Impact This is a critical spec violation for v3.2.0. The structured panel output is part of the user-facing contract for the correction feature and is required for milestone acceptance. ## Subtasks - [ ] Identify all data fields required by each of the five panels and confirm they are available on the `result` object returned by the revert correction handler - [ ] Implement the **Correction** Rich panel in the `--mode=revert` output branch - [ ] Implement the **Affected Subtree** Rich panel - [ ] Implement the **Sandbox Rollback** Rich panel - [ ] Implement the **Recompute** Rich panel - [ ] Implement the **History** Rich panel with diff command hint - [ ] Render the `✓ OK Correction applied` confirmation line after all panels - [ ] Tests (Behave): Add/update scenario for `agents plan correct --mode=revert` verifying all five panels appear in output - [ ] Tests (Robot): Add integration test verifying rich panel output for revert correction - [ ] Verify coverage ≥ 97% via `nox -s coverage_report` - [ ] Run `nox` (all default sessions), fix any errors ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly (`fix(cli): render spec-required rich panels for plan correct --mode=revert output`), followed by a blank line, then additional lines providing relevant implementation details. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly (`bugfix/m3-plan-correct-revert-rich-output`). - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. - All nox stages pass. - Coverage ≥ 97%. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
freemo added this to the v3.2.0 milestone 2026-04-05 08:04:35 +00:00
freemo removed this from the v3.2.0 milestone 2026-04-06 20:50:20 +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
Reference
cleveragents/cleveragents-core#3222
No description provided.