UAT: agents validation attach rich output missing spec-required panel — shows single line instead of structured panel with Attachment ID, Validation, Mode, Resource, Scope #2948

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

Metadata

  • Branch: fix/validation-attach-rich-output-panel
  • Commit Message: fix(cli): render spec-required rich panel in agents validation attach output
  • Milestone: v3.7.0
  • Parent Epic: #362

Background and Context

The agents validation attach CLI command produces a single-line plain text confirmation instead of the structured Rich panel mandated by docs/specification.md. This deviates from the output rendering contract defined in ADR-021 and reduces usability for interactive users while breaking any tooling that parses the rich output format.

What Was Tested

The rich output format of agents validation attach was analyzed against the specification.

Expected Behavior (from spec)

Per docs/specification.md § agents validation attach, the rich output should be a structured panel:

╭─ Validation Attached ──────────────────────────────────────╮
│ Attachment ID: 01HXM5A1B2C3D4E5F6G7H8J9K0                  │
│ Validation: local/run-tests                                │
│ Mode: required                                             │
│ Resource: local/api-repo                                   │
│ Scope: project local/api-service                           │
╰────────────────────────────────────────────────────────────╯

✓ OK Validation attached

The panel must include: Attachment ID, Validation name, Mode, Resource, and Scope (with scope showing "direct (always active)" for unscoped attachments, or "project <name>" / "plan <id>" for scoped ones).

Actual Behavior

In src/cleveragents/cli/commands/validation.py, the attach() command (lines 344–348) outputs a single line:

console.print(
    f"[green]Attached validation:[/green] {validation_name} -> "
    f"{resource} (id: {att_id})"
)

This produces: Attached validation: local/run-tests -> local/api-repo (id: 01HXM...)

Missing from the output:

  • No Rich panel (╭─ Validation Attached ─╮)
  • No Mode field
  • No Scope field (direct/project/plan)
  • No ✓ OK Validation attached footer
  • No note about "This validation will run for ALL plans/projects" for direct attachments

Code Location

  • src/cleveragents/cli/commands/validation.py, attach() function, lines 338–348

Severity

Medium — the command functions correctly but the output format deviates significantly from the spec, reducing usability and breaking any tooling that parses the rich output.

Subtasks

  • Replace the single-line console.print() in attach() with a Rich Panel containing all spec-required fields (Attachment ID, Validation, Mode, Resource, Scope)
  • Implement scope display logic: "direct (always active)" for unscoped, "project <name>" for project-scoped, "plan <id>" for plan-scoped attachments
  • Add the ✓ OK Validation attached footer line after the panel
  • Add a note "This validation will run for ALL plans/projects" for direct (unscoped) attachments
  • Ensure the panel renders correctly under --format rich and --format table modes
  • Add a Behave scenario verifying the rich output panel fields for agents validation attach
  • Add a Robot Framework integration test asserting the panel structure and all required fields appear in the output
  • Verify coverage >= 97% via nox -s coverage_report
  • Run nox (all default sessions), fix any errors

Definition of Done

  • agents validation attach rich output renders a ╭─ Validation Attached ─╮ panel with Attachment ID, Validation, Mode, Resource, and Scope fields
  • Scope field correctly displays "direct (always active)", "project <name>", or "plan <id>" depending on attachment scope
  • ✓ OK Validation attached footer line is present after the panel
  • Direct attachments include the "This validation will run for ALL plans/projects" note
  • New Behave scenario covers the rich output panel and passes
  • New Robot Framework integration test covers the CLI output structure and passes
  • No existing tests are broken
  • All nox stages pass
  • Coverage >= 97%

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

## Metadata - **Branch**: `fix/validation-attach-rich-output-panel` - **Commit Message**: `fix(cli): render spec-required rich panel in agents validation attach output` - **Milestone**: v3.7.0 - **Parent Epic**: #362 ## Background and Context The `agents validation attach` CLI command produces a single-line plain text confirmation instead of the structured Rich panel mandated by `docs/specification.md`. This deviates from the output rendering contract defined in ADR-021 and reduces usability for interactive users while breaking any tooling that parses the rich output format. ## What Was Tested The rich output format of `agents validation attach` was analyzed against the specification. ## Expected Behavior (from spec) Per `docs/specification.md` § agents validation attach, the rich output should be a structured panel: ``` ╭─ Validation Attached ──────────────────────────────────────╮ │ Attachment ID: 01HXM5A1B2C3D4E5F6G7H8J9K0 │ │ Validation: local/run-tests │ │ Mode: required │ │ Resource: local/api-repo │ │ Scope: project local/api-service │ ╰────────────────────────────────────────────────────────────╯ ✓ OK Validation attached ``` The panel must include: Attachment ID, Validation name, Mode, Resource, and Scope (with scope showing "direct (always active)" for unscoped attachments, or "project \<name\>" / "plan \<id\>" for scoped ones). ## Actual Behavior In `src/cleveragents/cli/commands/validation.py`, the `attach()` command (lines 344–348) outputs a single line: ```python console.print( f"[green]Attached validation:[/green] {validation_name} -> " f"{resource} (id: {att_id})" ) ``` This produces: `Attached validation: local/run-tests -> local/api-repo (id: 01HXM...)` Missing from the output: - No Rich panel (`╭─ Validation Attached ─╮`) - No `Mode` field - No `Scope` field (direct/project/plan) - No `✓ OK Validation attached` footer - No note about "This validation will run for ALL plans/projects" for direct attachments ## Code Location - `src/cleveragents/cli/commands/validation.py`, `attach()` function, lines 338–348 ## Severity Medium — the command functions correctly but the output format deviates significantly from the spec, reducing usability and breaking any tooling that parses the rich output. ## Subtasks - [ ] Replace the single-line `console.print()` in `attach()` with a Rich `Panel` containing all spec-required fields (Attachment ID, Validation, Mode, Resource, Scope) - [ ] Implement scope display logic: "direct (always active)" for unscoped, "project \<name\>" for project-scoped, "plan \<id\>" for plan-scoped attachments - [ ] Add the `✓ OK Validation attached` footer line after the panel - [ ] Add a note "This validation will run for ALL plans/projects" for direct (unscoped) attachments - [ ] Ensure the panel renders correctly under `--format rich` and `--format table` modes - [ ] Add a Behave scenario verifying the rich output panel fields for `agents validation attach` - [ ] Add a Robot Framework integration test asserting the panel structure and all required fields appear in the output - [ ] Verify coverage >= 97% via `nox -s coverage_report` - [ ] Run `nox` (all default sessions), fix any errors ## Definition of Done - [ ] `agents validation attach` rich output renders a `╭─ Validation Attached ─╮` panel with Attachment ID, Validation, Mode, Resource, and Scope fields - [ ] Scope field correctly displays "direct (always active)", "project \<name\>", or "plan \<id\>" depending on attachment scope - [ ] `✓ OK Validation attached` footer line is present after the panel - [ ] Direct attachments include the "This validation will run for ALL plans/projects" note - [ ] New Behave scenario covers the rich output panel and passes - [ ] New Robot Framework integration test covers the CLI output structure and passes - [ ] No existing tests are broken - [ ] 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:54:40 +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
#362 Epic: Security & Safety Hardening
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#2948
No description provided.