UAT: plan correct does not increment plan.attempt counter on each correction as required by spec #5319

Open
opened 2026-04-09 05:50:01 +00:00 by HAL9000 · 1 comment
Owner

Bug Report

Feature Area: plan-correction-modes
Severity: Medium
Priority: Backlog
Found by: UAT Testing (uat-pool-1, worker: plan-correction-modes)


What was tested

Whether agents plan correct increments the plan's attempt counter as required by the spec's Correction Safety guarantees.

Expected behavior (from spec §Correction Safety)

The spec states:

Corrections always:

  • Create a new attempt revision (increment plan.attempt)

The spec's rich output for revert mode shows:

╭─ Correction ────────────────────────────────────────╮
│ Mode: revert                                        │
│ Attempt: 2                                          │
╰─────────────────────────────────────────────────────╯

And the JSON output includes:

"correction": {
  "attempt": 2
}

This indicates the plan's attempt counter should be incremented on each correction.

Actual behavior (from code analysis)

In src/cleveragents/application/services/correction_service.py, neither execute_revert() nor execute_append() calls any method to increment the plan's attempt counter. The CorrectionService has no reference to PlanLifecycleService and cannot update the plan's attempt field.

The CorrectionAttempt model tracks correction-level attempts (separate from plan-level attempts), but the plan's identity.attempt field (in PlanIdentity) is never incremented.

Code locations

  • src/cleveragents/application/services/correction_service.py: No call to increment plan.attempt
  • src/cleveragents/domain/models/core/plan.py: PlanIdentity.attempt field exists but is not updated by correction service

Impact

The plan's attempt counter does not reflect the number of corrections applied. This breaks the audit trail and the spec's safety guarantee that "corrections always create a new attempt revision." The attempt field shown in correction output will always be stale/incorrect.


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

## Bug Report **Feature Area:** plan-correction-modes **Severity:** Medium **Priority:** Backlog **Found by:** UAT Testing (uat-pool-1, worker: plan-correction-modes) --- ### What was tested Whether `agents plan correct` increments the plan's `attempt` counter as required by the spec's Correction Safety guarantees. ### Expected behavior (from spec §Correction Safety) The spec states: > Corrections always: > - [x] Create a new attempt revision (increment `plan.attempt`) The spec's rich output for revert mode shows: ``` ╭─ Correction ────────────────────────────────────────╮ │ Mode: revert │ │ Attempt: 2 │ ╰─────────────────────────────────────────────────────╯ ``` And the JSON output includes: ```json "correction": { "attempt": 2 } ``` This indicates the plan's attempt counter should be incremented on each correction. ### Actual behavior (from code analysis) In `src/cleveragents/application/services/correction_service.py`, neither `execute_revert()` nor `execute_append()` calls any method to increment the plan's `attempt` counter. The `CorrectionService` has no reference to `PlanLifecycleService` and cannot update the plan's attempt field. The `CorrectionAttempt` model tracks correction-level attempts (separate from plan-level attempts), but the plan's `identity.attempt` field (in `PlanIdentity`) is never incremented. ### Code locations - `src/cleveragents/application/services/correction_service.py`: No call to increment `plan.attempt` - `src/cleveragents/domain/models/core/plan.py`: `PlanIdentity.attempt` field exists but is not updated by correction service ### Impact The plan's attempt counter does not reflect the number of corrections applied. This breaks the audit trail and the spec's safety guarantee that "corrections always create a new attempt revision." The `attempt` field shown in correction output will always be stale/incorrect. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.3.0 milestone 2026-04-09 05:52:51 +00:00
Author
Owner

Label compliance fix applied:

  • Assigned milestone: v3.3.0 (Correction Engine milestone)
  • Reason: Bug issue related to plan correct functionality was missing a milestone. Assigned to v3.3.0 based on correction engine scope.

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

Label compliance fix applied: - Assigned milestone: `v3.3.0` (Correction Engine milestone) - Reason: Bug issue related to `plan correct` functionality was missing a milestone. Assigned to v3.3.0 based on correction engine scope. --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: 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.

Dependencies

No dependencies set.

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