UAT: agents action show and agents action archive JSON output missing spec-required history and impact sections #6786

Open
opened 2026-04-10 02:05:58 +00:00 by HAL9000 · 0 comments
Owner

Bug Report

Summary

agents action show --format json is missing the required history section (plans created, completed, failed, avg duration/cost), and agents action archive --format json is missing both impact and history sections. Both commands also use incorrect field names.

What Was Tested

Code analysis of src/cleveragents/cli/commands/action.py (show, archive functions, _action_spec_dict helper) against docs/specification.md sections "agents action show" (line 16585–16657) and "agents action archive" (line 16723–16769).

Expected Behavior (from spec)

action show JSON output (docs/specification.md line 16585–16616):

{
  "command": "action show",
  "data": {
    "name": "local/code-coverage",
    "state": "available",
    "strategy_actor": "local/strategist",
    "execution_actor": "local/executor",
    "reusable": true,
    "read_only": false,
    "created": "2026-02-08T12:20:00Z",
    "definition_of_done": "Coverage reaches 85%",
    "arguments": [...],
    "automation": { "profile": "supervised", "source": "default" },
    "history": {
      "plans_created": 3,
      "plans_completed": 2,
      "plans_failed": 0,
      "avg_duration": "00:04:30",
      "avg_cost": "$0.072"
    }
  },
  "messages": ["Action loaded"]
}

action archive JSON output (docs/specification.md line 16725–16748):

{
  "command": "action archive",
  "data": {
    "name": "local/old-action",
    "state_transition": "available -> archived",
    "archived": "2026-02-08T12:22:00Z",
    "impact": {
      "availability": "hidden from list",
      "existing_plans": "unchanged",
      "active_plans_affected": 0
    },
    "history": {
      "total_plans": 5,
      "completed": 4,
      "failed": 1,
      "last_used": "2026-02-06"
    }
  },
  "messages": ["Action archived"]
}

Actual Behavior

action show calls _action_spec_dict(action) which:

  • Returns namespaced_name and short_name keys instead of name
  • Returns created_at instead of created
  • Does NOT include history (plans_created, plans_completed, plans_failed, avg_duration, avg_cost)
  • Does NOT include automation object (only flat automation_profile string)
  • Does NOT include usage hint

action archive calls _action_spec_dict(action) and adds archived: True (a boolean), but:

  • Does NOT include state_transition string (e.g. "available -> archived")
  • Does NOT include archived timestamp
  • Does NOT include impact object
  • Does NOT include history object
  • Sets archived: True (boolean) which conflicts with the spec's archived field (a timestamp string)

Steps to Reproduce

agents action show local/some-action --format json
agents action archive local/some-action --format json

Impact

Programmatic consumers relying on history data (e.g. tooling that tracks plan success rates per action) will receive empty responses. The archive impact section is required for clients to understand side effects.


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

## Bug Report ### Summary `agents action show --format json` is missing the required `history` section (plans created, completed, failed, avg duration/cost), and `agents action archive --format json` is missing both `impact` and `history` sections. Both commands also use incorrect field names. ### What Was Tested Code analysis of `src/cleveragents/cli/commands/action.py` (`show`, `archive` functions, `_action_spec_dict` helper) against `docs/specification.md` sections "agents action show" (line 16585–16657) and "agents action archive" (line 16723–16769). ### Expected Behavior (from spec) **`action show` JSON output** (`docs/specification.md` line 16585–16616): ```json { "command": "action show", "data": { "name": "local/code-coverage", "state": "available", "strategy_actor": "local/strategist", "execution_actor": "local/executor", "reusable": true, "read_only": false, "created": "2026-02-08T12:20:00Z", "definition_of_done": "Coverage reaches 85%", "arguments": [...], "automation": { "profile": "supervised", "source": "default" }, "history": { "plans_created": 3, "plans_completed": 2, "plans_failed": 0, "avg_duration": "00:04:30", "avg_cost": "$0.072" } }, "messages": ["Action loaded"] } ``` **`action archive` JSON output** (`docs/specification.md` line 16725–16748): ```json { "command": "action archive", "data": { "name": "local/old-action", "state_transition": "available -> archived", "archived": "2026-02-08T12:22:00Z", "impact": { "availability": "hidden from list", "existing_plans": "unchanged", "active_plans_affected": 0 }, "history": { "total_plans": 5, "completed": 4, "failed": 1, "last_used": "2026-02-06" } }, "messages": ["Action archived"] } ``` ### Actual Behavior **`action show`** calls `_action_spec_dict(action)` which: - Returns `namespaced_name` and `short_name` keys instead of `name` - Returns `created_at` instead of `created` - Does NOT include `history` (plans_created, plans_completed, plans_failed, avg_duration, avg_cost) - Does NOT include `automation` object (only flat `automation_profile` string) - Does NOT include `usage` hint **`action archive`** calls `_action_spec_dict(action)` and adds `archived: True` (a boolean), but: - Does NOT include `state_transition` string (e.g. `"available -> archived"`) - Does NOT include `archived` timestamp - Does NOT include `impact` object - Does NOT include `history` object - Sets `archived: True` (boolean) which conflicts with the spec's `archived` field (a timestamp string) ### Steps to Reproduce ```bash agents action show local/some-action --format json agents action archive local/some-action --format json ``` ### Impact Programmatic consumers relying on `history` data (e.g. tooling that tracks plan success rates per action) will receive empty responses. The archive `impact` section is required for clients to understand side effects. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.4.0 milestone 2026-04-10 02:06:05 +00:00
HAL9000 self-assigned this 2026-04-10 06:07:14 +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#6786
No description provided.