UAT: agents resource add --format json missing auto_discovered_children, children_summary, total_children, and capabilities fields #6796

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

What Was Tested

agents resource add <TYPE> <NAME> --format json — the JSON data object schema returned after resource registration.

Expected Behavior (from spec §agents resource add)

The spec defines the following JSON output for agents resource add git-checkout local/api-repo --path /home/user/projects/api-service --branch main:

{
  "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": [
      { "id": "01HXR1A1B2C3…", "type": "git", "status": "created" },
      { "id": "01HXR1A1B2C4…", "type": "git-remote", "status": "created" }
    ],
    "children_summary": {
      "git_commit": 47,
      "git_tree_entry": 312,
      "fs_directory": 3,
      "fs_file": 28
    },
    "total_children": 395,
    "capabilities": {
      "readable": true,
      "writable": true,
      "sandboxable": true,
      "checkpointable": true,
      "sandbox_strategy": "git_worktree"
    }
  },
  "timing": { "started": "2026-02-09T10:20:00Z", "duration_ms": 250 },
  "messages": ["Resource registered (395 child resources discovered)"]
}

Actual Behavior

The resource_add() command in src/cleveragents/cli/commands/resource.py calls _resource_dict(resource) for JSON output, which returns:

{
  "resource_id": "...",
  "name": "local/api-repo",
  "type": "git-checkout",
  "classification": "ResourceKind.physical",
  "description": null,
  "location": "/home/user/projects/api-service",
  "properties": {"path": "...", "branch": "main"},
  "lifecycle_state": null,
  "created_at": "...",
  "updated_at": "..."
}

The following spec-required fields are entirely absent:

  • auto_discovered_children — list of auto-discovered child resources with ID, type, and status
  • children_summary — aggregated counts per resource type
  • total_children — total count of auto-discovered resources
  • capabilities — readable, writable, sandboxable, checkpointable, sandbox_strategy

Additionally:

  • The field is named resource_id instead of id
  • The field is named location instead of path
  • physical_virtual is not present (uses classification instead with a Python enum repr)
  • created_at instead of created

Steps to Reproduce

agents resource add git-checkout local/test-repo --path /tmp --format json

Observe that auto_discovered_children, children_summary, total_children, and capabilities are absent.

Affected File

src/cleveragents/cli/commands/resource.pyresource_add() command and _resource_dict() helper function


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

## What Was Tested `agents resource add <TYPE> <NAME> --format json` — the JSON `data` object schema returned after resource registration. ## Expected Behavior (from spec §agents resource add) The spec defines the following JSON output for `agents resource add git-checkout local/api-repo --path /home/user/projects/api-service --branch main`: ```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": [ { "id": "01HXR1A1B2C3…", "type": "git", "status": "created" }, { "id": "01HXR1A1B2C4…", "type": "git-remote", "status": "created" } ], "children_summary": { "git_commit": 47, "git_tree_entry": 312, "fs_directory": 3, "fs_file": 28 }, "total_children": 395, "capabilities": { "readable": true, "writable": true, "sandboxable": true, "checkpointable": true, "sandbox_strategy": "git_worktree" } }, "timing": { "started": "2026-02-09T10:20:00Z", "duration_ms": 250 }, "messages": ["Resource registered (395 child resources discovered)"] } ``` ## Actual Behavior The `resource_add()` command in `src/cleveragents/cli/commands/resource.py` calls `_resource_dict(resource)` for JSON output, which returns: ```json { "resource_id": "...", "name": "local/api-repo", "type": "git-checkout", "classification": "ResourceKind.physical", "description": null, "location": "/home/user/projects/api-service", "properties": {"path": "...", "branch": "main"}, "lifecycle_state": null, "created_at": "...", "updated_at": "..." } ``` The following spec-required fields are entirely absent: - `auto_discovered_children` — list of auto-discovered child resources with ID, type, and status - `children_summary` — aggregated counts per resource type - `total_children` — total count of auto-discovered resources - `capabilities` — readable, writable, sandboxable, checkpointable, sandbox_strategy Additionally: - The field is named `resource_id` instead of `id` - The field is named `location` instead of `path` - `physical_virtual` is not present (uses `classification` instead with a Python enum repr) - `created_at` instead of `created` ## Steps to Reproduce ```bash agents resource add git-checkout local/test-repo --path /tmp --format json ``` Observe that `auto_discovered_children`, `children_summary`, `total_children`, and `capabilities` are absent. ## Affected File `src/cleveragents/cli/commands/resource.py` — `resource_add()` command and `_resource_dict()` helper function --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.4.0 milestone 2026-04-10 02:07:05 +00:00
HAL9000 self-assigned this 2026-04-10 06:06:50 +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#6796
No description provided.