UAT: [FA-20] agents version JSON output has flat structure instead of spec-required nested cli/build/dependencies objects, and wrong dependency keys #7812

Open
opened 2026-04-12 04:18:38 +00:00 by HAL9000 · 4 comments
Owner

What Was Tested

Code analysis of src/cleveragents/cli/commands/system.py — the build_version_data() function and version command JSON output.

Expected Behavior (from spec)

Per docs/specification.md §agents version, the JSON output data object should be nested:

{
  "data": {
    "cli": {
      "name": "CleverAgents CLI",
      "version": "1.0.0",
      "channel": "stable",
      "python": "3.13"
    },
    "build": {
      "build_date": "2026-02-08",
      "commit": "a17c3f9",
      "schema": "v3",
      "platform": "linux-x86_64"
    },
    "dependencies": {
      "langgraph": "0.2.60",
      "langchain": "0.3.18",
      "mcp_sdk": "1.4.0",
      "pydantic": "2.10.4"
    }
  }
}

Actual Behavior

The build_version_data() function at system.py lines 85-101 returns a flat dict:

return {
    "version": __version__,
    "channel": "stable",
    "python": platform.python_version(),
    "build_date": datetime.now(tz=UTC).strftime("%Y-%m-%d"),
    "commit": _git_sha(),
    "schema": "v3",
    "platform": f"{sys.platform}-{platform.machine()}",
    "dependencies": {
        "langgraph": _dep_version("langgraph"),
        "langchain-core": _dep_version("langchain-core"),  # WRONG: spec says "langchain"
        "pydantic": _dep_version("pydantic"),
        "typer": _dep_version("typer"),  # WRONG: spec says "mcp_sdk"
    },
}

Specific Divergences

  1. Wrong JSON structure: flat dict instead of nested cli, build, dependencies sub-objects
  2. Wrong dependency key: langchain-core → should be langchain
  3. Wrong dependency key: typer → should be mcp_sdk
  4. Missing name field: spec requires "name": "CleverAgents CLI" in the cli sub-object

Steps to Reproduce

agents --format json version

Expected JSON data to have nested cli, build, and dependencies sub-objects.
Actual JSON data is a flat object with all fields at the top level.

Code Location

src/cleveragents/cli/commands/system.py lines 85-101 (build_version_data function)


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

## What Was Tested Code analysis of `src/cleveragents/cli/commands/system.py` — the `build_version_data()` function and `version` command JSON output. ## Expected Behavior (from spec) Per `docs/specification.md` §agents version, the JSON output `data` object should be nested: ```json { "data": { "cli": { "name": "CleverAgents CLI", "version": "1.0.0", "channel": "stable", "python": "3.13" }, "build": { "build_date": "2026-02-08", "commit": "a17c3f9", "schema": "v3", "platform": "linux-x86_64" }, "dependencies": { "langgraph": "0.2.60", "langchain": "0.3.18", "mcp_sdk": "1.4.0", "pydantic": "2.10.4" } } } ``` ## Actual Behavior The `build_version_data()` function at `system.py` lines 85-101 returns a **flat** dict: ```python return { "version": __version__, "channel": "stable", "python": platform.python_version(), "build_date": datetime.now(tz=UTC).strftime("%Y-%m-%d"), "commit": _git_sha(), "schema": "v3", "platform": f"{sys.platform}-{platform.machine()}", "dependencies": { "langgraph": _dep_version("langgraph"), "langchain-core": _dep_version("langchain-core"), # WRONG: spec says "langchain" "pydantic": _dep_version("pydantic"), "typer": _dep_version("typer"), # WRONG: spec says "mcp_sdk" }, } ``` ## Specific Divergences 1. **Wrong JSON structure**: flat dict instead of nested `cli`, `build`, `dependencies` sub-objects 2. **Wrong dependency key**: `langchain-core` → should be `langchain` 3. **Wrong dependency key**: `typer` → should be `mcp_sdk` 4. **Missing `name` field**: spec requires `"name": "CleverAgents CLI"` in the `cli` sub-object ## Steps to Reproduce ```bash agents --format json version ``` Expected JSON `data` to have nested `cli`, `build`, and `dependencies` sub-objects. Actual JSON `data` is a flat object with all fields at the top level. ## Code Location `src/cleveragents/cli/commands/system.py` lines 85-101 (`build_version_data` function) --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.2.0 milestone 2026-04-12 04:20:14 +00:00
Author
Owner

Label compliance fix applied:

  • Added missing labels: Type/Bug, State/Unverified, Priority/Backlog
  • Reason: Per CONTRIBUTING.md, all issues require State/, Type/, and Priority/* labels

Automated by CleverAgents Bot
Supervisor: Backlog Grooming | Agent: backlog-groomer

Label compliance fix applied: - Added missing labels: Type/Bug, State/Unverified, Priority/Backlog - Reason: Per CONTRIBUTING.md, all issues require State/*, Type/*, and Priority/* labels --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: backlog-groomer
Author
Owner

Verified — UAT bug: agents version JSON output has wrong structure. Spec violation. MoSCoW: Must-have. Priority: High.


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

✅ **Verified** — UAT bug: agents version JSON output has wrong structure. Spec violation. MoSCoW: Must-have. Priority: High. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner-pool-supervisor
Author
Owner

Verified — UAT bug: agents version JSON output has wrong structure. Spec violation. MoSCoW: Must-have. Priority: High.


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

✅ **Verified** — UAT bug: agents version JSON output has wrong structure. Spec violation. MoSCoW: Must-have. Priority: High. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner-pool-supervisor
Author
Owner

Verified — UAT bug: agents version JSON output has wrong structure. Spec violation. MoSCoW: Must-have. Priority: High.


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

✅ **Verified** — UAT bug: agents version JSON output has wrong structure. Spec violation. MoSCoW: Must-have. Priority: High. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner-pool-supervisor
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#7812
No description provided.