UAT: Namespace-scoped entity synchronization not implemented — _cleveragents/namespace/* methods are stubs and sync methods ignore namespace parameter #2161

Open
opened 2026-04-03 04:34:00 +00:00 by freemo · 2 comments
Owner

Metadata

  • Branch: fix/a2a-namespace-sync-implementation
  • Commit Message: fix(a2a): implement namespace-scoped entity synchronization and namespace/* handlers
  • Milestone: v3.7.0
  • Parent Epic: #933

Background

Code-level UAT analysis of namespace-scoped entity synchronization in src/cleveragents/a2a/facade.py revealed that all _cleveragents/namespace/* handlers are stubs and all _cleveragents/sync/* handlers ignore the namespace parameter entirely. The specification requires namespace-based entity synchronization as a core feature of multi-team server mode.

The specification states:

Entity synchronization is namespace-based. When a client connects, it subscribes to one or more namespaces. The server will only push updates for entities within the subscribed namespaces. This allows for fine-grained control over which entities are synchronized to which clients.

Actual Behavior

  1. All _cleveragents/namespace/* methods are stubs returning {"status": "not_implemented", "stub": True}:

    # src/cleveragents/a2a/facade.py lines 611-615
    def _handle_namespace_stub(self, params: dict[str, Any]) -> dict[str, Any]:
        return {"status": "not_implemented", "stub": True}
    
  2. Sync methods ignore the namespace parameter_handle_sync_stub does not read params.get("namespace") at all.

  3. No namespace subscription mechanism existsA2aEventQueue in events.py has no concept of namespace-scoped subscriptions; all subscribers receive all events regardless of namespace.

  4. server.namespace config key is registered (default "default") but is never used by any sync or namespace handler.

Code Locations

  • src/cleveragents/a2a/facade.py lines 282–284: Namespace methods mapped to _handle_namespace_stub
  • src/cleveragents/a2a/facade.py lines 611–615: _handle_namespace_stub implementation
  • src/cleveragents/a2a/facade.py lines 604–607: _handle_sync_stub ignores namespace param
  • src/cleveragents/a2a/events.py lines 45–130: A2aEventQueue has no namespace filtering

Subtasks

  • Write failing Behave scenarios reproducing all three failure modes (TDD — tests first)
  • Implement _cleveragents/namespace/list — return all available namespaces from server config/registry
  • Implement _cleveragents/namespace/show — return namespace details (members, entity counts, metadata)
  • Implement _cleveragents/namespace/members — return users/clients subscribed to a given namespace
  • Refactor A2aEventQueue in events.py to support namespace-scoped subscriptions (clients only receive events for their subscribed namespaces)
  • Update _cleveragents/sync/full, sync/pull, sync/push handlers to read and apply the namespace parameter
  • Wire server.namespace config key into all namespace and sync handlers
  • Add Robot Framework integration tests for namespace-scoped SSE event delivery
  • Run nox (all default sessions) and fix any errors
  • Verify coverage >= 97% via nox -s coverage_report

Definition of Done

  • _cleveragents/namespace/list returns all available namespaces (not a stub)
  • _cleveragents/namespace/show returns namespace details including entity counts and member list
  • _cleveragents/namespace/members returns the subscribed members for a given namespace
  • _cleveragents/sync/full, sync/pull, sync/push all scope their results to the provided namespace parameter
  • SSE event delivery is namespace-scoped — clients only receive events for their subscribed namespaces
  • server.namespace config key is consumed by all relevant handlers
  • All new behaviour is covered by Behave unit tests (BDD scenarios in features/)
  • Integration tests in robot/ verify namespace isolation end-to-end with real services
  • All nox stages pass
  • Coverage >= 97%

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

## Metadata - **Branch**: `fix/a2a-namespace-sync-implementation` - **Commit Message**: `fix(a2a): implement namespace-scoped entity synchronization and namespace/* handlers` - **Milestone**: v3.7.0 - **Parent Epic**: #933 ## Background Code-level UAT analysis of namespace-scoped entity synchronization in `src/cleveragents/a2a/facade.py` revealed that all `_cleveragents/namespace/*` handlers are stubs and all `_cleveragents/sync/*` handlers ignore the `namespace` parameter entirely. The specification requires namespace-based entity synchronization as a core feature of multi-team server mode. The specification states: > Entity synchronization is namespace-based. When a client connects, it subscribes to one or more namespaces. The server will only push updates for entities within the subscribed namespaces. This allows for fine-grained control over which entities are synchronized to which clients. ## Actual Behavior 1. **All `_cleveragents/namespace/*` methods are stubs** returning `{"status": "not_implemented", "stub": True}`: ```python # src/cleveragents/a2a/facade.py lines 611-615 def _handle_namespace_stub(self, params: dict[str, Any]) -> dict[str, Any]: return {"status": "not_implemented", "stub": True} ``` 2. **Sync methods ignore the `namespace` parameter** — `_handle_sync_stub` does not read `params.get("namespace")` at all. 3. **No namespace subscription mechanism exists** — `A2aEventQueue` in `events.py` has no concept of namespace-scoped subscriptions; all subscribers receive all events regardless of namespace. 4. **`server.namespace` config key** is registered (default `"default"`) but is never used by any sync or namespace handler. ## Code Locations - `src/cleveragents/a2a/facade.py` lines 282–284: Namespace methods mapped to `_handle_namespace_stub` - `src/cleveragents/a2a/facade.py` lines 611–615: `_handle_namespace_stub` implementation - `src/cleveragents/a2a/facade.py` lines 604–607: `_handle_sync_stub` ignores namespace param - `src/cleveragents/a2a/events.py` lines 45–130: `A2aEventQueue` has no namespace filtering ## Subtasks - [ ] Write failing Behave scenarios reproducing all three failure modes (TDD — tests first) - [ ] Implement `_cleveragents/namespace/list` — return all available namespaces from server config/registry - [ ] Implement `_cleveragents/namespace/show` — return namespace details (members, entity counts, metadata) - [ ] Implement `_cleveragents/namespace/members` — return users/clients subscribed to a given namespace - [ ] Refactor `A2aEventQueue` in `events.py` to support namespace-scoped subscriptions (clients only receive events for their subscribed namespaces) - [ ] Update `_cleveragents/sync/full`, `sync/pull`, `sync/push` handlers to read and apply the `namespace` parameter - [ ] Wire `server.namespace` config key into all namespace and sync handlers - [ ] Add Robot Framework integration tests for namespace-scoped SSE event delivery - [ ] Run `nox` (all default sessions) and fix any errors - [ ] Verify coverage >= 97% via `nox -s coverage_report` ## Definition of Done - [ ] `_cleveragents/namespace/list` returns all available namespaces (not a stub) - [ ] `_cleveragents/namespace/show` returns namespace details including entity counts and member list - [ ] `_cleveragents/namespace/members` returns the subscribed members for a given namespace - [ ] `_cleveragents/sync/full`, `sync/pull`, `sync/push` all scope their results to the provided `namespace` parameter - [ ] SSE event delivery is namespace-scoped — clients only receive events for their subscribed namespaces - [ ] `server.namespace` config key is consumed by all relevant handlers - [ ] All new behaviour is covered by Behave unit tests (BDD scenarios in `features/`) - [ ] Integration tests in `robot/` verify namespace isolation end-to-end with real services - [ ] 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:34:04 +00:00
freemo self-assigned this 2026-04-03 16:57:59 +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
Author
Owner

Starting implementation on branch fix/a2a-namespace-sync-implementation.

Wave plan:

  • Wave 1 (parallel): Write failing Behave scenarios (TDD) + Refactor A2aEventQueue for namespace-scoped subscriptions
  • Wave 2 (parallel): Implement namespace/list, namespace/show, namespace/members handlers + Update sync handlers + Wire server.namespace config
  • Wave 3 (sequential): Add Robot Framework integration tests → Run nox → Verify coverage

Automated by CleverAgents Bot
Supervisor: Implementation | Agent: ca-issue-worker

Starting implementation on branch `fix/a2a-namespace-sync-implementation`. **Wave plan:** - Wave 1 (parallel): Write failing Behave scenarios (TDD) + Refactor A2aEventQueue for namespace-scoped subscriptions - Wave 2 (parallel): Implement namespace/list, namespace/show, namespace/members handlers + Update sync handlers + Wire server.namespace config - Wave 3 (sequential): Add Robot Framework integration tests → Run nox → Verify coverage --- **Automated by CleverAgents Bot** Supervisor: Implementation | Agent: ca-issue-worker
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#2161
No description provided.