UAT: agents plan rollback confirmation prompt missing checkpoint label, creation time, and side effects count #3443

Closed
opened 2026-04-05 16:52:12 +00:00 by freemo · 3 comments
Owner

Background and Context

During UAT testing of the checkpoint-rollback-system feature area, a code-level analysis of src/cleveragents/cli/commands/plan.py lines 3386–3392 against the spec's agents plan rollback Command → Behavior → Confirmation section revealed that the confirmation prompt is missing several required fields.

Current Behavior

The current confirmation prompt implementation:

confirm = typer.confirm(
    f"\nRollback plan {plan_id} to checkpoint {resolved_checkpoint_id}?"
)

The confirmation prompt is missing:

  1. The checkpoint's descriptive label (e.g., 'before-db-migration')
  2. The checkpoint's creation time (e.g., created 42 minutes ago)
  3. The side effects count (e.g., This will invalidate 12 decisions and cancel 2 child plans.)

Code Location: src/cleveragents/cli/commands/plan.py lines 3386–3392 — rollback_plan function

Expected Behavior

The spec defines the confirmation prompt format as:

Roll back plan 01HXM7A9 to checkpoint 'before-db-migration' (created 42 minutes ago)?
This will invalidate 12 decisions and cancel 2 child plans. [y/N]: y

Spec Reference: docs/specification.mdagents plan rollback Command → Behavior → Confirmation

Acceptance Criteria

  • Confirmation prompt displays the checkpoint's descriptive label
  • Confirmation prompt displays the checkpoint's relative creation time
  • Confirmation prompt displays the count of decisions that will be invalidated
  • Confirmation prompt displays the count of child plans that will be cancelled
  • Behave tests cover the updated confirmation prompt format
  • Coverage ≥ 97%

Metadata

  • Branch: fix/uat-rollback-confirmation-prompt
  • Commit Message: fix(cli): add checkpoint label, creation time, and side effects to rollback confirmation prompt
  • Milestone: (none — backlog)
  • Parent Epic: #368

Subtasks

  • Fetch checkpoint metadata before showing confirmation prompt
  • Display checkpoint label in confirmation prompt
  • Display checkpoint creation time (relative, e.g., "42 minutes ago") in confirmation prompt
  • Count decisions and child plans that would be invalidated and display in confirmation
  • Write Behave tests for the updated confirmation prompt format
  • Verify coverage >= 97%

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, followed by a blank line, then additional lines providing relevant details about the implementation.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly.
  • 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%

Backlog note: This issue was discovered during autonomous operation
on milestone . 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: Acting on behalf of: UAT Testing | Agent: ca-new-issue-creator

## Background and Context During UAT testing of the checkpoint-rollback-system feature area, a code-level analysis of `src/cleveragents/cli/commands/plan.py` lines 3386–3392 against the spec's `agents plan rollback` Command → Behavior → Confirmation section revealed that the confirmation prompt is missing several required fields. ## Current Behavior The current confirmation prompt implementation: ```python confirm = typer.confirm( f"\nRollback plan {plan_id} to checkpoint {resolved_checkpoint_id}?" ) ``` The confirmation prompt is missing: 1. The checkpoint's descriptive label (e.g., `'before-db-migration'`) 2. The checkpoint's creation time (e.g., `created 42 minutes ago`) 3. The side effects count (e.g., `This will invalidate 12 decisions and cancel 2 child plans.`) **Code Location:** `src/cleveragents/cli/commands/plan.py` lines 3386–3392 — `rollback_plan` function ## Expected Behavior The spec defines the confirmation prompt format as: ``` Roll back plan 01HXM7A9 to checkpoint 'before-db-migration' (created 42 minutes ago)? This will invalidate 12 decisions and cancel 2 child plans. [y/N]: y ``` **Spec Reference:** `docs/specification.md` — `agents plan rollback` Command → Behavior → Confirmation ## Acceptance Criteria - Confirmation prompt displays the checkpoint's descriptive label - Confirmation prompt displays the checkpoint's relative creation time - Confirmation prompt displays the count of decisions that will be invalidated - Confirmation prompt displays the count of child plans that will be cancelled - Behave tests cover the updated confirmation prompt format - Coverage ≥ 97% ## Metadata - **Branch**: `fix/uat-rollback-confirmation-prompt` - **Commit Message**: `fix(cli): add checkpoint label, creation time, and side effects to rollback confirmation prompt` - **Milestone**: *(none — backlog)* - **Parent Epic**: #368 ## Subtasks - [ ] Fetch checkpoint metadata before showing confirmation prompt - [ ] Display checkpoint label in confirmation prompt - [ ] Display checkpoint creation time (relative, e.g., "42 minutes ago") in confirmation prompt - [ ] Count decisions and child plans that would be invalidated and display in confirmation - [ ] Write Behave tests for the updated confirmation prompt format - [ ] Verify coverage >= 97% ## 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, followed by a blank line, then additional lines providing relevant details about the implementation. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly. - 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% > **Backlog note:** This issue was discovered during autonomous operation > on milestone <M>. 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: Acting on behalf of: UAT Testing | Agent: ca-new-issue-creator
freemo added this to the v3.7.0 milestone 2026-04-05 17:13:01 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Backlog (confirmed) — Rollback confirmation prompt missing metadata. UX polish.
  • Milestone: v3.7.0 (assigned — CLI output completeness)
  • Story Points: 2 (S) — Fetch checkpoint metadata and format into confirmation string
  • MoSCoW: Could Have — The confirmation prompt works, just missing descriptive context. Users can still confirm/deny rollbacks.
  • Parent Epic: #368 (Subplans & Parallelism)

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

