UAT: agents project show --format json data schema missing validations, context, indexing_status, and active_plans fields #6783

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

What Was Tested

agents project show <PROJECT> --format json — the JSON data object schema.

Expected Behavior (from spec §agents project show)

The spec defines the following JSON output structure for agents project show local/api-service:

{
  "command": "agents project show local/api-service",
  "status": "ok",
  "exit_code": 0,
  "data": {
    "project": {
      "name": "local/api-service",
      "description": "Backend API",
      "resources": 2,
      "remote": false,
      "created": "2026-02-08T12:46:00Z"
    },
    "linked_resources": [
      { "name": "local/api-repo", "type": "git-checkout", "sandbox": "git_worktree", "read_only": false },
      { "name": "local/staging-db", "type": "local/database", "sandbox": "transaction_rollback", "read_only": true }
    ],
    "validations": [...],
    "context": {
      "include": ["repo"],
      "exclude": ["**/node_modules/**"],
      "max_file_size_bytes": 1048576
    },
    "indexing_status": {
      "text_index": "ready",
      "vector_index": "ready",
      "graph_store": "disabled",
      "indexed_files": 347,
      "last_indexed": "12:48"
    },
    "active_plans": [
      { "plan_id": "01HXM7A9", "action": "local/code-coverage", "phase": "execute" }
    ]
  },
  "timing": { "duration_ms": 62 },
  "messages": [{ "level": "ok", "text": "Project loaded" }]
}

Key requirements:

  1. data is a structured object with a project sub-object, linked_resources, validations, context, indexing_status, and active_plans keys
  2. linked_resources entries must include name (namespaced name), type, sandbox, and read_only fields
  3. The project sub-object includes resources (count), remote (boolean), and created (ISO timestamp)

Actual Behavior

The code in src/cleveragents/cli/commands/project.py uses _project_spec_dict() which returns a flat dict:

return {
    "namespaced_name": project.namespaced_name,
    "namespace": project.namespace,
    "name": project.name,
    "description": project.description,
    "linked_resources": linked,  # contains resource_id, read_only, alias, linked_at — NOT name/type/sandbox
    "created_at": ...,
    "updated_at": ...,
}

This completely diverges from the spec:

  • No nested project sub-object
  • No validations field
  • No context field
  • No indexing_status field
  • No active_plans field
  • linked_resources entries contain resource_id instead of name, missing type and sandbox
  • Uses namespaced_name instead of spec-required project.name

Steps to Reproduce

  1. Clone the repository and initialize
  2. Create a project: agents project create local/test-proj
  3. Run: agents project show local/test-proj --format json
  4. Observe that the output JSON data field has a flat schema, not the structured schema defined in the spec

Impact

All consumers relying on --format json output (scripts, integrations, A2A clients) receive incorrect and incomplete project data.

Affected File

src/cleveragents/cli/commands/project.py_project_spec_dict() function and show() command


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

## What Was Tested `agents project show <PROJECT> --format json` — the JSON `data` object schema. ## Expected Behavior (from spec §agents project show) The spec defines the following JSON output structure for `agents project show local/api-service`: ```json { "command": "agents project show local/api-service", "status": "ok", "exit_code": 0, "data": { "project": { "name": "local/api-service", "description": "Backend API", "resources": 2, "remote": false, "created": "2026-02-08T12:46:00Z" }, "linked_resources": [ { "name": "local/api-repo", "type": "git-checkout", "sandbox": "git_worktree", "read_only": false }, { "name": "local/staging-db", "type": "local/database", "sandbox": "transaction_rollback", "read_only": true } ], "validations": [...], "context": { "include": ["repo"], "exclude": ["**/node_modules/**"], "max_file_size_bytes": 1048576 }, "indexing_status": { "text_index": "ready", "vector_index": "ready", "graph_store": "disabled", "indexed_files": 347, "last_indexed": "12:48" }, "active_plans": [ { "plan_id": "01HXM7A9", "action": "local/code-coverage", "phase": "execute" } ] }, "timing": { "duration_ms": 62 }, "messages": [{ "level": "ok", "text": "Project loaded" }] } ``` Key requirements: 1. `data` is a structured object with a `project` sub-object, `linked_resources`, `validations`, `context`, `indexing_status`, and `active_plans` keys 2. `linked_resources` entries must include `name` (namespaced name), `type`, `sandbox`, and `read_only` fields 3. The `project` sub-object includes `resources` (count), `remote` (boolean), and `created` (ISO timestamp) ## Actual Behavior The code in `src/cleveragents/cli/commands/project.py` uses `_project_spec_dict()` which returns a flat dict: ```python return { "namespaced_name": project.namespaced_name, "namespace": project.namespace, "name": project.name, "description": project.description, "linked_resources": linked, # contains resource_id, read_only, alias, linked_at — NOT name/type/sandbox "created_at": ..., "updated_at": ..., } ``` This completely diverges from the spec: - No nested `project` sub-object - No `validations` field - No `context` field - No `indexing_status` field - No `active_plans` field - `linked_resources` entries contain `resource_id` instead of `name`, missing `type` and `sandbox` - Uses `namespaced_name` instead of spec-required `project.name` ## Steps to Reproduce 1. Clone the repository and initialize 2. Create a project: `agents project create local/test-proj` 3. Run: `agents project show local/test-proj --format json` 4. Observe that the output JSON `data` field has a flat schema, not the structured schema defined in the spec ## Impact All consumers relying on `--format json` output (scripts, integrations, A2A clients) receive incorrect and incomplete project data. ## Affected File `src/cleveragents/cli/commands/project.py` — `_project_spec_dict()` function and `show()` command --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.4.0 milestone 2026-04-10 02:05:59 +00:00
HAL9000 self-assigned this 2026-04-10 06:07:15 +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#6783
No description provided.