UAT: resolve_server_mode() only returns disabled/stubbed — missing connected state for active server connections #4897

Open
opened 2026-04-08 20:17:15 +00:00 by HAL9000 · 2 comments
Owner

Bug Report

Feature Area: Server Mode — server mode state machine

What Was Tested

The resolve_server_mode() function and server status command output for correctness of server mode states.

Expected Behavior (from spec)

Per ADR-023 (Server Mode), the spec describes three distinct server states:

  1. Local-only / disabled — No server.url configured; all operations local
  2. Connectedserver.url and server.token are set and the client has successfully authenticated with the server; server namespaces are available
  3. Disconnected/errorserver.url is set but connection failed or token is invalid

The server status output should reflect the actual connection state, not just whether a URL is configured.

Actual Behavior (from code)

File: src/cleveragents/cli/commands/server.py

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"
    except (ValueError, KeyError):
        pass
    return "disabled"

The function only returns two states:

  • "disabled" — no URL configured
  • "stubbed" — URL configured but "not yet implemented"

The "stubbed" state is an implementation artifact, not a user-facing concept. Users see server_mode: stubbed in server status output, which is confusing — it exposes internal implementation details rather than meaningful connection state.

When server mode is fully implemented, the function needs to return "connected" (authenticated, server reachable) or "disconnected" (URL set but not reachable/authenticated). The current two-state model cannot represent this.

Steps to Reproduce

$ agents server connect https://agents.example.com
$ agents server status
# Shows: Server Mode: stubbed
# Expected: Server Mode: connected (or at minimum: configured)

Code Location

  • src/cleveragents/cli/commands/server.pyresolve_server_mode() function

Impact

The server status output exposes internal implementation state (stubbed) to users. When server mode is implemented, the state machine will need to be redesigned to support connected/disconnected/error states. The current design makes this harder by conflating "URL is configured" with "connection is active."


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

## Bug Report **Feature Area:** Server Mode — server mode state machine ### What Was Tested The `resolve_server_mode()` function and `server status` command output for correctness of server mode states. ### Expected Behavior (from spec) Per ADR-023 (Server Mode), the spec describes three distinct server states: 1. **Local-only / disabled** — No `server.url` configured; all operations local 2. **Connected** — `server.url` and `server.token` are set and the client has successfully authenticated with the server; server namespaces are available 3. **Disconnected/error** — `server.url` is set but connection failed or token is invalid The `server status` output should reflect the actual connection state, not just whether a URL is configured. ### Actual Behavior (from code) **File:** `src/cleveragents/cli/commands/server.py` ```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" except (ValueError, KeyError): pass return "disabled" ``` The function only returns two states: - `"disabled"` — no URL configured - `"stubbed"` — URL configured but "not yet implemented" The `"stubbed"` state is an implementation artifact, not a user-facing concept. Users see `server_mode: stubbed` in `server status` output, which is confusing — it exposes internal implementation details rather than meaningful connection state. When server mode is fully implemented, the function needs to return `"connected"` (authenticated, server reachable) or `"disconnected"` (URL set but not reachable/authenticated). The current two-state model cannot represent this. ### Steps to Reproduce ```bash $ agents server connect https://agents.example.com $ agents server status # Shows: Server Mode: stubbed # Expected: Server Mode: connected (or at minimum: configured) ``` ### Code Location - `src/cleveragents/cli/commands/server.py` — `resolve_server_mode()` function ### Impact The `server status` output exposes internal implementation state (`stubbed`) to users. When server mode is implemented, the state machine will need to be redesigned to support `connected`/`disconnected`/`error` states. The current design makes this harder by conflating "URL is configured" with "connection is active." --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Medium — Missing connected state means server status reporting is incomplete
  • Milestone: v3.5.0 (Autonomy Hardening — server mode)
  • Story Points: 2 — S — Adding a connected state to the server mode state machine is a small task
  • MoSCoW: Should Have — Accurate server mode state reporting is important for UX but not blocking core functionality
  • Parent Epic: #4947 (Server Implementation Legendary)

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

Issue triaged by project owner: - **State**: Verified - **Priority**: Medium — Missing `connected` state means server status reporting is incomplete - **Milestone**: v3.5.0 (Autonomy Hardening — server mode) - **Story Points**: 2 — S — Adding a `connected` state to the server mode state machine is a small task - **MoSCoW**: Should Have — Accurate server mode state reporting is important for UX but not blocking core functionality - **Parent Epic**: #4947 (Server Implementation Legendary) --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner
freemo added this to the v3.5.0 milestone 2026-04-08 23:40:28 +00:00
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Medium — resolve_server_mode() only returns disabled/stubbed, missing connected mode
  • Milestone: v3.5.0 — Server mode resolution is M6 scope
  • Story Points: 5 — L — Implementing full server mode resolution logic
  • MoSCoW: Should Have — Server mode resolution is needed for server features but not blocking local workflow
  • Parent Epic: #360 (Autonomy Hardening + Stubs M6)

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

Issue triaged by project owner: - **State**: Verified - **Priority**: Medium — `resolve_server_mode()` only returns disabled/stubbed, missing `connected` mode - **Milestone**: v3.5.0 — Server mode resolution is M6 scope - **Story Points**: 5 — L — Implementing full server mode resolution logic - **MoSCoW**: Should Have — Server mode resolution is needed for server features but not blocking local workflow - **Parent Epic**: #360 (Autonomy Hardening + Stubs M6) --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
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#4897
No description provided.