UAT: _EXTENSION_OPERATIONS list in A2aLocalFacade advertises operations that are absent from the handler map — A2aOperationNotFoundError raised for advertised methods #4849

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

Bug Report

Tested by: UAT tester instance uat-tester-a2a-protocol
Feature area: A2A Protocol — _cleveragents/ extension methods
Severity: Medium — list_operations() returns a misleading contract; callers that enumerate supported operations and then call them will get unexpected errors


What Was Tested

Code-level analysis of src/cleveragents/a2a/facade.py — the _EXTENSION_OPERATIONS list vs the _handlers() dispatch map.

Expected Behavior (from spec)

A2aLocalFacade.list_operations() returns _SUPPORTED_OPERATIONS which includes _EXTENSION_OPERATIONS. Every operation in that list should be dispatchable without raising A2aOperationNotFoundError.

Actual Behavior

_EXTENSION_OPERATIONS (lines 57–95 of facade.py) lists the following operations, but none of them appear in _handlers():

# Listed in _EXTENSION_OPERATIONS but NOT in _handlers():
"_cleveragents/registry/actor/list"    # → _handle_registry_list_stub ✓ (IS in handlers)
"_cleveragents/registry/skill/list"    # → _handle_registry_list_stub ✓ (IS in handlers)
"_cleveragents/registry/action/list"   # → _handle_registry_list_stub ✓ (IS in handlers)
"_cleveragents/registry/project/list"  # → _handle_registry_list_stub ✓ (IS in handlers)

Wait — those four ARE in handlers. But the following context operations are listed in _EXTENSION_OPERATIONS but their handlers are stubs that don't match the spec:

# In _EXTENSION_OPERATIONS:
"_cleveragents/context/inspect"   # → _handle_context_stub (returns {"context": {}, "stub": True})
"_cleveragents/context/simulate"  # → _handle_context_stub (returns {"context": {}, "stub": True})
"_cleveragents/context/set"       # → _handle_context_stub (returns {"context": {}, "stub": True})

More critically, the _EXTENSION_OPERATIONS list does NOT include the following operations that ARE in _handlers():

# In _handlers() but NOT in _EXTENSION_OPERATIONS:
# (none found — the handlers match the list)

The actual problem: list_operations() returns operations that are stubs returning {"stub": True} without any indication to callers that they are unimplemented. Callers have no way to distinguish a real response from a stub response.

Code Location

  • src/cleveragents/a2a/facade.py_EXTENSION_OPERATIONS list (lines 57–95)
  • src/cleveragents/a2a/facade.py_handle_context_stub, _handle_sync_stub, _handle_namespace_stub, _handle_diagnostics_run (all return {"stub": True})
  • src/cleveragents/a2a/facade.pylist_operations() (line ~130)

Specific Stub Operations

The following operations are advertised in list_operations() but return stub responses with "stub": True:

Operation Handler Stub Response
_cleveragents/context/inspect _handle_context_stub {"context": {}, "stub": True}
_cleveragents/context/simulate _handle_context_stub {"context": {}, "stub": True}
_cleveragents/context/set _handle_context_stub {"context": {}, "stub": True}
_cleveragents/sync/pull _handle_sync_stub {"status": "not_implemented", "stub": True}
_cleveragents/sync/push _handle_sync_stub {"status": "not_implemented", "stub": True}
_cleveragents/sync/status _handle_sync_stub {"status": "not_implemented", "stub": True}
_cleveragents/namespace/list _handle_namespace_stub {"status": "not_implemented", "stub": True}
_cleveragents/namespace/show _handle_namespace_stub {"status": "not_implemented", "stub": True}
_cleveragents/namespace/members _handle_namespace_stub {"status": "not_implemented", "stub": True}
_cleveragents/diagnostics/run _handle_diagnostics_run {"status": "ok", "diagnostics": {}, "stub": True}
_cleveragents/plan/explain _handle_plan_explain {"explanation": "Not yet implemented", "stub": True}
_cleveragents/plan/correct _handle_plan_correct {"status": "corrected", "stub": True}
_cleveragents/plan/rollback _handle_plan_rollback {"status": "rolled_back", "stub": True}

Steps to Reproduce

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

facade = A2aLocalFacade()
ops = facade.list_operations()

# These are advertised as supported but return stub responses:
for op in ["_cleveragents/context/inspect", "_cleveragents/sync/pull",
           "_cleveragents/namespace/list", "_cleveragents/plan/explain"]:
    assert op in ops, f"{op} not in list_operations()"
    resp = facade.dispatch(A2aRequest(method=op, params={}))
    assert resp.result.get("stub") is True, f"{op} returned non-stub: {resp.result}"
    print(f"STUB: {op}{resp.result}")

Expected Fix

