UAT: agents project unlink-resource JSON/YAML output missing index_cleanup and project_summary sections #6310

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

Summary

The agents project unlink-resource command's non-rich output does not match the spec. The implementation emits a flat dict {project, resource_id, unlinked: true} while the spec requires a structured envelope with data.resource_unlinked, data.index_cleanup, and data.project_summary sub-objects. The rich output also omits the spec-required Index Cleanup and Project Summary panels.

Spec Reference

docs/specification.md lines 2999–3054 (agents project unlink-resource JSON/YAML example).

Expected JSON output:

{
  "command": "agents project unlink-resource local/api-service local/api-repo",
  "status": "ok",
  "exit_code": 0,
  "data": {
    "resource_unlinked": {
      "project": "local/api-service",
      "resource": "local/api-repo",
      "type": "git-checkout"
    },
    "index_cleanup": {
      "text_index": "347 removed",
      "vectors": "892 removed",
      "graph_triples": "cleared",
      "duration_seconds": 0.3
    },
    "project_summary": {
      "linked_resources": 1,
      "last_updated": "2026-02-09T10:30:00Z",
      "active_plans": 0
    }
  },
  "timing": { "duration_ms": 340 },
  "messages": [{ "level": "ok", "text": "Resource unlinked from project" }]
}

Code Location

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

  • unlink_resource() command (lines 723–804) — lines 795–804: non-rich path emits:
    format_output({
        "project": proj.namespaced_name,
        "resource_id": res.resource_id,
        "unlinked": True,
    }, output_format)
    
  • Rich path (lines 789–793): only prints a single success line; missing the Resource Unlinked, Index Cleanup, and Project Summary panels.

Actual Behavior

Non-rich output is a flat dict:

{
  "project": "local/api-service",
  "resource_id": "01HWABCDEF...",
  "unlinked": true
}

Missing:

  • Top-level envelope (command, status, exit_code, timing, messages)
  • data.resource_unlinked with resource name and type
  • data.index_cleanup (text_index, vectors, graph_triples, duration_seconds)
  • data.project_summary (linked_resources count, last_updated, active_plans)

Steps to Reproduce

Inspect project.py lines 789–804 (unlink-resource command, both output paths).

Expected vs Actual

Field Expected Actual
Top-level {command, status, exit_code, data, timing, messages} Flat dict
data.resource_unlinked.type "git-checkout" Absent
data.index_cleanup {text_index, vectors, graph_triples, duration_seconds} Absent
data.project_summary {linked_resources, last_updated, active_plans} Absent
Rich output 3 panels (Resource Unlinked / Index Cleanup / Project Summary) Single success line

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

## Summary The `agents project unlink-resource` command's non-rich output does not match the spec. The implementation emits a flat dict `{project, resource_id, unlinked: true}` while the spec requires a structured envelope with `data.resource_unlinked`, `data.index_cleanup`, and `data.project_summary` sub-objects. The rich output also omits the spec-required `Index Cleanup` and `Project Summary` panels. ## Spec Reference `docs/specification.md` lines 2999–3054 (`agents project unlink-resource` JSON/YAML example). Expected JSON output: ```json { "command": "agents project unlink-resource local/api-service local/api-repo", "status": "ok", "exit_code": 0, "data": { "resource_unlinked": { "project": "local/api-service", "resource": "local/api-repo", "type": "git-checkout" }, "index_cleanup": { "text_index": "347 removed", "vectors": "892 removed", "graph_triples": "cleared", "duration_seconds": 0.3 }, "project_summary": { "linked_resources": 1, "last_updated": "2026-02-09T10:30:00Z", "active_plans": 0 } }, "timing": { "duration_ms": 340 }, "messages": [{ "level": "ok", "text": "Resource unlinked from project" }] } ``` ## Code Location `src/cleveragents/cli/commands/project.py`: - `unlink_resource()` command (lines 723–804) — lines 795–804: non-rich path emits: ```python format_output({ "project": proj.namespaced_name, "resource_id": res.resource_id, "unlinked": True, }, output_format) ``` - Rich path (lines 789–793): only prints a single success line; missing the `Resource Unlinked`, `Index Cleanup`, and `Project Summary` panels. ## Actual Behavior Non-rich output is a flat dict: ```json { "project": "local/api-service", "resource_id": "01HWABCDEF...", "unlinked": true } ``` Missing: - Top-level envelope (`command`, `status`, `exit_code`, `timing`, `messages`) - `data.resource_unlinked` with `resource` name and `type` - `data.index_cleanup` (text_index, vectors, graph_triples, duration_seconds) - `data.project_summary` (linked_resources count, last_updated, active_plans) ## Steps to Reproduce Inspect `project.py` lines 789–804 (unlink-resource command, both output paths). ## Expected vs Actual | Field | Expected | Actual | |-------|----------|--------| | Top-level | `{command, status, exit_code, data, timing, messages}` | Flat dict | | `data.resource_unlinked.type` | `"git-checkout"` | Absent | | `data.index_cleanup` | `{text_index, vectors, graph_triples, duration_seconds}` | Absent | | `data.project_summary` | `{linked_resources, last_updated, active_plans}` | Absent | | Rich output | 3 panels (Resource Unlinked / Index Cleanup / Project Summary) | 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#6310
No description provided.