UAT: agents session show rich output Session Summary panel uses wrong field labels — "Session ID:" instead of "ID:", includes "Namespace:" not in spec, missing "Automation:" field #3040

Closed
opened 2026-04-05 04:13:58 +00:00 by freemo · 5 comments
Owner

Background and Context

During UAT testing of the agents session show command, three deviations were found between the rich output's Session Summary panel and the format defined in docs/specification.md. The spec defines the CLI output format as a contract; these cosmetic deviations constitute a spec violation.

Code location: src/cleveragents/cli/commands/session.py, show() function (lines ~370–445)

Current Behavior

The implementation renders the Session Summary panel as:

details = (
    f"[bold]Session ID:[/bold] {session.session_id}\n"  # Wrong: "Session ID:" not "ID:"
    f"[bold]Actor:[/bold] {session.actor_name or '(none)'}\n"
    f"[bold]Namespace:[/bold] {session.namespace}\n"    # Extra: not in spec
    f"[bold]Messages:[/bold] {session.message_count}\n"
    f"[bold]Created:[/bold] {session.created_at.strftime('%Y-%m-%d %H:%M')}\n"
    f"[bold]Updated:[/bold] {session.updated_at.strftime('%Y-%m-%d %H:%M')}"
    # Missing: "Automation:" field
)

Producing output similar to:

╭─ Session Summary ───────────────╮
│ Session ID: 01HXM2A6K1P2E9Q9D4GQ7J4S7Z  │
│ Actor: local/orchestrator       │
│ Namespace: default              │
│ Messages: 6                     │
│ Created: 2026-02-08 12:30       │
│ Updated: 2026-02-08 12:44       │
╰─────────────────────────────────╯

Expected Behavior

Per docs/specification.md, section "agents session show", Rich format:

╭─ Session Summary ───────────────╮
│ ID: 01HXM2A6K1P2E9Q9D4GQ7J4S7Z  │
│ Actor: local/orchestrator       │
│ Messages: 6                     │
│ Created: 2026-02-08 12:30       │
│ Updated: 2026-02-08 12:44       │
│ Automation: review              │
╰─────────────────────────────────╯

Deviations

# Field Current Expected
1 Session identifier label Session ID: ID:
2 Namespace field Present Not in spec — must be removed
3 Automation field Missing Must show automation profile name (e.g., review)

Acceptance Criteria

  • The Session Summary panel label for the session identifier is ID: (not Session ID:)
  • The Namespace: field is removed from the Session Summary panel
  • The Automation: field is added to the Session Summary panel, displaying the automation profile name
  • The panel field order matches the spec exactly: ID, Actor, Messages, Created, Updated, Automation
  • Existing rich-output tests for agents session show are updated to assert the corrected labels and fields
  • No regression in plain, json, yaml, or color output formats

Metadata

  • Branch: fix/session-show-summary-panel-fields
  • Commit Message: fix(cli): correct session show rich output Session Summary panel field labels and fields
  • Milestone: v3.7.0
  • Parent Epic: #868

Subtasks

  • In src/cleveragents/cli/commands/session.py show(), rename Session ID: label to ID:
  • Remove the Namespace: line from the Session Summary panel details string
  • Add the Automation: line to the Session Summary panel details string (sourced from session.automation or equivalent attribute)
  • Verify field order matches spec: ID → Actor → Messages → Created → Updated → Automation
  • Update/add Behave BDD scenarios asserting the corrected rich output panel content
  • Run nox -s coverage_report and verify coverage >= 97%
  • Run nox (all default sessions) and fix any errors

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, followed by a blank line, then additional lines providing relevant details about the implementation.
  • 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 before this issue is marked done.
  • All nox stages pass.
  • Coverage >= 97%.

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

