UAT: bug(cli): agents project show displays raw resource ULID instead of resource name for linked resources #2943

Open
opened 2026-04-05 02:53:40 +00:00 by freemo · 5 comments
Owner

Metadata

  • Commit Message: fix(cli): display resource name in project show linked resources list
  • Branch: bugfix/project-show-resource-name
  • Parent Epic: #353
  • Milestone: v3.1.0

Background and Context

The spec states that resources can be referenced by name or ULID in CLI commands, and that the project show command should display linked resources in a human-readable way. Displaying raw ULIDs (26-character opaque strings) is not user-friendly and makes it impossible to identify which resources are linked without a separate lookup.

Current Behavior

In src/cleveragents/cli/commands/project.py, the show command renders linked resources using only the resource_id (ULID):

for lr in proj.linked_resources:
    ro_marker = " [dim](read-only)[/dim]" if lr.project_read_only else ""
    alias_marker = f" alias={lr.alias}" if lr.alias else ""
    lines.append(f"  - {lr.resource_id}{ro_marker}{alias_marker}")
    #                  ^^^^^^^^^^^^^^^ Raw ULID, not human-readable

Example output:

Linked Resources (2):
  - 01HXYZ1234567890ABCDEFGHIJ (read-only)
  - 01HXYZ9876543210ZYXWVUTSRQ alias=my-db

Users cannot tell which resource is which without running agents resource show <ULID> separately.

Expected Behavior

The show command should display the resource's namespaced name (if available) alongside or instead of the ULID. The resource name should be resolved from the Resource Registry. If a resource has no name (auto-discovered child), the ULID is acceptable as a fallback.

Expected output:

Linked Resources (2):
  - local/api-repo (read-only)
  - local/staging-db alias=my-db

Or with ULID as secondary info:

Linked Resources (2):
  - local/api-repo [01HXYZ1234567890ABCDEFGHIJ] (read-only)
  - local/staging-db [01HXYZ9876543210ZYXWVUTSRQ] alias=my-db

Acceptance Criteria

  • agents project show displays resource namespaced names for linked resources
  • Resources without names (auto-discovered) fall back to displaying the ULID
  • The alias is still displayed when set
  • The read-only marker is still displayed when applicable
  • JSON/YAML output formats include both resource_id and resource_name

Subtasks

  • Update show command to resolve resource names from the Resource Registry
  • Update _project_spec_dict() to include resource_name alongside resource_id
  • Handle the case where the Resource Registry is unavailable (graceful fallback to ULID)
  • Add integration test for agents project show output format
  • Run nox and ensure all sessions pass

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly.
  • The commit is submitted as a pull request to master, reviewed, and merged.

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

## Metadata - **Commit Message**: `fix(cli): display resource name in project show linked resources list` - **Branch**: `bugfix/project-show-resource-name` - **Parent Epic**: #353 - **Milestone**: v3.1.0 ## Background and Context The spec states that resources can be referenced by name or ULID in CLI commands, and that the project show command should display linked resources in a human-readable way. Displaying raw ULIDs (26-character opaque strings) is not user-friendly and makes it impossible to identify which resources are linked without a separate lookup. ## Current Behavior In `src/cleveragents/cli/commands/project.py`, the `show` command renders linked resources using only the `resource_id` (ULID): ```python for lr in proj.linked_resources: ro_marker = " [dim](read-only)[/dim]" if lr.project_read_only else "" alias_marker = f" alias={lr.alias}" if lr.alias else "" lines.append(f" - {lr.resource_id}{ro_marker}{alias_marker}") # ^^^^^^^^^^^^^^^ Raw ULID, not human-readable ``` Example output: ``` Linked Resources (2): - 01HXYZ1234567890ABCDEFGHIJ (read-only) - 01HXYZ9876543210ZYXWVUTSRQ alias=my-db ``` Users cannot tell which resource is which without running `agents resource show <ULID>` separately. ## Expected Behavior The `show` command should display the resource's namespaced name (if available) alongside or instead of the ULID. The resource name should be resolved from the Resource Registry. If a resource has no name (auto-discovered child), the ULID is acceptable as a fallback. Expected output: ``` Linked Resources (2): - local/api-repo (read-only) - local/staging-db alias=my-db ``` Or with ULID as secondary info: ``` Linked Resources (2): - local/api-repo [01HXYZ1234567890ABCDEFGHIJ] (read-only) - local/staging-db [01HXYZ9876543210ZYXWVUTSRQ] alias=my-db ``` ## Acceptance Criteria - [ ] `agents project show` displays resource namespaced names for linked resources - [ ] Resources without names (auto-discovered) fall back to displaying the ULID - [ ] The alias is still displayed when set - [ ] The read-only marker is still displayed when applicable - [ ] JSON/YAML output formats include both `resource_id` and `resource_name` ## Subtasks - [ ] Update `show` command to resolve resource names from the Resource Registry - [ ] Update `_project_spec_dict()` to include `resource_name` alongside `resource_id` - [ ] Handle the case where the Resource Registry is unavailable (graceful fallback to ULID) - [ ] Add integration test for `agents project show` output format - [ ] Run `nox` and ensure all sessions pass ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged**. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-uat-tester
Author
Owner

