UAT: _cleveragents/health/check A2A handler returns empty services: {} — no actual service health checks performed #4864

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

Bug Report

Tested by: UAT tester instance uat-tester-a2a-protocol
Feature area: A2A Protocol — _cleveragents/health/check diagnostics
Severity: Medium — health check endpoint is non-functional; always reports healthy regardless of actual service state


What Was Tested

Code-level analysis of src/cleveragents/a2a/facade.py — the _handle_health_check handler.

Expected Behavior (from spec)

_cleveragents/health/check should return the health status of all wired services, including:

  • session_service availability
  • plan_lifecycle_service availability
  • tool_registry availability
  • resource_registry_service availability
  • event_queue availability

Actual Behavior

The _handle_health_check handler always returns a hardcoded healthy response with an empty services dict:

def _handle_health_check(self, params: dict[str, Any]) -> dict[str, Any]:
    return {"status": "healthy", "services": {}}

This means:

  1. The health check always reports "status": "healthy" even when no services are wired
  2. The services dict is always empty — no per-service health information is returned
  3. Callers cannot use this endpoint to determine which services are actually available

Code Location

  • src/cleveragents/a2a/facade.py_handle_health_check method (near end of file)

Steps to Reproduce

from cleveragents.a2a.facade import A2aLocalFacade
from cleveragents.a2a.models import A2aRequest

# No services wired — should report degraded/partial health
facade = A2aLocalFacade()
resp = facade.dispatch(A2aRequest(method="_cleveragents/health/check", params={}))
print(resp.result)
# Output: {"status": "healthy", "services": {}}
# Expected: {"status": "degraded", "services": {"session_service": "unavailable", ...}}

Expected Fix

The handler should introspect self._services and report the availability of each registered service:

def _handle_health_check(self, params: dict[str, Any]) -> dict[str, Any]:
    service_status = {
        "session_service": "ok" if self._session_service is not None else "unavailable",
        "plan_lifecycle_service": "ok" if self._plan_lifecycle_service is not None else "unavailable",
        "tool_registry": "ok" if self._tool_registry is not None else "unavailable",
        "resource_registry_service": "ok" if self._resource_registry_service is not None else "unavailable",
        "event_queue": "ok" if self._event_queue is not None else "unavailable",
    }
    all_ok = all(v == "ok" for v in service_status.values())
    return {
        "status": "healthy" if all_ok else "degraded",
        "services": service_status,
    }

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

## Bug Report **Tested by:** UAT tester instance `uat-tester-a2a-protocol` **Feature area:** A2A Protocol — `_cleveragents/health/check` diagnostics **Severity:** Medium — health check endpoint is non-functional; always reports healthy regardless of actual service state --- ### What Was Tested Code-level analysis of `src/cleveragents/a2a/facade.py` — the `_handle_health_check` handler. ### Expected Behavior (from spec) `_cleveragents/health/check` should return the health status of all wired services, including: - `session_service` availability - `plan_lifecycle_service` availability - `tool_registry` availability - `resource_registry_service` availability - `event_queue` availability ### Actual Behavior The `_handle_health_check` handler always returns a hardcoded healthy response with an empty `services` dict: ```python def _handle_health_check(self, params: dict[str, Any]) -> dict[str, Any]: return {"status": "healthy", "services": {}} ``` This means: 1. The health check always reports `"status": "healthy"` even when no services are wired 2. The `services` dict is always empty — no per-service health information is returned 3. Callers cannot use this endpoint to determine which services are actually available ### Code Location - `src/cleveragents/a2a/facade.py` — `_handle_health_check` method (near end of file) ### Steps to Reproduce ```python from cleveragents.a2a.facade import A2aLocalFacade from cleveragents.a2a.models import A2aRequest # No services wired — should report degraded/partial health facade = A2aLocalFacade() resp = facade.dispatch(A2aRequest(method="_cleveragents/health/check", params={})) print(resp.result) # Output: {"status": "healthy", "services": {}} # Expected: {"status": "degraded", "services": {"session_service": "unavailable", ...}} ``` ### Expected Fix The handler should introspect `self._services` and report the availability of each registered service: ```python def _handle_health_check(self, params: dict[str, Any]) -> dict[str, Any]: service_status = { "session_service": "ok" if self._session_service is not None else "unavailable", "plan_lifecycle_service": "ok" if self._plan_lifecycle_service is not None else "unavailable", "tool_registry": "ok" if self._tool_registry is not None else "unavailable", "resource_registry_service": "ok" if self._resource_registry_service is not None else "unavailable", "event_queue": "ok" if self._event_queue is not None else "unavailable", } all_ok = all(v == "ok" for v in service_status.values()) return { "status": "healthy" if all_ok else "degraded", "services": service_status, } ``` --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.5.0 milestone 2026-04-08 20:16:27 +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#4864
No description provided.