UAT: agents tool show for Validation missing "Attached To" section with attachment IDs and scopes #5022

Open
opened 2026-04-09 00:48:56 +00:00 by HAL9000 · 1 comment
Owner

Bug Report

Feature Area: Tools & Skills — agents tool show (Validation display)

Severity: High (missing spec-required output section for validations)


What Was Tested

agents tool show <VALIDATION_NAME> output when the tool is a Validation.


Expected Behavior (from spec)

The spec (§ agents tool show, lines ~8469–8638) defines that when showing a Validation, the output must include an "Attached To" section listing each resource attachment with:

  • Resource name
  • Scope (direct/always active, project-scoped, or plan-scoped)
  • Attachment ULID

Example from spec:

Attached To
  local/api-repo (direct, always active)
    (attachment: 01HXM5B2C3D4E5F6G7H8J9K0L1)
  local/api-repo (scope: project local/api-service)
    (attachment: 01HXM5A1B2C3D4E5F6G7H8J9K0)

In JSON format:

"attached_to": [
  { "resource": "local/api-repo", "scope": "direct", "attachment_id": "01HXM5B2C3D4E5F6G7H8J9K0L1" },
  { "resource": "local/api-repo", "scope": "project", "project": "local/api-service", "attachment_id": "01HXM5A1B2C3D4E5F6G7H8J9K0" }
]

The spec also says the output header changes from "Tool Details" to "Validation Details" and includes a Type: validation field.


Actual Behavior (from code)

The _print_tool() function in src/cleveragents/cli/commands/tool.py (lines 138–207) does NOT:

  1. Show an "Attached To" section for validations
  2. Change the panel title to "Validation Details" when showing a validation
  3. Show a Type: validation field in the header

The ToolRegistryService has a list_validations_for_resource() method but there is no reverse lookup (given a validation name, find all its attachments).


Steps to Reproduce

Register a validation and attach it to a resource:

agents validation add --config my-validation.yaml
agents validation attach local/my-repo local/my-validation
agents tool show local/my-validation

Expected: Output shows "Validation Details" panel with "Attached To" section listing local/my-repo (direct, always active) with attachment ULID
Actual: Output shows generic "Tool Details" panel with no attachment information


Code Location

  • src/cleveragents/cli/commands/tool.py_print_tool() function, lines 138–207
  • src/cleveragents/application/services/tool_registry_service.py — missing list_attachments_for_validation(validation_name) method

Fix Required

  1. Add list_attachments_for_validation(validation_name) to ToolRegistryService (reverse lookup: given a validation name, return all its attachments).
  2. Update _print_tool() to:
    • Use "Validation Details" as panel title when tool_type == "validation"
    • Add Type: validation to the header
    • Show "Attached To" section with resource, scope, and attachment ULID for each attachment
  3. Include attached_to in the JSON/YAML output format.

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

## Bug Report **Feature Area:** Tools & Skills — `agents tool show` (Validation display) **Severity:** High (missing spec-required output section for validations) --- ## What Was Tested `agents tool show <VALIDATION_NAME>` output when the tool is a Validation. --- ## Expected Behavior (from spec) The spec (§ `agents tool show`, lines ~8469–8638) defines that when showing a Validation, the output must include an **"Attached To"** section listing each resource attachment with: - Resource name - Scope (direct/always active, project-scoped, or plan-scoped) - Attachment ULID Example from spec: ``` Attached To local/api-repo (direct, always active) (attachment: 01HXM5B2C3D4E5F6G7H8J9K0L1) local/api-repo (scope: project local/api-service) (attachment: 01HXM5A1B2C3D4E5F6G7H8J9K0) ``` In JSON format: ```json "attached_to": [ { "resource": "local/api-repo", "scope": "direct", "attachment_id": "01HXM5B2C3D4E5F6G7H8J9K0L1" }, { "resource": "local/api-repo", "scope": "project", "project": "local/api-service", "attachment_id": "01HXM5A1B2C3D4E5F6G7H8J9K0" } ] ``` The spec also says the output header changes from "Tool Details" to "Validation Details" and includes a `Type: validation` field. --- ## Actual Behavior (from code) The `_print_tool()` function in `src/cleveragents/cli/commands/tool.py` (lines 138–207) does NOT: 1. Show an "Attached To" section for validations 2. Change the panel title to "Validation Details" when showing a validation 3. Show a `Type: validation` field in the header The `ToolRegistryService` has a `list_validations_for_resource()` method but there is no reverse lookup (given a validation name, find all its attachments). --- ## Steps to Reproduce Register a validation and attach it to a resource: ```bash agents validation add --config my-validation.yaml agents validation attach local/my-repo local/my-validation agents tool show local/my-validation ``` **Expected:** Output shows "Validation Details" panel with "Attached To" section listing `local/my-repo (direct, always active)` with attachment ULID **Actual:** Output shows generic "Tool Details" panel with no attachment information --- ## Code Location - `src/cleveragents/cli/commands/tool.py` — `_print_tool()` function, lines 138–207 - `src/cleveragents/application/services/tool_registry_service.py` — missing `list_attachments_for_validation(validation_name)` method --- ## Fix Required 1. Add `list_attachments_for_validation(validation_name)` to `ToolRegistryService` (reverse lookup: given a validation name, return all its attachments). 2. Update `_print_tool()` to: - Use "Validation Details" as panel title when `tool_type == "validation"` - Add `Type: validation` to the header - Show "Attached To" section with resource, scope, and attachment ULID for each attachment 3. Include `attached_to` in the JSON/YAML output format. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.2.0 milestone 2026-04-09 01:01:47 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Medium — Spec compliance bug; deviates from documented behavior
  • Milestone: v3.2.0
  • Story Points: 3 — M
  • MoSCoW: Must Have — Spec compliance is required

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

Issue triaged by project owner: - **State**: Verified - **Priority**: Medium — Spec compliance bug; deviates from documented behavior - **Milestone**: v3.2.0 - **Story Points**: 3 — M - **MoSCoW**: Must Have — Spec compliance is required --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: 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.

Dependencies

No dependencies set.

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