Issue triaged by project owner: - **State**: Verified - **Priority**: Backlog (confirmed) — Rollback confirmation prompt missing metadata. UX polish. - **Milestone**: v3.7.0 (assigned — CLI output completeness) - **Story Points**: 2 (S) — Fetch checkpoint metadata and format into confirmation string - **MoSCoW**: Could Have — The confirmation prompt works, just missing descriptive context. Users can still confirm/deny rollbacks. - **Parent Epic**: #368 (Subplans & Parallelism) --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
Author
Owner

PR #3470 created on branch fix/uat-rollback-confirmation-prompt. I will monitor and handle all review feedback until merged.

Implementation summary:

  • Added _format_relative_time() helper for human-readable relative timestamps
  • rollback_plan now fetches checkpoint metadata before showing the confirmation prompt
  • Confirmation prompt shows: Roll back plan X to checkpoint 'label' (created N minutes ago)?
  • Side effects line printed when decisions/child plans would be invalidated: This will invalidate N decisions and cancel M child plans.
  • Graceful fallback to simple prompt if checkpoint metadata fetch fails
  • 3 new Behave scenarios added; all 26 scenarios pass

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

PR #3470 created on branch `fix/uat-rollback-confirmation-prompt`. I will monitor and handle all review feedback until merged. **Implementation summary:** - Added `_format_relative_time()` helper for human-readable relative timestamps - `rollback_plan` now fetches checkpoint metadata before showing the confirmation prompt - Confirmation prompt shows: `Roll back plan X to checkpoint 'label' (created N minutes ago)?` - Side effects line printed when decisions/child plans would be invalidated: `This will invalidate N decisions and cancel M child plans.` - Graceful fallback to simple prompt if checkpoint metadata fetch fails - 3 new Behave scenarios added; all 26 scenarios pass --- **Automated by CleverAgents Bot** Supervisor: Implementation | Agent: ca-issue-worker
Author
Owner

Label compliance fix applied:

  • Added missing label: Priority/Backlog
  • Added missing label: Type/Bug
  • Reason: Issue was missing required Priority/* and Type/* labels per CONTRIBUTING.md. Inferred Type/Bug from UAT issue title and content. Applied Priority/Backlog as default since no priority was specified.

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

Label compliance fix applied: - Added missing label: `Priority/Backlog` - Added missing label: `Type/Bug` - Reason: Issue was missing required Priority/* and Type/* labels per CONTRIBUTING.md. Inferred `Type/Bug` from UAT issue title and content. Applied `Priority/Backlog` as default since no priority was specified. --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: ca-backlog-groomer
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
#368 Epic: Subplans & Parallelism
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#3443
No description provided.