UAT: _cleveragents/namespace/list, _cleveragents/namespace/show, and _cleveragents/namespace/members A2A extension methods are unimplemented stubs — namespace management operations always return not_implemented #2155

Open
opened 2026-04-03 04:29:44 +00:00 by freemo · 1 comment
Owner

Background and Context

During UAT code-level analysis of src/cleveragents/a2a/facade.py, three A2A extension methods for namespace management were found to be registered in A2aLocalFacade but routed to a stub handler that unconditionally returns {"status": "not_implemented", "stub": True}. Per docs/specification.md §Server and Client Architecture (A2A Extension Methods table), these methods must delegate to a NamespaceService class — which does not exist anywhere in the codebase.

The namespace system is a foundational part of the CleverAgents architecture. The spec defines a [[server:]namespace/]name format for all entities (Actions, Skills, Actors), with non-local/ namespaces resolved by the server. Without functional namespace management A2A methods, any client (CLI, TUI, IDE plugin, or third-party) operating in server mode cannot list available namespaces, inspect namespace details, or enumerate namespace members.

Current Behavior

All three namespace extension methods are registered but route to a stub:

# In A2aLocalFacade.__init__() — src/cleveragents/a2a/facade.py lines 282-284
"_cleveragents/namespace/list": self._handle_namespace_stub,
"_cleveragents/namespace/show": self._handle_namespace_stub,
"_cleveragents/namespace/members": self._handle_namespace_stub,

# The stub — line 614
def _handle_namespace_stub(self, params: dict[str, Any]) -> dict[str, Any]:
    return {"status": "not_implemented", "stub": True}

grep -r "class NamespaceService" src/ returns no results — the service class does not exist.

Steps to Reproduce:

from cleveragents.a2a.facade import A2aLocalFacade

facade = A2aLocalFacade(...)
result = facade.dispatch("_cleveragents/namespace/list", {})
print(result)  # {"status": "not_implemented", "stub": True}

result2 = facade.dispatch("_cleveragents/namespace/show", {"namespace": "local"})
print(result2)  # {"status": "not_implemented", "stub": True}

Expected Behavior

Per docs/specification.md §Server and Client Architecture (A2A Extension Methods table):

Method Service
_cleveragents/namespace/list NamespaceService.list()
_cleveragents/namespace/show NamespaceService.show()
_cleveragents/namespace/members NamespaceService.members()

Each method must delegate to the corresponding NamespaceService method and return a well-formed JSON-RPC 2.0 result. The NamespaceService class must be created in src/cleveragents/application/services/ and wired into A2aLocalFacade.

Acceptance Criteria

  • NamespaceService class exists in src/cleveragents/application/services/ with list(), show(), and members() methods, all fully statically typed
  • _cleveragents/namespace/list dispatches to NamespaceService.list() and returns a valid JSON-RPC 2.0 result
  • _cleveragents/namespace/show dispatches to NamespaceService.show() and returns namespace details per spec
  • _cleveragents/namespace/members dispatches to NamespaceService.members() and returns a list of namespace members per spec
  • The stub handler _handle_namespace_stub is removed from A2aLocalFacade
  • All public/protected methods validate arguments (fail-fast)
  • Behave unit test scenarios cover all three methods (happy path + error cases)
  • All nox stages pass (nox -e lint, nox -e typecheck, nox -e unit_tests, nox -e coverage_report)
  • Coverage >= 97%

Supporting Information

  • Affected file: src/cleveragents/a2a/facade.py — lines 282–284 (routing), line 614 (stub)
  • Missing file: src/cleveragents/application/services/namespace_service.py (does not exist)
  • Severity: High — namespace management operations are completely non-functional in server mode
  • Related issues: #2148 (sync stubs), #2146 (registry CRUD stubs), #2140 (missing message/send and message/stream)
  • Parent Epic: #933 (Epic: A2A Protocol Compliance)

