UAT: agents plan correct --mode=append is a stub — generates random ULIDs but does not create a real child plan or decision in the system #3114

Open
opened 2026-04-05 06:23:34 +00:00 by freemo · 2 comments
Owner

Summary

CorrectionService.execute_append() generates random ULIDs for child_plan_id and new_decision_id but does not create any actual plan or decision in the system. The returned spawned_child_plan_id and new_decisions are phantom IDs that do not correspond to any real entities. The append correction mode is effectively a no-op stub.

Metadata

Prescribed commit message: feat(correction): implement append correction — spawn real child plan and record correction decision
Branch name: feat/correction-append-real-child-plan

Subtasks

  • Wire PlanLifecycleService into CorrectionService (or use a protocol/port)
  • In execute_append(), call the plan lifecycle service to create a real child plan linked to the parent plan
  • Record a user_intervention decision in the decision tree with the correction guidance
  • Update DI container to inject the required service
  • Add Behave unit test verifying a real child plan is created
  • Add Robot Framework integration test verifying the child plan appears in agents plan list

Definition of Done

  • After agents plan correct <id> --mode append --guidance "...", a real child plan exists that can be found via agents plan list
  • The spawned_child_plan_id in the result corresponds to a real plan in the system
  • All existing tests pass

Bug Details

What was tested

Code analysis of src/cleveragents/application/services/correction_service.py, method execute_append(), lines 563–640

Expected behavior (from spec § Two Correction Modes, Append)

Leave history intact and append a new plan at the end that fixes the outcome. Does not rewrite history.
Creates a new child plan to fix the outcome without rewriting history.

Actual behavior

execute_append() is a stub that only generates random ULIDs:

# correction_service.py lines 598-613
try:
    child_plan_id = str(ULID())      # ← random ULID, no real plan created
    new_decision_id = str(ULID())    # ← random ULID, no real decision created

    result = CorrectionResult(
        correction_id=correction_id,
        status=CorrectionStatus.APPLIED,
        new_decisions=[new_decision_id],
        spawned_child_plan_id=child_plan_id,
    )
    # No call to PlanLifecycleService, DecisionService, or any persistence layer

No plan is created, no decision is recorded, no guidance is stored. The returned IDs are phantom references.

Code location

src/cleveragents/application/services/correction_service.py, method execute_append(), lines 563–640

Steps to reproduce

  1. Create a plan with a decision
  2. Run: agents plan correct <decision_id> --mode append --guidance "Add rate limiting"
  3. Run: agents plan list or agents plan status <spawned_child_plan_id>
  4. Observe that the spawned child plan ID does not correspond to any real plan

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


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

## Summary `CorrectionService.execute_append()` generates random ULIDs for `child_plan_id` and `new_decision_id` but does not create any actual plan or decision in the system. The returned `spawned_child_plan_id` and `new_decisions` are phantom IDs that do not correspond to any real entities. The append correction mode is effectively a no-op stub. ## Metadata **Prescribed commit message**: `feat(correction): implement append correction — spawn real child plan and record correction decision` **Branch name**: `feat/correction-append-real-child-plan` ## Subtasks - [ ] Wire `PlanLifecycleService` into `CorrectionService` (or use a protocol/port) - [ ] In `execute_append()`, call the plan lifecycle service to create a real child plan linked to the parent plan - [ ] Record a `user_intervention` decision in the decision tree with the correction guidance - [ ] Update DI container to inject the required service - [ ] Add Behave unit test verifying a real child plan is created - [ ] Add Robot Framework integration test verifying the child plan appears in `agents plan list` ## Definition of Done - After `agents plan correct <id> --mode append --guidance "..."`, a real child plan exists that can be found via `agents plan list` - The `spawned_child_plan_id` in the result corresponds to a real plan in the system - All existing tests pass ## Bug Details ### What was tested Code analysis of `src/cleveragents/application/services/correction_service.py`, method `execute_append()`, lines 563–640 ### Expected behavior (from spec § Two Correction Modes, Append) > Leave history intact and append a new plan at the end that fixes the outcome. Does not rewrite history. > Creates a new child plan to fix the outcome without rewriting history. ### Actual behavior `execute_append()` is a stub that only generates random ULIDs: ```python # correction_service.py lines 598-613 try: child_plan_id = str(ULID()) # ← random ULID, no real plan created new_decision_id = str(ULID()) # ← random ULID, no real decision created result = CorrectionResult( correction_id=correction_id, status=CorrectionStatus.APPLIED, new_decisions=[new_decision_id], spawned_child_plan_id=child_plan_id, ) # No call to PlanLifecycleService, DecisionService, or any persistence layer ``` No plan is created, no decision is recorded, no guidance is stored. The returned IDs are phantom references. ### Code location `src/cleveragents/application/services/correction_service.py`, method `execute_append()`, lines 563–640 ### Steps to reproduce 1. Create a plan with a decision 2. Run: `agents plan correct <decision_id> --mode append --guidance "Add rate limiting"` 3. Run: `agents plan list` or `agents plan status <spawned_child_plan_id>` 4. Observe that the spawned child plan ID does not correspond to any real plan --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-uat-tester --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
freemo added this to the v3.3.0 milestone 2026-04-05 06:23:57 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Critical (keeping existing — append correction mode is a core v3.3.0 deliverable)
  • Milestone: v3.3.0 (already assigned, keeping)
  • MoSCoW: Must Have — v3.3.0 acceptance criteria requires "Correction flow functional (plan correct --mode revert and --mode append)." The append mode is currently a no-op stub that generates phantom IDs.
  • Parent Epic: #394 (Decision Framework) — note: issue body doesn't specify parent Epic, linking to #394 as the correction system is part of the Decision Framework

Part of the correction-flow bug cluster (#3107, #3108, #3109, #3113, #3114).


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

Issue triaged by project owner: - **State**: Verified - **Priority**: Critical (keeping existing — append correction mode is a core v3.3.0 deliverable) - **Milestone**: v3.3.0 (already assigned, keeping) - **MoSCoW**: Must Have — v3.3.0 acceptance criteria requires "Correction flow functional (`plan correct --mode revert` and `--mode append`)." The append mode is currently a no-op stub that generates phantom IDs. - **Parent Epic**: #394 (Decision Framework) — note: issue body doesn't specify parent Epic, linking to #394 as the correction system is part of the Decision Framework Part of the correction-flow bug cluster (#3107, #3108, #3109, #3113, #3114). --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
Author
Owner

Starting implementation on branch feat/correction-append-real-child-plan.

Plan:

  • Wire PlanLifecycleService and DecisionService into CorrectionService
  • Implement execute_append() to create a real child plan via PlanLifecycleService
  • Record a user_intervention decision via DecisionService
  • Update DI container to inject the required services
  • Add Behave unit tests verifying real child plan creation
  • Add Robot Framework integration test

Difficulty assessment: Medium → starting at sonnet tier.


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

Starting implementation on branch `feat/correction-append-real-child-plan`. **Plan:** - Wire `PlanLifecycleService` and `DecisionService` into `CorrectionService` - Implement `execute_append()` to create a real child plan via `PlanLifecycleService` - Record a `user_intervention` decision via `DecisionService` - Update DI container to inject the required services - Add Behave unit tests verifying real child plan creation - Add Robot Framework integration test Difficulty assessment: Medium → starting at sonnet tier. --- **Automated by CleverAgents Bot** Supervisor: Implementation | Agent: ca-issue-worker
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#3114
No description provided.