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

Open
opened 2026-04-05 20:20:35 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: fix/plan-correct-output-missing-panels
  • Commit Message: fix(cli): render all 5 spec-required panels in plan correct output
  • Milestone: (none — backlog, see note below)
  • Parent Epic: #394

Background

The agents plan correct <DECISION_ID> --mode revert --guidance "..." --yes CLI command is missing 4 of the 5 output panels required by the specification (docs/specification.md lines 14935–14967).

The current implementation in src/cleveragents/cli/commands/plan.py (lines 3108–3141, the non-dry-run execution path of correct_decision) only emits a single success line and optional flat lists of reverted/new decision IDs. None of the 5 spec-required structured panels are rendered.

Steps to Reproduce

  1. Create a plan with at least one recorded decision
  2. Run agents plan correct <DECISION_ID> --mode revert --guidance "test" --yes
  3. Observe that only a single line is printed instead of the 5 spec-required panels

Expected Behaviour (per spec lines 14935–14967)

After executing agents plan correct, the output must include 5 panels:

# Panel Required Fields
1 Correction Mode, Impact summary (N decisions, N child plans, N artifacts), New Decision ID, Corrects (original decision ID), Attempt number
2 Affected Subtree Decisions Invalidated count, Child Plans Rolled Back count, Artifacts Archived count, Unaffected Decisions count
3 Sandbox Rollback Checkpoint ID, Files Reverted count, Status
4 Recompute Queued child plans count, ETA
5 History Original decision superseded note, Prior artifacts archived note, agents plan diff --correction <ID> hint

Actual Behaviour

Lines 3124–3131 of plan.py currently render:

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

This is a single line with the correction ID and optional flat lists. None of the 5 spec-required panels are rendered.

Affected Code

  • src/cleveragents/cli/commands/plan.pycorrect_decision non-dry-run execution path (lines 3108–3141)
  • correction_service.pyCorrectionResult model currently exposes correction_id, status, new_decisions, reverted_decisions but may be missing fields for sandbox rollback (checkpoint ID, files reverted), ETA, attempt number, and affected subtree counts

Subtasks

  • Audit CorrectionResult model in correction_service.py against spec lines 14935–14967 and add any missing fields (checkpoint ID, files reverted count, queued child plans count, ETA, attempt number, affected subtree counts)
  • Render Correction panel (panel 1) in correct_decision with mode, impact summary, new decision ID, corrects, and attempt number
  • Render Affected Subtree panel (panel 2) with decisions invalidated, child plans rolled back, artifacts archived, and unaffected decisions counts
  • Render Sandbox Rollback panel (panel 3) with checkpoint ID, files reverted count, and status
  • Render Recompute panel (panel 4) with queued child plans count and ETA
  • Render History panel (panel 5) with superseded note, archived note, and agents plan diff --correction <ID> hint
  • Add/update Behave unit tests in features/ covering all 5 panel outputs for the plan correct command
  • Add/update Robot Framework integration tests in robot/ for the full plan correct output
  • Verify nox -e typecheck passes (no new # type: ignore suppressions)
  • Verify nox -e coverage_report >= 97%

Definition of Done

  • correct_decision renders all 5 panels required by spec lines 14935–14967
  • CorrectionResult model contains all fields needed to populate the 5 panels
  • All Behave unit tests pass (nox -e unit_tests)
  • All Robot Framework integration tests pass (nox -e integration_tests)
  • 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**: `fix/plan-correct-output-missing-panels` - **Commit Message**: `fix(cli): render all 5 spec-required panels in plan correct output` - **Milestone**: *(none — backlog, see note below)* - **Parent Epic**: #394 ## Background The `agents plan correct <DECISION_ID> --mode revert --guidance "..." --yes` CLI command is missing 4 of the 5 output panels required by the specification (docs/specification.md lines 14935–14967). The current implementation in `src/cleveragents/cli/commands/plan.py` (lines 3108–3141, the non-dry-run execution path of `correct_decision`) only emits a single success line and optional flat lists of reverted/new decision IDs. None of the 5 spec-required structured panels are rendered. ## Steps to Reproduce 1. Create a plan with at least one recorded decision 2. Run `agents plan correct <DECISION_ID> --mode revert --guidance "test" --yes` 3. Observe that only a single line is printed instead of the 5 spec-required panels ## Expected Behaviour (per spec lines 14935–14967) After executing `agents plan correct`, the output must include **5 panels**: | # | Panel | Required Fields | |---|---|---| | 1 | **Correction** | Mode, Impact summary (N decisions, N child plans, N artifacts), New Decision ID, Corrects (original decision ID), Attempt number | | 2 | **Affected Subtree** | Decisions Invalidated count, Child Plans Rolled Back count, Artifacts Archived count, Unaffected Decisions count | | 3 | **Sandbox Rollback** | Checkpoint ID, Files Reverted count, Status | | 4 | **Recompute** | Queued child plans count, ETA | | 5 | **History** | Original decision superseded note, Prior artifacts archived note, `agents plan diff --correction <ID>` hint | ## Actual Behaviour Lines 3124–3131 of `plan.py` currently render: ```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)}") ``` This is a single line with the correction ID and optional flat lists. **None of the 5 spec-required panels are rendered.** ## Affected Code - `src/cleveragents/cli/commands/plan.py` — `correct_decision` non-dry-run execution path (lines 3108–3141) - `correction_service.py` — `CorrectionResult` model currently exposes `correction_id`, `status`, `new_decisions`, `reverted_decisions` but may be missing fields for sandbox rollback (checkpoint ID, files reverted), ETA, attempt number, and affected subtree counts ## Subtasks - [ ] Audit `CorrectionResult` model in `correction_service.py` against spec lines 14935–14967 and add any missing fields (checkpoint ID, files reverted count, queued child plans count, ETA, attempt number, affected subtree counts) - [ ] Render **Correction panel** (panel 1) in `correct_decision` with mode, impact summary, new decision ID, corrects, and attempt number - [ ] Render **Affected Subtree panel** (panel 2) with decisions invalidated, child plans rolled back, artifacts archived, and unaffected decisions counts - [ ] Render **Sandbox Rollback panel** (panel 3) with checkpoint ID, files reverted count, and status - [ ] Render **Recompute panel** (panel 4) with queued child plans count and ETA - [ ] Render **History panel** (panel 5) with superseded note, archived note, and `agents plan diff --correction <ID>` hint - [ ] Add/update Behave unit tests in `features/` covering all 5 panel outputs for the `plan correct` command - [ ] Add/update Robot Framework integration tests in `robot/` for the full `plan correct` output - [ ] Verify `nox -e typecheck` passes (no new `# type: ignore` suppressions) - [ ] Verify `nox -e coverage_report` >= 97% ## Definition of Done - [ ] `correct_decision` renders all 5 panels required by spec lines 14935–14967 - [ ] `CorrectionResult` model contains all fields needed to populate the 5 panels - [ ] All Behave unit tests pass (`nox -e unit_tests`) - [ ] All Robot Framework integration tests pass (`nox -e integration_tests`) - [ ] 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
freemo added this to the v3.7.0 milestone 2026-04-05 20:23:28 +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#3605
No description provided.