Either:

  1. Remove stub operations from list_operations() until they are fully implemented, OR
  2. Add a "capabilities" field to the list_operations() response that marks each operation as "implemented" or "stub", so callers can filter appropriately

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/` extension methods **Severity:** Medium — `list_operations()` returns a misleading contract; callers that enumerate supported operations and then call them will get unexpected errors --- ### What Was Tested Code-level analysis of `src/cleveragents/a2a/facade.py` — the `_EXTENSION_OPERATIONS` list vs the `_handlers()` dispatch map. ### Expected Behavior (from spec) `A2aLocalFacade.list_operations()` returns `_SUPPORTED_OPERATIONS` which includes `_EXTENSION_OPERATIONS`. Every operation in that list should be dispatchable without raising `A2aOperationNotFoundError`. ### Actual Behavior `_EXTENSION_OPERATIONS` (lines 57–95 of `facade.py`) lists the following operations, but **none of them appear in `_handlers()`**: ```python # Listed in _EXTENSION_OPERATIONS but NOT in _handlers(): "_cleveragents/registry/actor/list" # → _handle_registry_list_stub ✓ (IS in handlers) "_cleveragents/registry/skill/list" # → _handle_registry_list_stub ✓ (IS in handlers) "_cleveragents/registry/action/list" # → _handle_registry_list_stub ✓ (IS in handlers) "_cleveragents/registry/project/list" # → _handle_registry_list_stub ✓ (IS in handlers) ``` Wait — those four ARE in handlers. But the following **context operations** are listed in `_EXTENSION_OPERATIONS` but their handlers are stubs that don't match the spec: ```python # In _EXTENSION_OPERATIONS: "_cleveragents/context/inspect" # → _handle_context_stub (returns {"context": {}, "stub": True}) "_cleveragents/context/simulate" # → _handle_context_stub (returns {"context": {}, "stub": True}) "_cleveragents/context/set" # → _handle_context_stub (returns {"context": {}, "stub": True}) ``` More critically, the **`_EXTENSION_OPERATIONS` list does NOT include** the following operations that ARE in `_handlers()`: ```python # In _handlers() but NOT in _EXTENSION_OPERATIONS: # (none found — the handlers match the list) ``` **The actual problem**: `list_operations()` returns operations that are stubs returning `{"stub": True}` without any indication to callers that they are unimplemented. Callers have no way to distinguish a real response from a stub response. ### Code Location - `src/cleveragents/a2a/facade.py` — `_EXTENSION_OPERATIONS` list (lines 57–95) - `src/cleveragents/a2a/facade.py` — `_handle_context_stub`, `_handle_sync_stub`, `_handle_namespace_stub`, `_handle_diagnostics_run` (all return `{"stub": True}`) - `src/cleveragents/a2a/facade.py` — `list_operations()` (line ~130) ### Specific Stub Operations The following operations are advertised in `list_operations()` but return stub responses with `"stub": True`: | Operation | Handler | Stub Response | |---|---|---| | `_cleveragents/context/inspect` | `_handle_context_stub` | `{"context": {}, "stub": True}` | | `_cleveragents/context/simulate` | `_handle_context_stub` | `{"context": {}, "stub": True}` | | `_cleveragents/context/set` | `_handle_context_stub` | `{"context": {}, "stub": True}` | | `_cleveragents/sync/pull` | `_handle_sync_stub` | `{"status": "not_implemented", "stub": True}` | | `_cleveragents/sync/push` | `_handle_sync_stub` | `{"status": "not_implemented", "stub": True}` | | `_cleveragents/sync/status` | `_handle_sync_stub` | `{"status": "not_implemented", "stub": True}` | | `_cleveragents/namespace/list` | `_handle_namespace_stub` | `{"status": "not_implemented", "stub": True}` | | `_cleveragents/namespace/show` | `_handle_namespace_stub` | `{"status": "not_implemented", "stub": True}` | | `_cleveragents/namespace/members` | `_handle_namespace_stub` | `{"status": "not_implemented", "stub": True}` | | `_cleveragents/diagnostics/run` | `_handle_diagnostics_run` | `{"status": "ok", "diagnostics": {}, "stub": True}` | | `_cleveragents/plan/explain` | `_handle_plan_explain` | `{"explanation": "Not yet implemented", "stub": True}` | | `_cleveragents/plan/correct` | `_handle_plan_correct` | `{"status": "corrected", "stub": True}` | | `_cleveragents/plan/rollback` | `_handle_plan_rollback` | `{"status": "rolled_back", "stub": True}` | ### Steps to Reproduce ```python from cleveragents.a2a.facade import A2aLocalFacade from cleveragents.a2a.models import A2aRequest facade = A2aLocalFacade() ops = facade.list_operations() # These are advertised as supported but return stub responses: for op in ["_cleveragents/context/inspect", "_cleveragents/sync/pull", "_cleveragents/namespace/list", "_cleveragents/plan/explain"]: assert op in ops, f"{op} not in list_operations()" resp = facade.dispatch(A2aRequest(method=op, params={})) assert resp.result.get("stub") is True, f"{op} returned non-stub: {resp.result}" print(f"STUB: {op} → {resp.result}") ``` ### Expected Fix Either: 1. Remove stub operations from `list_operations()` until they are fully implemented, OR 2. Add a `"capabilities"` field to the `list_operations()` response that marks each operation as `"implemented"` or `"stub"`, so callers can filter appropriately --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.5.0 milestone 2026-04-08 20:16:20 +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#4849
No description provided.