UAT: agents project link-resource JSON/YAML output missing access and indexing sections #6308

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

Summary

The agents project link-resource command's non-rich output does not match the spec. The implementation emits a flat dict with project, resource_id, resource_name, read_only, and alias, while the spec requires a structured envelope with data.resource_linked, data.access, and data.indexing sub-objects, plus standard command, status, exit_code, timing, and messages top-level keys.

Spec Reference

docs/specification.md lines 2870–2927 (agents project link-resource JSON/YAML example).

Expected JSON output:

{
  "command": "agents project link-resource local/api-service local/api-repo",
  "status": "ok",
  "exit_code": 0,
  "data": {
    "resource_linked": {
      "project": "local/api-service",
      "resource": "local/api-repo",
      "type": "git-checkout",
      "read_only": false
    },
    "access": {
      "read": "allowed",
      "write": "allowed",
      "apply": "requires approval"
    },
    "indexing": {
      "status": "indexing",
      "files_found": 347,
      "language": "Python (primary)",
      "estimated_time_seconds": 20
    }
  },
  "timing": { "duration_ms": 92 },
  "messages": [{ "level": "ok", "text": "Resource linked to project" }]
}

Code Location

src/cleveragents/cli/commands/project.py:

  • link_resource() command (lines 648–720) — lines 709–719: non-rich path emits:
    format_output({
        "project": proj.namespaced_name,
        "resource_id": res.resource_id,
        "resource_name": res.name or resource_name,
        "read_only": read_only,
        "alias": alias,
    }, output_format)
    

Actual Behavior

Non-rich output is a flat dict:

{
  "project": "local/api-service",
  "resource_id": "01HWABCDEF...",
  "resource_name": "api-repo",
  "read_only": false,
  "alias": null
}

Missing:

  • Top-level envelope (command, status, exit_code, timing, messages)
  • data.resource_linked with resource name (not raw ULID) and type
  • data.access object (read, write, apply permissions)
  • data.indexing object (status, files_found, language, estimated_time_seconds)

Also: the rich output (lines 702–707) only prints a single success line; the spec requires three Rich panels: Resource Linked, Access, and Indexing (spec lines 2821–2841).

Steps to Reproduce

Inspect project.py lines 702–720 (link-resource command, non-rich path).

Expected vs Actual

Field Expected Actual
Top-level {command, status, exit_code, data, timing, messages} Flat dict
data.resource_linked.resource "local/api-repo" (name) resource_id ULID
data.resource_linked.type "git-checkout" Absent
data.access {read, write, apply} Absent
data.indexing {status, files_found, language, estimated_time_seconds} Absent
Rich output 3 panels (Resource Linked / Access / Indexing) Single success line

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

## Summary The `agents project link-resource` command's non-rich output does not match the spec. The implementation emits a flat dict with `project`, `resource_id`, `resource_name`, `read_only`, and `alias`, while the spec requires a structured envelope with `data.resource_linked`, `data.access`, and `data.indexing` sub-objects, plus standard `command`, `status`, `exit_code`, `timing`, and `messages` top-level keys. ## Spec Reference `docs/specification.md` lines 2870–2927 (`agents project link-resource` JSON/YAML example). Expected JSON output: ```json { "command": "agents project link-resource local/api-service local/api-repo", "status": "ok", "exit_code": 0, "data": { "resource_linked": { "project": "local/api-service", "resource": "local/api-repo", "type": "git-checkout", "read_only": false }, "access": { "read": "allowed", "write": "allowed", "apply": "requires approval" }, "indexing": { "status": "indexing", "files_found": 347, "language": "Python (primary)", "estimated_time_seconds": 20 } }, "timing": { "duration_ms": 92 }, "messages": [{ "level": "ok", "text": "Resource linked to project" }] } ``` ## Code Location `src/cleveragents/cli/commands/project.py`: - `link_resource()` command (lines 648–720) — lines 709–719: non-rich path emits: ```python format_output({ "project": proj.namespaced_name, "resource_id": res.resource_id, "resource_name": res.name or resource_name, "read_only": read_only, "alias": alias, }, output_format) ``` ## Actual Behavior Non-rich output is a flat dict: ```json { "project": "local/api-service", "resource_id": "01HWABCDEF...", "resource_name": "api-repo", "read_only": false, "alias": null } ``` Missing: - Top-level envelope (`command`, `status`, `exit_code`, `timing`, `messages`) - `data.resource_linked` with `resource` name (not raw ULID) and `type` - `data.access` object (`read`, `write`, `apply` permissions) - `data.indexing` object (status, files_found, language, estimated_time_seconds) Also: the rich output (lines 702–707) only prints a single success line; the spec requires three Rich panels: `Resource Linked`, `Access`, and `Indexing` (spec lines 2821–2841). ## Steps to Reproduce Inspect `project.py` lines 702–720 (link-resource command, non-rich path). ## Expected vs Actual | Field | Expected | Actual | |-------|----------|--------| | Top-level | `{command, status, exit_code, data, timing, messages}` | Flat dict | | `data.resource_linked.resource` | `"local/api-repo"` (name) | `resource_id` ULID | | `data.resource_linked.type` | `"git-checkout"` | Absent | | `data.access` | `{read, write, apply}` | Absent | | `data.indexing` | `{status, files_found, language, estimated_time_seconds}` | Absent | | Rich output | 3 panels (Resource Linked / Access / Indexing) | Single success line | --- **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#6308
No description provided.