UAT: TUI PersonaRegistry.export_path and import_path reject absolute paths — spec requires export to current directory, not CWD-relative restriction #4860

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

Bug Report

Feature Area: TUI Interface — Persona System (ADR-045)

What Was Tested

PersonaRegistry.resolve_export_path() and resolve_import_path() in src/cleveragents/tui/persona/registry.py

Expected Behavior (from spec ADR-045)

The spec states:

/persona:export feature-dev — Writes feature-dev.yaml to current directory
/persona:import ./feature-dev.yaml — Copies to personas/ directory

The spec does not restrict paths to CWD-relative only. Users should be able to export to any path (e.g., ~/shared/personas/feature-dev.yaml) and import from any path.

Actual Behavior

Both resolve_export_path() and resolve_import_path() raise ValueError if the path is absolute:

def resolve_export_path(self, output_path: Path) -> Path:
    if output_path.is_absolute():
        raise ValueError(
            "Export path must be relative to current working directory"
        )
    ...
    if not resolved.is_relative_to(base):
        raise ValueError("Export path must stay within working directory")

This means:

  • /persona:export feature-dev ~/shared/personas/feature-dev.yaml → raises ValueError
  • /persona:import /home/user/team-personas/reviewer.yaml → raises ValueError

Users cannot export to or import from absolute paths, which is a common workflow for sharing personas between machines or team members.

Code Location

src/cleveragents/tui/persona/registry.pyresolve_export_path() and resolve_import_path() methods

Steps to Reproduce

registry = PersonaRegistry()
registry.resolve_export_path(Path("/home/user/shared/feature-dev.yaml"))
# Raises: ValueError: Export path must be relative to current working directory

Impact

Users cannot export personas to shared directories or import from absolute paths. The team-sharing workflow described in ADR-045 is impaired.


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

## Bug Report **Feature Area:** TUI Interface — Persona System (ADR-045) ### What Was Tested `PersonaRegistry.resolve_export_path()` and `resolve_import_path()` in `src/cleveragents/tui/persona/registry.py` ### Expected Behavior (from spec ADR-045) The spec states: > `/persona:export feature-dev` — Writes `feature-dev.yaml` to current directory > `/persona:import ./feature-dev.yaml` — Copies to personas/ directory The spec does not restrict paths to CWD-relative only. Users should be able to export to any path (e.g., `~/shared/personas/feature-dev.yaml`) and import from any path. ### Actual Behavior Both `resolve_export_path()` and `resolve_import_path()` raise `ValueError` if the path is absolute: ```python def resolve_export_path(self, output_path: Path) -> Path: if output_path.is_absolute(): raise ValueError( "Export path must be relative to current working directory" ) ... if not resolved.is_relative_to(base): raise ValueError("Export path must stay within working directory") ``` This means: - `/persona:export feature-dev ~/shared/personas/feature-dev.yaml` → raises ValueError - `/persona:import /home/user/team-personas/reviewer.yaml` → raises ValueError Users cannot export to or import from absolute paths, which is a common workflow for sharing personas between machines or team members. ### Code Location `src/cleveragents/tui/persona/registry.py` — `resolve_export_path()` and `resolve_import_path()` methods ### Steps to Reproduce ```python registry = PersonaRegistry() registry.resolve_export_path(Path("/home/user/shared/feature-dev.yaml")) # Raises: ValueError: Export path must be relative to current working directory ``` ### Impact Users cannot export personas to shared directories or import from absolute paths. The team-sharing workflow described in ADR-045 is impaired. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.7.0 milestone 2026-04-08 20:15:19 +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#4860
No description provided.