Label compliance fix applied:

  • Added missing labels: Priority/Medium, State/Unverified, Type/Bug
  • Reason: Issue was missing all required labels per CONTRIBUTING.md. Inferred Type/Bug from the "UAT: bug(cli)" prefix. Applied Priority/Medium and State/Unverified as defaults.

Automated by CleverAgents Bot
Supervisor: Backlog Grooming | Agent: ca-backlog-groomer

Label compliance fix applied: - Added missing labels: `Priority/Medium`, `State/Unverified`, `Type/Bug` - Reason: Issue was missing all required labels per CONTRIBUTING.md. Inferred `Type/Bug` from the "UAT: bug(cli)" prefix. Applied `Priority/Medium` and `State/Unverified` as defaults. --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: ca-backlog-groomer
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
freemo added this to the v3.2.0 milestone 2026-04-05 04:49:23 +00:00
Author
Owner

Milestone compliance fix applied:

  • Assigned to milestone: v3.2.0
  • Reason: Issue is State/Verified (ready for implementation) but had no milestone. Issue body references Milestone: v3.1.0 which is no longer an active open milestone. Assigned to the earliest active milestone v3.2.0 as the appropriate target.

Automated by CleverAgents Bot
Supervisor: Backlog Grooming | Agent: ca-backlog-groomer

Milestone compliance fix applied: - Assigned to milestone: `v3.2.0` - Reason: Issue is `State/Verified` (ready for implementation) but had no milestone. Issue body references `Milestone: v3.1.0` which is no longer an active open milestone. Assigned to the earliest active milestone `v3.2.0` as the appropriate target. --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: ca-backlog-groomer
Author
Owner

Starting implementation on branch bugfix/project-show-resource-name.

Implementation plan:

  • Added _resolve_resource_names() helper that queries the Resource Registry to map resource ULIDs → namespaced names, with graceful fallback to None when the registry is unavailable or a resource has no name
  • Updated _project_spec_dict() to accept an optional resource_names dict and include resource_name alongside resource_id in JSON/YAML output
  • Updated show command to resolve resource names before display, showing human-readable names (e.g. local/my-git-repo) instead of raw ULIDs, falling back to ULID when name is unavailable

BDD tests added: features/project_show_resource_name.feature with 6 scenarios covering:

  • Named resource displays name instead of ULID
  • Unnamed resource falls back to ULID
  • Read-only marker still displayed
  • Alias still displayed
  • JSON output includes both resource_id and resource_name
  • Graceful fallback when registry is unavailable

All 6 scenarios pass. Lint, typecheck, and format quality gates all pass.


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

Starting implementation on branch `bugfix/project-show-resource-name`. **Implementation plan:** - Added `_resolve_resource_names()` helper that queries the Resource Registry to map resource ULIDs → namespaced names, with graceful fallback to `None` when the registry is unavailable or a resource has no name - Updated `_project_spec_dict()` to accept an optional `resource_names` dict and include `resource_name` alongside `resource_id` in JSON/YAML output - Updated `show` command to resolve resource names before display, showing human-readable names (e.g. `local/my-git-repo`) instead of raw ULIDs, falling back to ULID when name is unavailable **BDD tests added:** `features/project_show_resource_name.feature` with 6 scenarios covering: - Named resource displays name instead of ULID - Unnamed resource falls back to ULID - Read-only marker still displayed - Alias still displayed - JSON output includes both `resource_id` and `resource_name` - Graceful fallback when registry is unavailable All 6 scenarios pass. Lint, typecheck, and format quality gates all pass. --- **Automated by CleverAgents Bot** Supervisor: Implementation | Agent: ca-issue-worker
freemo removed this from the v3.2.0 milestone 2026-04-06 22:28:06 +00:00
Author
Owner

This issue has been moved to the backlog as part of an aggressive grooming of the v3.2.0 milestone. It has been deemed non-critical for the minimal viability of the milestone and will be addressed in a future release.

This issue has been moved to the backlog as part of an aggressive grooming of the v3.2.0 milestone. It has been deemed non-critical for the minimal viability of the milestone and will be addressed in a future release.
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#2943
No description provided.