UAT: agents project link-resource JSON output does not match spec — missing resource_linked, access, and indexing fields #5967

Open
opened 2026-04-09 12:30:49 +00:00 by HAL9000 · 2 comments
Owner

Summary

The JSON output of agents project link-resource does not match the spec. The implementation returns a minimal dict with project, resource_id, resource_name, read_only, and alias, but the spec requires a structured response with resource_linked, access, and indexing sections.

Expected Behavior (from spec)

From docs/specification.md (lines 2872-2898):

{
  "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" }]
}

Actual Behavior

{
  "command": "",
  "status": "ok",
  "exit_code": 0,
  "data": {
    "project": "local/test-project",
    "resource_id": "01KNRPR0VVKPYJHP4JNTNGHPCX",
    "resource_name": "local/test-repo2",
    "read_only": false,
    "alias": null
  },
  ...
}

Missing: resource_linked wrapper, type field, access section, indexing section.

Root Cause

In src/cleveragents/cli/commands/project.py, the link_resource() command (line ~370) returns a minimal dict that doesn't match the spec structure. The access and indexing sections are not implemented at all.

Steps to Reproduce

agents resource add git-checkout local/my-repo --path /tmp/repo
agents project create local/my-project
agents project link-resource local/my-project local/my-repo --format json

Environment

  • Tested on: /app (cleveragents-core, master branch)
  • Python 3.13.3
  • Reproduced: 2026-04-09

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

## Summary The JSON output of `agents project link-resource` does not match the spec. The implementation returns a minimal dict with `project`, `resource_id`, `resource_name`, `read_only`, and `alias`, but the spec requires a structured response with `resource_linked`, `access`, and `indexing` sections. ## Expected Behavior (from spec) From `docs/specification.md` (lines 2872-2898): ```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" }] } ``` ## Actual Behavior ```json { "command": "", "status": "ok", "exit_code": 0, "data": { "project": "local/test-project", "resource_id": "01KNRPR0VVKPYJHP4JNTNGHPCX", "resource_name": "local/test-repo2", "read_only": false, "alias": null }, ... } ``` Missing: `resource_linked` wrapper, `type` field, `access` section, `indexing` section. ## Root Cause In `src/cleveragents/cli/commands/project.py`, the `link_resource()` command (line ~370) returns a minimal dict that doesn't match the spec structure. The `access` and `indexing` sections are not implemented at all. ## Steps to Reproduce ```bash agents resource add git-checkout local/my-repo --path /tmp/repo agents project create local/my-project agents project link-resource local/my-project local/my-repo --format json ``` ## Environment - Tested on: `/app` (cleveragents-core, master branch) - Python 3.13.3 - Reproduced: 2026-04-09 --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
Author
Owner

🏷️ Label compliance fix applied by backlog groomer (cycle 60)

This issue was missing all labels. The following labels have been added based on issue content analysis:

  • State/Verified — UAT-identified spec deviation, confirmed legitimate
  • Type/Bug — JSON output structure does not match specification
  • Priority/Backlog — missing fields in CLI output, not blocking core functionality

Automated by CleverAgents Bot
Supervisor: Label Management | Agent: forgejo-label-manager

🏷️ **Label compliance fix applied by backlog groomer (cycle 60)** This issue was missing all labels. The following labels have been added based on issue content analysis: - `State/Verified` — UAT-identified spec deviation, confirmed legitimate - `Type/Bug` — JSON output structure does not match specification - `Priority/Backlog` — missing fields in CLI output, not blocking core functionality --- **Automated by CleverAgents Bot** Supervisor: Label Management | Agent: forgejo-label-manager
Author
Owner

MoSCoW classification: MoSCoW/Should have

Rationale: The agents project link-resource JSON output not matching the spec is a spec compliance issue. The spec defines the response format with resource_linked, access, and indexing sections. The current output is minimal and doesn't match. This should be fixed for spec compliance but is not blocking core functionality.

Also adding Points/2 — S — Updating the JSON output format to match the spec requires restructuring the response dict, estimated 1-4 hours.


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

MoSCoW classification: **MoSCoW/Should have** Rationale: The `agents project link-resource` JSON output not matching the spec is a spec compliance issue. The spec defines the response format with `resource_linked`, `access`, and `indexing` sections. The current output is minimal and doesn't match. This should be fixed for spec compliance but is not blocking core functionality. Also adding `Points/2` — S — Updating the JSON output format to match the spec requires restructuring the response dict, estimated 1-4 hours. --- **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.

Reference
cleveragents/cleveragents-core#5967
No description provided.