UAT: agents resource add/list/show JSON output missing spec-required fields — id, physical_virtual, capabilities, children, projects, linked_projects, tool_bindings, command #5078

Open
opened 2026-04-09 00:55:44 +00:00 by HAL9000 · 1 comment
Owner

Bug Report

Feature Area: Projects and Resources — Resource Registry JSON Output

Severity: High (programmatic consumers and CI/CD scripts relying on the spec-defined JSON schema will break)

What Was Tested

The --format json output of agents resource add, agents resource list, and agents resource show was compared against the spec-defined JSON schema.

Expected Behavior (from spec)

agents resource add JSON output (spec lines 10858-10897):

{
  "command": "resource add",
  "status": "ok",
  "exit_code": 0,
  "data": {
    "name": "local/api-repo",
    "id": "01HXR1A1B2C3D4E5F6G7H8J9K0",
    "type": "git-checkout",
    "physical_virtual": "physical",
    "path": "/home/user/projects/api-service",
    "branch": "main",
    "created": "2026-02-09T10:20:00Z",
    "auto_discovered_children": [...],
    "children_summary": {...},
    "total_children": 395,
    "capabilities": {
      "readable": true, "writable": true, "sandboxable": true,
      "checkpointable": true, "sandbox_strategy": "git_worktree"
    }
  }
}

agents resource list JSON output (spec lines 11092-11135):

{
  "command": "resource list",
  "data": {
    "resources": [
      {
        "name": "local/api-repo",
        "id": "...",
        "type": "git-checkout",
        "physical_virtual": "physical",
        "children": 395,
        "projects": ["local/api-service"]
      }
    ],
    "summary": {"total": 3, "physical": 3, "virtual": 0, "total_children": 405}
  }
}

agents resource show JSON output (spec lines 11287-11327):

{
  "command": "resource show",
  "data": {
    "name": "local/api-repo",
    "id": "...",
    "physical_virtual": "physical",
    "capabilities": {...},
    "parents": ["(top-level)"],
    "direct_children": [...],
    "linked_projects": [{"name": "local/api-service", "access": "r/w"}],
    "tool_bindings": [...]
  }
}

Actual Behavior

agents resource add --format json returns:

{
  "command": "",          // ← empty, should be "resource add"
  "data": {
    "resource_id": "...", // ← should be "id"
    "classification": "physical", // ← should be "physical_virtual"
    // MISSING: auto_discovered_children, children_summary, total_children, capabilities
  }
}

agents resource list --format json returns:

{
  "command": "",          // ← empty
  "data": [               // ← should be {"resources": [...], "summary": {...}}
    {
      "resource_id": "...", // ← should be "id"
      "classification": "physical", // ← should be "physical_virtual"
      // MISSING: children count, projects list
    }
  ]
}

agents resource show --format json returns:

{
  "command": "",          // ← empty
  "data": {
    "resource_id": "...", // ← should be "id"
    "classification": "physical", // ← should be "physical_virtual"
    // MISSING: capabilities, parents, direct_children, linked_projects, tool_bindings
  }
}

Code Location

  • src/cleveragents/cli/commands/resource.py, _resource_dict() function (lines 181-198) — returns wrong field names and missing fields
  • resource_add() function — does not include auto-discovered children or capabilities in output
  • resource_list() function — does not include children count, projects, or summary
  • resource_show() function — does not include capabilities, parents, children, linked_projects, tool_bindings

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

## Bug Report **Feature Area:** Projects and Resources — Resource Registry JSON Output **Severity:** High (programmatic consumers and CI/CD scripts relying on the spec-defined JSON schema will break) ### What Was Tested The `--format json` output of `agents resource add`, `agents resource list`, and `agents resource show` was compared against the spec-defined JSON schema. ### Expected Behavior (from spec) **`agents resource add` JSON output** (spec lines 10858-10897): ```json { "command": "resource add", "status": "ok", "exit_code": 0, "data": { "name": "local/api-repo", "id": "01HXR1A1B2C3D4E5F6G7H8J9K0", "type": "git-checkout", "physical_virtual": "physical", "path": "/home/user/projects/api-service", "branch": "main", "created": "2026-02-09T10:20:00Z", "auto_discovered_children": [...], "children_summary": {...}, "total_children": 395, "capabilities": { "readable": true, "writable": true, "sandboxable": true, "checkpointable": true, "sandbox_strategy": "git_worktree" } } } ``` **`agents resource list` JSON output** (spec lines 11092-11135): ```json { "command": "resource list", "data": { "resources": [ { "name": "local/api-repo", "id": "...", "type": "git-checkout", "physical_virtual": "physical", "children": 395, "projects": ["local/api-service"] } ], "summary": {"total": 3, "physical": 3, "virtual": 0, "total_children": 405} } } ``` **`agents resource show` JSON output** (spec lines 11287-11327): ```json { "command": "resource show", "data": { "name": "local/api-repo", "id": "...", "physical_virtual": "physical", "capabilities": {...}, "parents": ["(top-level)"], "direct_children": [...], "linked_projects": [{"name": "local/api-service", "access": "r/w"}], "tool_bindings": [...] } } ``` ### Actual Behavior **`agents resource add --format json`** returns: ```json { "command": "", // ← empty, should be "resource add" "data": { "resource_id": "...", // ← should be "id" "classification": "physical", // ← should be "physical_virtual" // MISSING: auto_discovered_children, children_summary, total_children, capabilities } } ``` **`agents resource list --format json`** returns: ```json { "command": "", // ← empty "data": [ // ← should be {"resources": [...], "summary": {...}} { "resource_id": "...", // ← should be "id" "classification": "physical", // ← should be "physical_virtual" // MISSING: children count, projects list } ] } ``` **`agents resource show --format json`** returns: ```json { "command": "", // ← empty "data": { "resource_id": "...", // ← should be "id" "classification": "physical", // ← should be "physical_virtual" // MISSING: capabilities, parents, direct_children, linked_projects, tool_bindings } } ``` ### Code Location - `src/cleveragents/cli/commands/resource.py`, `_resource_dict()` function (lines 181-198) — returns wrong field names and missing fields - `resource_add()` function — does not include auto-discovered children or capabilities in output - `resource_list()` function — does not include children count, projects, or summary - `resource_show()` function — does not include capabilities, parents, children, linked_projects, tool_bindings --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.2.0 milestone 2026-04-09 01:01:42 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Medium — Spec compliance bug; deviates from documented behavior
  • Milestone: v3.2.0
  • Story Points: 3 — M
  • MoSCoW: Must Have — Spec compliance is required

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

Issue triaged by project owner: - **State**: Verified - **Priority**: Medium — Spec compliance bug; deviates from documented behavior - **Milestone**: v3.2.0 - **Story Points**: 3 — M - **MoSCoW**: Must Have — Spec compliance is required --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner
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#5078
No description provided.