## Background and Context During UAT testing of the `agents session show` command, three deviations were found between the rich output's Session Summary panel and the format defined in `docs/specification.md`. The spec defines the CLI output format as a contract; these cosmetic deviations constitute a spec violation. **Code location**: `src/cleveragents/cli/commands/session.py`, `show()` function (lines ~370–445) ## Current Behavior The implementation renders the Session Summary panel as: ```python details = ( f"[bold]Session ID:[/bold] {session.session_id}\n" # Wrong: "Session ID:" not "ID:" f"[bold]Actor:[/bold] {session.actor_name or '(none)'}\n" f"[bold]Namespace:[/bold] {session.namespace}\n" # Extra: not in spec f"[bold]Messages:[/bold] {session.message_count}\n" f"[bold]Created:[/bold] {session.created_at.strftime('%Y-%m-%d %H:%M')}\n" f"[bold]Updated:[/bold] {session.updated_at.strftime('%Y-%m-%d %H:%M')}" # Missing: "Automation:" field ) ``` Producing output similar to: ``` ╭─ Session Summary ───────────────╮ │ Session ID: 01HXM2A6K1P2E9Q9D4GQ7J4S7Z │ │ Actor: local/orchestrator │ │ Namespace: default │ │ Messages: 6 │ │ Created: 2026-02-08 12:30 │ │ Updated: 2026-02-08 12:44 │ ╰─────────────────────────────────╯ ``` ## Expected Behavior Per `docs/specification.md`, section "agents session show", Rich format: ``` ╭─ Session Summary ───────────────╮ │ ID: 01HXM2A6K1P2E9Q9D4GQ7J4S7Z │ │ Actor: local/orchestrator │ │ Messages: 6 │ │ Created: 2026-02-08 12:30 │ │ Updated: 2026-02-08 12:44 │ │ Automation: review │ ╰─────────────────────────────────╯ ``` ## Deviations | # | Field | Current | Expected | |---|-------|---------|----------| | 1 | Session identifier label | `Session ID:` | `ID:` | | 2 | Namespace field | Present | **Not in spec** — must be removed | | 3 | Automation field | **Missing** | Must show automation profile name (e.g., `review`) | ## Acceptance Criteria - [ ] The Session Summary panel label for the session identifier is `ID:` (not `Session ID:`) - [ ] The `Namespace:` field is removed from the Session Summary panel - [ ] The `Automation:` field is added to the Session Summary panel, displaying the automation profile name - [ ] The panel field order matches the spec exactly: ID, Actor, Messages, Created, Updated, Automation - [ ] Existing rich-output tests for `agents session show` are updated to assert the corrected labels and fields - [ ] No regression in `plain`, `json`, `yaml`, or `color` output formats ## Metadata - **Branch**: `fix/session-show-summary-panel-fields` - **Commit Message**: `fix(cli): correct session show rich output Session Summary panel field labels and fields` - **Milestone**: v3.7.0 - **Parent Epic**: #868 ## Subtasks - [x] In `src/cleveragents/cli/commands/session.py` `show()`, rename `Session ID:` label to `ID:` - [x] Remove the `Namespace:` line from the Session Summary panel details string - [x] Add the `Automation:` line to the Session Summary panel details string (sourced from `session.automation` or equivalent attribute) - [x] Verify field order matches spec: ID → Actor → Messages → Created → Updated → Automation - [x] Update/add Behave BDD scenarios asserting the corrected rich output panel content - [x] Run `nox -s coverage_report` and verify coverage >= 97% - [x] Run `nox` (all default sessions) and fix any errors ## 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, followed by a blank line, then additional lines providing relevant details about the implementation. - 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** before this issue is marked done. - All nox stages pass. - Coverage >= 97%. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-uat-tester
freemo added this to the v3.7.0 milestone 2026-04-05 04:14:05 +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
Author
Owner

