UAT: agents server status reports server_mode: "stubbed" — internal implementation detail exposed as user-facing status #2572

Open
opened 2026-04-03 18:57:06 +00:00 by freemo · 1 comment
Owner

Bug Report

What Was Tested

The agents server status CLI command (src/cleveragents/cli/commands/server.py) was analyzed against the specification's server status requirements.

Expected Behavior (from spec)

The specification (§Configuration Reference, §Server and Client Architecture) defines two server modes:

  • Client-only (no server.url set): Local-only mode, no server connection
  • Server mode (server.url set): Connected to a CleverAgents server

The agents server status command should report the current server connection state in user-meaningful terms. The spec's agents info output example (§786) shows:

{
  "server_mode": "disabled",
  ...
}

The value "disabled" is appropriate when no server is configured. When a server URL is configured, the status should reflect the actual connection state (e.g., "connected", "configured", or "disconnected").

Actual Behavior

The resolve_server_mode() function returns:

def resolve_server_mode() -> str:
    svc = _get_config_service()
    try:
        resolved = svc.resolve("server.url")
        if resolved.value is not None and str(resolved.value).strip():
            return "stubbed"  # ← Internal implementation detail!
    except (ValueError, KeyError):
        pass
    return "disabled"

When a server URL is configured, agents server status outputs:

Server Mode: stubbed
Server URL: https://agents.example.com

The value "stubbed" is an internal implementation detail (indicating the server client is not yet implemented) that is exposed directly to users. Users see "stubbed" and have no way to understand what this means or what action to take.

Code Location

  • src/cleveragents/cli/commands/server.pyresolve_server_mode() function (lines 77–91)
  • src/cleveragents/cli/commands/server.pyserver_status() function (lines 177–238)

Steps to Reproduce

  1. Run agents config set server.url https://agents.example.com
  2. Run agents server status
  3. Observe: Server Mode: stubbed — a confusing internal term exposed to users

Impact

Medium. Users who configure a server URL see "stubbed" as the server mode, which:

  • Is meaningless to end users
  • Provides no actionable information
  • Leaks internal implementation details into the user-facing API
  • Makes it impossible to distinguish between "configured but not connected" and "connected"

Suggested Fix

Replace "stubbed" with a user-meaningful status:

def resolve_server_mode() -> str:
    svc = _get_config_service()
    try:
        resolved = svc.resolve("server.url")
        if resolved.value is not None and str(resolved.value).strip():
            return "configured"  # or "disconnected" — meaningful to users
    except (ValueError, KeyError):
        pass
    return "disabled"

The docstring should also be updated to reflect the new return values.


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

## Bug Report ### What Was Tested The `agents server status` CLI command (`src/cleveragents/cli/commands/server.py`) was analyzed against the specification's server status requirements. ### Expected Behavior (from spec) The specification (§Configuration Reference, §Server and Client Architecture) defines two server modes: - **Client-only** (no `server.url` set): Local-only mode, no server connection - **Server mode** (`server.url` set): Connected to a CleverAgents server The `agents server status` command should report the current server connection state in user-meaningful terms. The spec's `agents info` output example (§786) shows: ```json { "server_mode": "disabled", ... } ``` The value `"disabled"` is appropriate when no server is configured. When a server URL is configured, the status should reflect the actual connection state (e.g., `"connected"`, `"configured"`, or `"disconnected"`). ### Actual Behavior The `resolve_server_mode()` function returns: ```python def resolve_server_mode() -> str: svc = _get_config_service() try: resolved = svc.resolve("server.url") if resolved.value is not None and str(resolved.value).strip(): return "stubbed" # ← Internal implementation detail! except (ValueError, KeyError): pass return "disabled" ``` When a server URL is configured, `agents server status` outputs: ``` Server Mode: stubbed Server URL: https://agents.example.com ``` The value `"stubbed"` is an internal implementation detail (indicating the server client is not yet implemented) that is exposed directly to users. Users see `"stubbed"` and have no way to understand what this means or what action to take. ### Code Location - `src/cleveragents/cli/commands/server.py` — `resolve_server_mode()` function (lines 77–91) - `src/cleveragents/cli/commands/server.py` — `server_status()` function (lines 177–238) ### Steps to Reproduce 1. Run `agents config set server.url https://agents.example.com` 2. Run `agents server status` 3. Observe: `Server Mode: stubbed` — a confusing internal term exposed to users ### Impact **Medium.** Users who configure a server URL see `"stubbed"` as the server mode, which: - Is meaningless to end users - Provides no actionable information - Leaks internal implementation details into the user-facing API - Makes it impossible to distinguish between "configured but not connected" and "connected" ### Suggested Fix Replace `"stubbed"` with a user-meaningful status: ```python def resolve_server_mode() -> str: svc = _get_config_service() try: resolved = svc.resolve("server.url") if resolved.value is not None and str(resolved.value).strip(): return "configured" # or "disconnected" — meaningful to users except (ValueError, KeyError): pass return "disabled" ``` The docstring should also be updated to reflect the new return values. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-uat-tester
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • MoSCoW: Should Have

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

Issue triaged by project owner: - **State**: Verified - **MoSCoW**: Should Have --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
freemo added this to the v3.8.0 milestone 2026-04-05 04:53:38 +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#2572
No description provided.