UAT: agents plan list --format json output missing spec-required envelope — no filters, summary, or per-plan id/action/project/elapsed fields #4836

Open
opened 2026-04-08 20:05:20 +00:00 by HAL9000 · 0 comments
Owner

Summary

agents plan list --format json produces a flat list of verbose plan objects instead of the spec-required response envelope with plans, filters, and summary keys. The per-plan entries also use wrong field names.

What Was Tested

Code-level analysis of src/cleveragents/cli/commands/plan.py (lifecycle_list_plans) and _plan_spec_dict() against the specification's agents plan list JSON output schema.

Expected Behavior (from spec §agents plan list)

{
  "command": "plan list",
  "status": "ok",
  "exit_code": 0,
  "data": {
    "plans": [
      {
        "id": "01HXM7A9",
        "phase": "execute",
        "state": "processing",
        "action": "local/code-coverage",
        "project": "local/api-service",
        "elapsed": "00:01:12"
      }
    ],
    "filters": {
      "phase": "execute",
      "state": null,
      "project": null,
      "action": null
    },
    "summary": {
      "total": 1,
      "processing": 1,
      "completed": 0,
      "errored": 0
    }
  },
  "timing": { "started": "2026-02-09T14:30:00Z", "duration_ms": 95 },
  "messages": ["1 plan listed"]
}

Actual Behavior

The code at line 2656–2658 of plan.py:

if fmt != OutputFormat.RICH.value:
    data = [_plan_spec_dict(p) for p in plans]
    console.print(format_output(data, fmt))
    return

Produces a flat list of verbose plan dicts from _plan_spec_dict(), which outputs:

  • plan_id (spec uses id — truncated 8-char prefix in table, full ULID in JSON)
  • namespaced_name (spec uses action and project as separate top-level fields)
  • processing_state (spec uses state)
  • No elapsed field
  • No filters envelope
  • No summary envelope (total, processing, completed, errored counts)

Code Location

  • src/cleveragents/cli/commands/plan.py, lines 2655–2658 (non-rich format branch)
  • src/cleveragents/cli/commands/plan.py, lines 223–300 (_plan_spec_dict())

Impact

Any tooling or automation consuming agents plan list --format json or --format yaml will receive a structurally incorrect response. The filters and summary fields are required for programmatic consumers to understand what filters were applied and get aggregate counts without iterating the full list.

Steps to Reproduce

agents plan list --format json

Expected: JSON with data.plans[], data.filters{}, data.summary{} envelope.
Actual: Flat JSON array of verbose plan objects with wrong field names.


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

## Summary `agents plan list --format json` produces a flat list of verbose plan objects instead of the spec-required response envelope with `plans`, `filters`, and `summary` keys. The per-plan entries also use wrong field names. ## What Was Tested Code-level analysis of `src/cleveragents/cli/commands/plan.py` (`lifecycle_list_plans`) and `_plan_spec_dict()` against the specification's `agents plan list` JSON output schema. ## Expected Behavior (from spec §agents plan list) ```json { "command": "plan list", "status": "ok", "exit_code": 0, "data": { "plans": [ { "id": "01HXM7A9", "phase": "execute", "state": "processing", "action": "local/code-coverage", "project": "local/api-service", "elapsed": "00:01:12" } ], "filters": { "phase": "execute", "state": null, "project": null, "action": null }, "summary": { "total": 1, "processing": 1, "completed": 0, "errored": 0 } }, "timing": { "started": "2026-02-09T14:30:00Z", "duration_ms": 95 }, "messages": ["1 plan listed"] } ``` ## Actual Behavior The code at line 2656–2658 of `plan.py`: ```python if fmt != OutputFormat.RICH.value: data = [_plan_spec_dict(p) for p in plans] console.print(format_output(data, fmt)) return ``` Produces a flat list of verbose plan dicts from `_plan_spec_dict()`, which outputs: - `plan_id` (spec uses `id` — truncated 8-char prefix in table, full ULID in JSON) - `namespaced_name` (spec uses `action` and `project` as separate top-level fields) - `processing_state` (spec uses `state`) - No `elapsed` field - No `filters` envelope - No `summary` envelope (total, processing, completed, errored counts) ## Code Location - `src/cleveragents/cli/commands/plan.py`, lines 2655–2658 (non-rich format branch) - `src/cleveragents/cli/commands/plan.py`, lines 223–300 (`_plan_spec_dict()`) ## Impact Any tooling or automation consuming `agents plan list --format json` or `--format yaml` will receive a structurally incorrect response. The `filters` and `summary` fields are required for programmatic consumers to understand what filters were applied and get aggregate counts without iterating the full list. ## Steps to Reproduce ```bash agents plan list --format json ``` Expected: JSON with `data.plans[]`, `data.filters{}`, `data.summary{}` envelope. Actual: Flat JSON array of verbose plan objects with wrong field names. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.3.0 milestone 2026-04-08 20:18:00 +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.

Dependencies

No dependencies set.

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