UAT: Non-local/ namespace without server prefix does not resolve to default configured server — spec-required behavior not implemented #2955

Open
opened 2026-04-05 02:56:19 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: fix/default-server-namespace-resolution
  • Commit Message: fix(namespace): resolve non-local namespaces to default configured server when server prefix is omitted
  • Milestone: v3.7.0
  • Parent Epic: #399

Description

The spec (line 174 of docs/specification.md) states: "Non-local/ namespaces with server omitted assume the default configured server." This means when a user references freemo/my-action (without a server: prefix), the system should automatically use the default configured server (set via agents server connect). However, no code in the codebase implements this resolution behavior.

Code Analysis

  • src/cleveragents/domain/models/core/project.py: ParsedName.is_remote correctly identifies non-local namespaces (returns True when namespace != "local" or server is not None), but there is no code that resolves the default server for non-local namespaced entities
  • src/cleveragents/cli/commands/server.py: resolve_server_mode() returns "disabled" or "stubbed" based on whether server.url is configured, but this is never used to inject the default server into namespace resolution
  • src/cleveragents/domain/models/core/plan.py: NamespacedName.parse() correctly parses server:namespace/name format, but when server is None and namespace != "local", no default server is applied
  • src/cleveragents/config/settings.py: No default_server field exists in Settings

Expected Behavior

When a user references a non-local/ namespaced entity without a server prefix (e.g., freemo/my-action), the system should:

  1. Detect that the namespace is non-local and no server is specified
  2. Look up the default configured server (from agents server connect configuration)
  3. Resolve the entity against that server

Actual Behavior

Non-local/ namespaced entities without a server prefix are treated as if they are local (stored in the local database), with no server resolution attempted. The ParsedName.is_remote property correctly identifies them as remote, but this flag is never used to trigger server resolution.

Steps to Reproduce

from cleveragents.domain.models.core.project import parse_namespaced_name
parsed = parse_namespaced_name("freemo/my-action")
print(parsed.server)      # None — no server resolved
print(parsed.is_remote)   # True — correctly identified as remote
# But no default server is applied despite is_remote being True

Impact

Users who configure a default server and use non-local namespaces (e.g., freemo/my-action) will find their entities stored locally instead of being resolved against the server. This breaks the multi-server workflow described in the spec.

Subtasks

  • Add default_server field to Settings (or use existing server.url config key) for the default server URL
  • Implement resolve_default_server() utility that reads the configured default server
  • Update NamespacedName.parse() or add a service-layer resolver that applies the default server when namespace is non-local and server is None
  • Add Behave scenarios covering default server resolution for non-local namespaces
  • Run nox -e typecheck to confirm no type regressions
  • Run nox (all default sessions), fix any errors

Definition of Done

  • When server.url is configured and a non-local namespace is used without server prefix, the default server is applied
  • parse_namespaced_name("freemo/my-action") with a configured default server returns ParsedName(server="<default>", namespace="freemo", name="my-action")
  • parse_namespaced_name("local/my-action") is unaffected (still local)
  • Behave scenarios added covering default server resolution
  • All nox stages pass
  • Coverage >= 97%

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

## Metadata - **Branch**: `fix/default-server-namespace-resolution` - **Commit Message**: `fix(namespace): resolve non-local namespaces to default configured server when server prefix is omitted` - **Milestone**: v3.7.0 - **Parent Epic**: #399 ## Description The spec (line 174 of `docs/specification.md`) states: "Non-`local/` namespaces with server omitted assume the default configured server." This means when a user references `freemo/my-action` (without a `server:` prefix), the system should automatically use the default configured server (set via `agents server connect`). However, no code in the codebase implements this resolution behavior. ### Code Analysis - `src/cleveragents/domain/models/core/project.py`: `ParsedName.is_remote` correctly identifies non-local namespaces (returns `True` when `namespace != "local"` or `server is not None`), but there is no code that resolves the default server for non-local namespaced entities - `src/cleveragents/cli/commands/server.py`: `resolve_server_mode()` returns `"disabled"` or `"stubbed"` based on whether `server.url` is configured, but this is never used to inject the default server into namespace resolution - `src/cleveragents/domain/models/core/plan.py`: `NamespacedName.parse()` correctly parses `server:namespace/name` format, but when `server` is `None` and `namespace != "local"`, no default server is applied - `src/cleveragents/config/settings.py`: No `default_server` field exists in `Settings` ### Expected Behavior When a user references a non-`local/` namespaced entity without a server prefix (e.g., `freemo/my-action`), the system should: 1. Detect that the namespace is non-local and no server is specified 2. Look up the default configured server (from `agents server connect` configuration) 3. Resolve the entity against that server ### Actual Behavior Non-`local/` namespaced entities without a server prefix are treated as if they are local (stored in the local database), with no server resolution attempted. The `ParsedName.is_remote` property correctly identifies them as remote, but this flag is never used to trigger server resolution. ### Steps to Reproduce ```python from cleveragents.domain.models.core.project import parse_namespaced_name parsed = parse_namespaced_name("freemo/my-action") print(parsed.server) # None — no server resolved print(parsed.is_remote) # True — correctly identified as remote # But no default server is applied despite is_remote being True ``` ### Impact Users who configure a default server and use non-local namespaces (e.g., `freemo/my-action`) will find their entities stored locally instead of being resolved against the server. This breaks the multi-server workflow described in the spec. ## Subtasks - [ ] Add `default_server` field to `Settings` (or use existing `server.url` config key) for the default server URL - [ ] Implement `resolve_default_server()` utility that reads the configured default server - [ ] Update `NamespacedName.parse()` or add a service-layer resolver that applies the default server when namespace is non-local and server is `None` - [ ] Add Behave scenarios covering default server resolution for non-local namespaces - [ ] Run `nox -e typecheck` to confirm no type regressions - [ ] Run `nox` (all default sessions), fix any errors ## Definition of Done - [ ] When `server.url` is configured and a non-local namespace is used without server prefix, the default server is applied - [ ] `parse_namespaced_name("freemo/my-action")` with a configured default server returns `ParsedName(server="<default>", namespace="freemo", name="my-action")` - [ ] `parse_namespaced_name("local/my-action")` is unaffected (still local) - [ ] Behave scenarios added covering default server resolution - [ ] 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-05 02:56:25 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Confirmed
  • MoSCoW: Should Have

Valid finding verified during batch triage.


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

Issue triaged by project owner: - **State**: Verified - **Priority**: Confirmed - **MoSCoW**: Should Have Valid finding verified during batch triage. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
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.

Blocks
#399 Epic: Post-MVP Server & Clients
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#2955
No description provided.