Metadata

  • Branch: bugfix/a2a-namespace-service-implementation
  • Commit Message: fix(a2a): implement NamespaceService and wire namespace list/show/members extension methods
  • Milestone: v3.7.0
  • Parent Epic: #933

Subtasks

  • Create NamespaceService class in src/cleveragents/application/services/namespace_service.py with list(), show(), and members() methods (fully typed)
  • Wire NamespaceService into A2aLocalFacade.__init__() and replace stub routing for all three namespace methods
  • Remove _handle_namespace_stub from A2aLocalFacade (or guard it so it is no longer reachable from namespace routes)
  • Write Behave feature file features/a2a/namespace_extension_methods.feature covering list, show, and members happy paths and error cases
  • Write Behave step definitions in features/steps/ for the new scenarios
  • Run nox -e lint and fix any issues
  • Run nox -e typecheck and fix any Pyright errors
  • Run nox -e unit_tests and confirm all scenarios pass
  • Run nox -e coverage_report and confirm coverage >= 97%
  • Run full nox suite and confirm all default sessions pass

Definition of Done

  • All subtasks above are checked off
  • NamespaceService is fully implemented with list(), show(), and members() per spec
  • All three _cleveragents/namespace/* A2A extension methods return valid, non-stub responses
  • The stub handler is removed
  • Commit fix(a2a): implement NamespaceService and wire namespace list/show/members extension methods is made on branch bugfix/a2a-namespace-service-implementation with footer ISSUES CLOSED: #<this issue>
  • A PR is opened, reviewed (≥2 approvals), and merged
  • All nox stages pass
  • Coverage >= 97%

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: ca-new-issue-creator

## Background and Context During UAT code-level analysis of `src/cleveragents/a2a/facade.py`, three A2A extension methods for namespace management were found to be registered in `A2aLocalFacade` but routed to a stub handler that unconditionally returns `{"status": "not_implemented", "stub": True}`. Per `docs/specification.md` §Server and Client Architecture (A2A Extension Methods table), these methods must delegate to a `NamespaceService` class — which does not exist anywhere in the codebase. The namespace system is a foundational part of the CleverAgents architecture. The spec defines a `[[server:]namespace/]name` format for all entities (Actions, Skills, Actors), with non-`local/` namespaces resolved by the server. Without functional namespace management A2A methods, any client (CLI, TUI, IDE plugin, or third-party) operating in server mode cannot list available namespaces, inspect namespace details, or enumerate namespace members. ## Current Behavior All three namespace extension methods are registered but route to a stub: ```python # In A2aLocalFacade.__init__() — src/cleveragents/a2a/facade.py lines 282-284 "_cleveragents/namespace/list": self._handle_namespace_stub, "_cleveragents/namespace/show": self._handle_namespace_stub, "_cleveragents/namespace/members": self._handle_namespace_stub, # The stub — line 614 def _handle_namespace_stub(self, params: dict[str, Any]) -> dict[str, Any]: return {"status": "not_implemented", "stub": True} ``` `grep -r "class NamespaceService" src/` returns no results — the service class does not exist. **Steps to Reproduce:** ```python from cleveragents.a2a.facade import A2aLocalFacade facade = A2aLocalFacade(...) result = facade.dispatch("_cleveragents/namespace/list", {}) print(result) # {"status": "not_implemented", "stub": True} result2 = facade.dispatch("_cleveragents/namespace/show", {"namespace": "local"}) print(result2) # {"status": "not_implemented", "stub": True} ``` ## Expected Behavior Per `docs/specification.md` §Server and Client Architecture (A2A Extension Methods table): | Method | Service | |---|---| | `_cleveragents/namespace/list` | `NamespaceService.list()` | | `_cleveragents/namespace/show` | `NamespaceService.show()` | | `_cleveragents/namespace/members` | `NamespaceService.members()` | Each method must delegate to the corresponding `NamespaceService` method and return a well-formed JSON-RPC 2.0 result. The `NamespaceService` class must be created in `src/cleveragents/application/services/` and wired into `A2aLocalFacade`. ## Acceptance Criteria - [ ] `NamespaceService` class exists in `src/cleveragents/application/services/` with `list()`, `show()`, and `members()` methods, all fully statically typed - [ ] `_cleveragents/namespace/list` dispatches to `NamespaceService.list()` and returns a valid JSON-RPC 2.0 result - [ ] `_cleveragents/namespace/show` dispatches to `NamespaceService.show()` and returns namespace details per spec - [ ] `_cleveragents/namespace/members` dispatches to `NamespaceService.members()` and returns a list of namespace members per spec - [ ] The stub handler `_handle_namespace_stub` is removed from `A2aLocalFacade` - [ ] All public/protected methods validate arguments (fail-fast) - [ ] Behave unit test scenarios cover all three methods (happy path + error cases) - [ ] All nox stages pass (`nox -e lint`, `nox -e typecheck`, `nox -e unit_tests`, `nox -e coverage_report`) - [ ] Coverage >= 97% ## Supporting Information - **Affected file**: `src/cleveragents/a2a/facade.py` — lines 282–284 (routing), line 614 (stub) - **Missing file**: `src/cleveragents/application/services/namespace_service.py` (does not exist) - **Severity**: High — namespace management operations are completely non-functional in server mode - **Related issues**: #2148 (sync stubs), #2146 (registry CRUD stubs), #2140 (missing message/send and message/stream) - **Parent Epic**: #933 (Epic: A2A Protocol Compliance) ## Metadata - **Branch**: `bugfix/a2a-namespace-service-implementation` - **Commit Message**: `fix(a2a): implement NamespaceService and wire namespace list/show/members extension methods` - **Milestone**: v3.7.0 - **Parent Epic**: #933 ## Subtasks - [ ] Create `NamespaceService` class in `src/cleveragents/application/services/namespace_service.py` with `list()`, `show()`, and `members()` methods (fully typed) - [ ] Wire `NamespaceService` into `A2aLocalFacade.__init__()` and replace stub routing for all three namespace methods - [ ] Remove `_handle_namespace_stub` from `A2aLocalFacade` (or guard it so it is no longer reachable from namespace routes) - [ ] Write Behave feature file `features/a2a/namespace_extension_methods.feature` covering `list`, `show`, and `members` happy paths and error cases - [ ] Write Behave step definitions in `features/steps/` for the new scenarios - [ ] Run `nox -e lint` and fix any issues - [ ] Run `nox -e typecheck` and fix any Pyright errors - [ ] Run `nox -e unit_tests` and confirm all scenarios pass - [ ] Run `nox -e coverage_report` and confirm coverage >= 97% - [ ] Run full `nox` suite and confirm all default sessions pass ## Definition of Done - [ ] All subtasks above are checked off - [ ] `NamespaceService` is fully implemented with `list()`, `show()`, and `members()` per spec - [ ] All three `_cleveragents/namespace/*` A2A extension methods return valid, non-stub responses - [ ] The stub handler is removed - [ ] Commit `fix(a2a): implement NamespaceService and wire namespace list/show/members extension methods` is made on branch `bugfix/a2a-namespace-service-implementation` with footer `ISSUES CLOSED: #<this issue>` - [ ] A PR is opened, reviewed (≥2 approvals), and merged - [ ] All nox stages pass - [ ] Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
freemo added this to the v3.7.0 milestone 2026-04-03 04:29:49 +00:00
freemo self-assigned this 2026-04-03 16:58:00 +00:00
Author
Owner

MoSCoW classification: Must Have

Rationale: This issue addresses a core spec requirement or blocks critical functionality. The project cannot ship without this fix.


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

MoSCoW classification: **Must Have** Rationale: This issue addresses a core spec requirement or blocks critical functionality. The project cannot ship without this fix. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
freemo removed this from the v3.7.0 milestone 2026-04-07 01:19:31 +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.

Reference
cleveragents/cleveragents-core#2155
No description provided.