UAT: agents resource list JSON/YAML output missing children, projects, and summary fields required by spec #6472

Open
opened 2026-04-09 21:07:44 +00:00 by HAL9000 · 0 comments
Owner

Bug Report

Feature Area

Resource System — agents resource list JSON/YAML output format

Spec Reference

docs/specification.md §11032–11136 (agents resource list)

From spec §11092–11135 (JSON output):

{
  "command": "resource list",
  "status": "ok",
  "exit_code": 0,
  "data": {
    "resources": [
      {
        "name": "local/api-repo",
        "id": "01HXR1A1B2C3D4E5F6G7H8J9K0",
        "type": "git-checkout",
        "physical_virtual": "physical",
        "children": 395,
        "projects": ["local/api-service"]
      },
      {
        "name": "local/docs",
        "id": "01HXR2B2C3D4E5F6G7H8J9K0L1",
        "type": "fs-mount",
        "physical_virtual": "physical",
        "children": 32,
        "projects": ["local/api-service"]
      }
    ],
    "summary": {
      "total": 3,
      "physical": 3,
      "virtual": 0,
      "total_children": 405
    }
  },
  "timing": { "started": "...", "duration_ms": 90 },
  "messages": ["3 resources listed"]
}

Expected Behavior (from spec)

The JSON output of agents resource list should:

  1. Wrap resources in data.resources (not a flat list in data)
  2. Include children count per resource
  3. Include projects list per resource (linked projects)
  4. Include data.summary with total, physical, virtual, total_children
  5. Use physical_virtual field name (not classification)
  6. Use id field name (not resource_id)
  7. Set command field to "resource list" (not empty string)
  8. Include messages with count like "3 resources listed"

Actual Behavior

Running agents resource list --format json produces:

{
  "command": "",
  "status": "ok",
  "exit_code": 0,
  "data": [
    {
      "resource_id": "01KNKJY4X9K7ZDNEK7M6TKJTDG",
      "name": "local/my-repo",
      "type": "git-checkout",
      "classification": "physical",
      "description": null,
      "location": "/app",
      "properties": {"path": "/app"},
      "lifecycle_state": null,
      "created_at": "...",
      "updated_at": "..."
    }
  ],
  "timing": {"duration_ms": 0},
  "messages": [{"level": "ok", "text": "ok"}]
}

Issues:

  1. data is a flat list instead of data.resources (nested structure)
  2. children field missing per resource
  3. projects field missing per resource
  4. data.summary section missing entirely
  5. Field named classification instead of physical_virtual
  6. Field named resource_id instead of id
  7. command field is empty string "" instead of "resource list"
  8. messages contains [{"level": "ok", "text": "ok"}] instead of ["3 resources listed"]

Code Location

  • src/cleveragents/cli/commands/resource.py lines 817–912: resource_list() — uses _resource_dict() which doesn't include children or projects
  • src/cleveragents/cli/commands/resource.py lines 181–198: _resource_dict() — missing children and projects fields
  • src/cleveragents/cli/commands/resource.py line 859: format_output(data, fmt) — missing command="resource list" parameter

Steps to Reproduce

agents resource list --format json

Observe: flat list without children, projects, or summary fields.

Severity

Medium — downstream automation tools that parse agents --format json resource list output will fail to find data.resources, data.summary, children, and projects keys.


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

## Bug Report ### Feature Area Resource System — `agents resource list` JSON/YAML output format ### Spec Reference `docs/specification.md` §11032–11136 (`agents resource list`) From spec §11092–11135 (JSON output): ```json { "command": "resource list", "status": "ok", "exit_code": 0, "data": { "resources": [ { "name": "local/api-repo", "id": "01HXR1A1B2C3D4E5F6G7H8J9K0", "type": "git-checkout", "physical_virtual": "physical", "children": 395, "projects": ["local/api-service"] }, { "name": "local/docs", "id": "01HXR2B2C3D4E5F6G7H8J9K0L1", "type": "fs-mount", "physical_virtual": "physical", "children": 32, "projects": ["local/api-service"] } ], "summary": { "total": 3, "physical": 3, "virtual": 0, "total_children": 405 } }, "timing": { "started": "...", "duration_ms": 90 }, "messages": ["3 resources listed"] } ``` ### Expected Behavior (from spec) The JSON output of `agents resource list` should: 1. Wrap resources in `data.resources` (not a flat list in `data`) 2. Include `children` count per resource 3. Include `projects` list per resource (linked projects) 4. Include `data.summary` with `total`, `physical`, `virtual`, `total_children` 5. Use `physical_virtual` field name (not `classification`) 6. Use `id` field name (not `resource_id`) 7. Set `command` field to `"resource list"` (not empty string) 8. Include `messages` with count like `"3 resources listed"` ### Actual Behavior Running `agents resource list --format json` produces: ```json { "command": "", "status": "ok", "exit_code": 0, "data": [ { "resource_id": "01KNKJY4X9K7ZDNEK7M6TKJTDG", "name": "local/my-repo", "type": "git-checkout", "classification": "physical", "description": null, "location": "/app", "properties": {"path": "/app"}, "lifecycle_state": null, "created_at": "...", "updated_at": "..." } ], "timing": {"duration_ms": 0}, "messages": [{"level": "ok", "text": "ok"}] } ``` **Issues:** 1. ❌ `data` is a flat list instead of `data.resources` (nested structure) 2. ❌ `children` field missing per resource 3. ❌ `projects` field missing per resource 4. ❌ `data.summary` section missing entirely 5. ❌ Field named `classification` instead of `physical_virtual` 6. ❌ Field named `resource_id` instead of `id` 7. ❌ `command` field is empty string `""` instead of `"resource list"` 8. ❌ `messages` contains `[{"level": "ok", "text": "ok"}]` instead of `["3 resources listed"]` ### Code Location - `src/cleveragents/cli/commands/resource.py` lines 817–912: `resource_list()` — uses `_resource_dict()` which doesn't include `children` or `projects` - `src/cleveragents/cli/commands/resource.py` lines 181–198: `_resource_dict()` — missing `children` and `projects` fields - `src/cleveragents/cli/commands/resource.py` line 859: `format_output(data, fmt)` — missing `command="resource list"` parameter ### Steps to Reproduce ```bash agents resource list --format json ``` Observe: flat list without `children`, `projects`, or `summary` fields. ### Severity Medium — downstream automation tools that parse `agents --format json resource list` output will fail to find `data.resources`, `data.summary`, `children`, and `projects` keys. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
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#6472
No description provided.