UAT: agents plan correct --dry-run output missing spec-required warnings, estimated_recompute_time_seconds, and "remove --dry-run" hint #6132

Open
opened 2026-04-09 15:19:45 +00:00 by HAL9000 · 1 comment
Owner

Summary

agents plan correct --dry-run calls analyze_impact() directly but never calls generate_dry_run_report(). As a result, the output is missing three spec-required fields: warnings, estimated_recompute_time_seconds, and the "To execute this correction, remove --dry-run and add --yes" hint message.

What Was Tested

Code-level analysis of correct_decision() CLI handler against spec §agents plan correct (dry-run output) and v3.3.0 Acceptance Criterion #9.

Expected Behavior (from spec)

v3.3.0 Acceptance Criterion #9:

agents plan correct --dry-run shows warnings, recompute time, and hint | Output includes warnings, estimated_recompute_time_seconds, and "remove --dry-run" hint

Spec §agents plan correct (JSON output for dry-run):

{
  "messages": ["To execute this correction, remove --dry-run and add --yes"]
}

The spec also requires warnings (e.g., "High risk: more than 10 decisions affected") and estimated_recompute_time_seconds in the dry-run output.

Actual Behavior

The CLI correct_decision() handler at line 3267 calls analyze_impact() directly:

# src/cleveragents/cli/commands/plan.py:3267
if dry_run:
    impact = svc.analyze_impact(
        request.correction_id,
        decision_tree=decision_tree,
        influence_edges=influence_edges,
    )
    if fmt != OutputFormat.RICH.value:
        data = {
            "correction_id": request.correction_id,
            "mode": request.mode.value,
            "target_decision": request.target_decision_id,
            "affected_decisions": impact.affected_decisions,
            "affected_files": impact.affected_files,
            "estimated_cost": impact.estimated_cost,
            "risk_level": impact.risk_level,
        }
        console.print(format_output(data, fmt))
    else:
        # Rich output also missing warnings and recompute time
        ...
    return

The generate_dry_run_report() method in CorrectionService produces the required warnings, estimated_recompute_time_seconds, and decisions_to_invalidate fields, but is never called from the CLI. The output dict is missing:

  • warnings (list of human-readable risk warnings)
  • estimated_recompute_time_seconds (float)
  • messages with "remove --dry-run" hint

Steps to Reproduce

  1. Run agents plan correct --mode revert -g "Use FastAPI" <DECISION_ID> --dry-run --format json
  2. Observe: output JSON has no warnings, estimated_recompute_time_seconds, or messages fields
  3. Expected: output includes all three per spec

Code Locations

  • src/cleveragents/cli/commands/plan.py:3267 — dry-run branch calls analyze_impact() instead of generate_dry_run_report()
  • src/cleveragents/application/services/correction_service.pygenerate_dry_run_report() exists but is never called from CLI

Fix Direction

Replace the analyze_impact() call in the dry-run branch with generate_dry_run_report() and include report.warnings, report.estimated_recompute_time_seconds, and the "remove --dry-run" hint in the output.

Spec References

  • §agents plan correct — dry-run output
  • v3.3.0 Acceptance Criterion #9: "Output includes warnings, estimated_recompute_time_seconds, and 'remove --dry-run' hint"

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

## Summary `agents plan correct --dry-run` calls `analyze_impact()` directly but never calls `generate_dry_run_report()`. As a result, the output is missing three spec-required fields: `warnings`, `estimated_recompute_time_seconds`, and the "To execute this correction, remove --dry-run and add --yes" hint message. ## What Was Tested Code-level analysis of `correct_decision()` CLI handler against spec §agents plan correct (dry-run output) and v3.3.0 Acceptance Criterion #9. ## Expected Behavior (from spec) **v3.3.0 Acceptance Criterion #9:** > `agents plan correct --dry-run` shows warnings, recompute time, and hint | Output includes `warnings`, `estimated_recompute_time_seconds`, and "remove --dry-run" hint **Spec §agents plan correct (JSON output for dry-run):** ```json { "messages": ["To execute this correction, remove --dry-run and add --yes"] } ``` The spec also requires `warnings` (e.g., "High risk: more than 10 decisions affected") and `estimated_recompute_time_seconds` in the dry-run output. ## Actual Behavior The CLI `correct_decision()` handler at line 3267 calls `analyze_impact()` directly: ```python # src/cleveragents/cli/commands/plan.py:3267 if dry_run: impact = svc.analyze_impact( request.correction_id, decision_tree=decision_tree, influence_edges=influence_edges, ) if fmt != OutputFormat.RICH.value: data = { "correction_id": request.correction_id, "mode": request.mode.value, "target_decision": request.target_decision_id, "affected_decisions": impact.affected_decisions, "affected_files": impact.affected_files, "estimated_cost": impact.estimated_cost, "risk_level": impact.risk_level, } console.print(format_output(data, fmt)) else: # Rich output also missing warnings and recompute time ... return ``` The `generate_dry_run_report()` method in `CorrectionService` produces the required `warnings`, `estimated_recompute_time_seconds`, and `decisions_to_invalidate` fields, but is never called from the CLI. The output dict is missing: - `warnings` (list of human-readable risk warnings) - `estimated_recompute_time_seconds` (float) - `messages` with "remove --dry-run" hint ## Steps to Reproduce 1. Run `agents plan correct --mode revert -g "Use FastAPI" <DECISION_ID> --dry-run --format json` 2. Observe: output JSON has no `warnings`, `estimated_recompute_time_seconds`, or `messages` fields 3. Expected: output includes all three per spec ## Code Locations - `src/cleveragents/cli/commands/plan.py:3267` — dry-run branch calls `analyze_impact()` instead of `generate_dry_run_report()` - `src/cleveragents/application/services/correction_service.py` — `generate_dry_run_report()` exists but is never called from CLI ## Fix Direction Replace the `analyze_impact()` call in the dry-run branch with `generate_dry_run_report()` and include `report.warnings`, `report.estimated_recompute_time_seconds`, and the "remove --dry-run" hint in the output. ## Spec References - §agents plan correct — dry-run output - v3.3.0 Acceptance Criterion #9: "Output includes `warnings`, `estimated_recompute_time_seconds`, and 'remove --dry-run' hint" --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.3.0 milestone 2026-04-09 15:27:45 +00:00
Author
Owner

Label compliance fix applied:

  • Added missing label: Points/3 (estimated)
  • Reason: Issue is in State/Verified — per CONTRIBUTING.md, verified issues require a Points/* label. Estimated based on description complexity (moderate, output formatting fix).

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

Label compliance fix applied: - Added missing label: `Points/3` (estimated) - Reason: Issue is in `State/Verified` — per CONTRIBUTING.md, verified issues require a `Points/*` label. Estimated based on description complexity (moderate, output formatting fix). --- **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.

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