Automated transition plan for issue #3040:

  • Current labels observed: State/Verified, Type/Bug, Priority/Low
  • Preconditions: Not paused; no Blocked label present; transition allowed
  • Proposed action: Remove all State/* labels and add the target label State/In Progress
    • Removed labels: State/Verified
    • Added labels: State/In Progress
  • Notes: The underlying Forgejo API in this environment does not expose a direct labels-update endpoint on issues. If you want me to perform the actual label update automatically, please provide an endpoint or grant access to one that supports updating issue labels. As a fallback, I can post a follow-up comment detailing the changes and await a maintainer to apply the label updates, or I can prepare a small patch/PR that updates labels in the repository's issue-tracking configuration.

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

Automated transition plan for issue #3040: - Current labels observed: State/Verified, Type/Bug, Priority/Low - Preconditions: Not paused; no Blocked label present; transition allowed - Proposed action: Remove all State/* labels and add the target label State/In Progress - Removed labels: State/Verified - Added labels: State/In Progress - Notes: The underlying Forgejo API in this environment does not expose a direct labels-update endpoint on issues. If you want me to perform the actual label update automatically, please provide an endpoint or grant access to one that supports updating issue labels. As a fallback, I can post a follow-up comment detailing the changes and await a maintainer to apply the label updates, or I can prepare a small patch/PR that updates labels in the repository's issue-tracking configuration. --- **Automated by CleverAgents Bot** Supervisor: Implementation | Agent: ca-issue-state-updater
Author
Owner

Starting implementation on branch fix/session-show-summary-panel-fields.

Changes made to src/cleveragents/cli/commands/session.py show() function:

  1. Renamed Session ID: label to ID:
  2. Removed Namespace: line from Session Summary panel
  3. Added Automation: line (sourced from session.metadata.get("automation_profile", "(none)"))
  4. Field order now matches spec: ID → Actor → Messages → Created → Updated → Automation

BDD tests updated in features/session_cli.feature and features/steps/session_cli_steps.py:

  • Added assertions for ID:, Actor:, Messages:, Created:, Updated:, Automation: presence
  • Added assertions that Session ID: and Namespace: are NOT present

Quality gates:

  • nox -s lint: All checks passed
  • nox -s typecheck: 0 errors, 0 warnings
  • nox -s unit_tests -- features/session_cli.feature: 23 scenarios passed, 0 failed
  • nox -s security_scan: No issues identified

All subtasks complete. Creating PR.


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

Starting implementation on branch `fix/session-show-summary-panel-fields`. Changes made to `src/cleveragents/cli/commands/session.py` `show()` function: 1. Renamed `Session ID:` label to `ID:` ✅ 2. Removed `Namespace:` line from Session Summary panel ✅ 3. Added `Automation:` line (sourced from `session.metadata.get("automation_profile", "(none)")`) ✅ 4. Field order now matches spec: ID → Actor → Messages → Created → Updated → Automation ✅ BDD tests updated in `features/session_cli.feature` and `features/steps/session_cli_steps.py`: - Added assertions for `ID:`, `Actor:`, `Messages:`, `Created:`, `Updated:`, `Automation:` presence - Added assertions that `Session ID:` and `Namespace:` are NOT present Quality gates: - `nox -s lint`: ✅ All checks passed - `nox -s typecheck`: ✅ 0 errors, 0 warnings - `nox -s unit_tests -- features/session_cli.feature`: ✅ 23 scenarios passed, 0 failed - `nox -s security_scan`: ✅ No issues identified All subtasks complete. Creating PR. --- **Automated by CleverAgents Bot** Supervisor: Implementation | Agent: ca-issue-worker
Author
Owner

PR #3302 created on branch fix/session-show-summary-panel-fields: #3302

PR review and merge handled by continuous review stream.


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

PR #3302 created on branch `fix/session-show-summary-panel-fields`: https://git.cleverthis.com/cleveragents/cleveragents-core/pulls/3302 PR review and merge handled by continuous review stream. --- **Automated by CleverAgents Bot** Supervisor: Implementation | Agent: ca-issue-worker
Author
Owner

PR #3302 has been merged successfully! 🎉

Summary of what was fixed:

  • Renamed Session ID: label to ID: in the Session Summary panel (spec compliance)
  • Removed extraneous Namespace: field (not defined in spec)
  • Added required Automation: field sourced from session.metadata.get('automation_profile', '(none)')
  • Corrected field order to match spec exactly: ID → Actor → Messages → Created → Updated → Automation
  • Updated BDD tests with positive and negative assertions for all corrected field labels

CI Results: All checks passed (unit tests, integration tests, e2e tests, coverage, lint, typecheck, security, docker, helm, build)


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

PR #3302 has been merged successfully! 🎉 **Summary of what was fixed:** - Renamed `Session ID:` label to `ID:` in the Session Summary panel (spec compliance) - Removed extraneous `Namespace:` field (not defined in spec) - Added required `Automation:` field sourced from `session.metadata.get('automation_profile', '(none)')` - Corrected field order to match spec exactly: ID → Actor → Messages → Created → Updated → Automation - Updated BDD tests with positive and negative assertions for all corrected field labels **CI Results:** All checks passed (unit tests, integration tests, e2e tests, coverage, lint, typecheck, security, docker, helm, build) --- **Automated by CleverAgents Bot** Supervisor: Implementation | Agent: ca-issue-worker
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#3040
No description provided.