UAT: agents session import rich output missing spec-required panels — Validation and Merge panels not rendered #2947

Open
opened 2026-04-05 02:54:17 +00:00 by freemo · 3 comments
Owner

Metadata

  • Branch: fix/session-import-rich-output-missing-panels
  • Commit Message: fix(cli): render spec-required Session Import, Validation, and Merge panels in session import command
  • Milestone: v3.2.0
  • Parent Epic: #868

Background and Context

The agents session import command's rich output deviates significantly from the specification. The spec requires three distinct panels: "Session Import", "Validation", and "Merge". The current implementation only renders a single "Session Imported" panel with different fields, omitting the Validation and Merge panels entirely.

Per docs/specification.md (section "agents session import"), the specification is the authoritative source of truth. When the codebase deviates from the specification, the code must be updated to match it.

Code Location: src/cleveragents/cli/commands/session.py, import_session() function (lines ~633–670)

Expected Behavior (from spec)

╭─ Session Import ────────────────────────╮
│ Input: /tmp/weekly-planning.json        │
│ Session ID: 01HXM3D3B2W4CQYQ3P4ZB8A5T1  │
│ Messages: 6                             │
│ Schema: v3                              │
╰─────────────────────────────────────────╯

╭─ Validation ────────────╮
│ Checksum: verified      │
│ Schema: compatible      │
│ Actor Ref: resolved     │
╰─────────────────────────╯

╭─ Merge ──────────────╮
│ Existing: none       │
│ Strategy: create new │
╰──────────────────────╯

✓ OK Import completed

Actual Behavior

Only a single "Session Imported" panel is rendered:

details = (
    f"[bold]Session ID:[/bold] {session.session_id}\n"
    f"[bold]Actor:[/bold] {session.actor_name or '(none)'}\n"
    f"[bold]Messages:[/bold] {session.message_count}\n"
    f"[bold]Namespace:[/bold] {session.namespace}"
)
console.print(Panel(details, title="Session Imported", expand=False))
console.print("[green]✓ OK[/green] Session imported")

Deviations from Spec

# Deviation Spec Requirement Actual
1 Missing Validation panel Checksum (verified/failed), Schema (compatible/incompatible), Actor Ref (resolved/unresolved) Not rendered
2 Missing Merge panel Existing (none/conflict), Strategy (create new/merge) Not rendered
3 Wrong panel title "Session Import" "Session Imported"
4 Missing input file path Input: /tmp/weekly-planning.json Not shown
5 Missing schema version Schema: v3 Not shown
6 Wrong success message "✓ OK Import completed" "✓ OK Session imported"

Steps to Reproduce

  1. Export a session: agents session export <SESSION_ID> /tmp/test-session.json
  2. Import the session: agents session import /tmp/test-session.json
  3. Observe the output — only a single "Session Imported" panel is shown; Validation and Merge panels are absent

Severity

High — the output format is a spec contract that CLI users and scripts depend on. Missing panels mean validation and merge strategy information is never surfaced to the user.

Subtasks

  • Read docs/specification.md section "agents session import" to confirm all required panel fields
  • Update import_session() in src/cleveragents/cli/commands/session.py to render the "Session Import" panel with Input, Session ID, Messages, and Schema fields
  • Add the "Validation" panel rendering with Checksum, Schema, and Actor Ref fields sourced from the import result
  • Add the "Merge" panel rendering with Existing and Strategy fields sourced from the import result
  • Rename the panel title from "Session Imported" to "Session Import"
  • Update the success message from "Session imported" to "Import completed"
  • Write a Behave scenario in features/ asserting all three panels are rendered with correct titles and fields
  • Run nox -e lint and nox -e typecheck to confirm no regressions
  • Run nox -e unit_tests to confirm all tests pass
  • Run nox -e coverage_report to confirm coverage remains ≥ 97%

Definition of Done

  • import_session() renders three separate Rich panels: "Session Import", "Validation", and "Merge"
  • "Session Import" panel includes: Input (file path), Session ID, Messages, and Schema fields
  • "Validation" panel includes: Checksum, Schema, and Actor Ref fields
  • "Merge" panel includes: Existing and Strategy fields
  • Success message reads "✓ OK Import completed"
  • A Behave scenario asserts all three panels and the success message are rendered correctly
  • All nox stages pass
  • Coverage >= 97%

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

## Metadata - **Branch**: `fix/session-import-rich-output-missing-panels` - **Commit Message**: `fix(cli): render spec-required Session Import, Validation, and Merge panels in session import command` - **Milestone**: v3.2.0 - **Parent Epic**: #868 ## Background and Context The `agents session import` command's rich output deviates significantly from the specification. The spec requires three distinct panels: "Session Import", "Validation", and "Merge". The current implementation only renders a single "Session Imported" panel with different fields, omitting the Validation and Merge panels entirely. Per `docs/specification.md` (section "agents session import"), the specification is the authoritative source of truth. When the codebase deviates from the specification, the code must be updated to match it. **Code Location**: `src/cleveragents/cli/commands/session.py`, `import_session()` function (lines ~633–670) ## Expected Behavior (from spec) ``` ╭─ Session Import ────────────────────────╮ │ Input: /tmp/weekly-planning.json │ │ Session ID: 01HXM3D3B2W4CQYQ3P4ZB8A5T1 │ │ Messages: 6 │ │ Schema: v3 │ ╰─────────────────────────────────────────╯ ╭─ Validation ────────────╮ │ Checksum: verified │ │ Schema: compatible │ │ Actor Ref: resolved │ ╰─────────────────────────╯ ╭─ Merge ──────────────╮ │ Existing: none │ │ Strategy: create new │ ╰──────────────────────╯ ✓ OK Import completed ``` ## Actual Behavior Only a single "Session Imported" panel is rendered: ```python details = ( f"[bold]Session ID:[/bold] {session.session_id}\n" f"[bold]Actor:[/bold] {session.actor_name or '(none)'}\n" f"[bold]Messages:[/bold] {session.message_count}\n" f"[bold]Namespace:[/bold] {session.namespace}" ) console.print(Panel(details, title="Session Imported", expand=False)) console.print("[green]✓ OK[/green] Session imported") ``` ### Deviations from Spec | # | Deviation | Spec Requirement | Actual | |---|-----------|-----------------|--------| | 1 | Missing **Validation panel** | Checksum (verified/failed), Schema (compatible/incompatible), Actor Ref (resolved/unresolved) | Not rendered | | 2 | Missing **Merge panel** | Existing (none/conflict), Strategy (create new/merge) | Not rendered | | 3 | Wrong panel title | `"Session Import"` | `"Session Imported"` | | 4 | Missing input file path | `Input: /tmp/weekly-planning.json` | Not shown | | 5 | Missing schema version | `Schema: v3` | Not shown | | 6 | Wrong success message | `"✓ OK Import completed"` | `"✓ OK Session imported"` | ## Steps to Reproduce 1. Export a session: `agents session export <SESSION_ID> /tmp/test-session.json` 2. Import the session: `agents session import /tmp/test-session.json` 3. Observe the output — only a single "Session Imported" panel is shown; Validation and Merge panels are absent ## Severity **High** — the output format is a spec contract that CLI users and scripts depend on. Missing panels mean validation and merge strategy information is never surfaced to the user. ## Subtasks - [ ] Read `docs/specification.md` section "agents session import" to confirm all required panel fields - [ ] Update `import_session()` in `src/cleveragents/cli/commands/session.py` to render the "Session Import" panel with `Input`, `Session ID`, `Messages`, and `Schema` fields - [ ] Add the "Validation" panel rendering with `Checksum`, `Schema`, and `Actor Ref` fields sourced from the import result - [ ] Add the "Merge" panel rendering with `Existing` and `Strategy` fields sourced from the import result - [ ] Rename the panel title from `"Session Imported"` to `"Session Import"` - [ ] Update the success message from `"Session imported"` to `"Import completed"` - [ ] Write a Behave scenario in `features/` asserting all three panels are rendered with correct titles and fields - [ ] Run `nox -e lint` and `nox -e typecheck` to confirm no regressions - [ ] Run `nox -e unit_tests` to confirm all tests pass - [ ] Run `nox -e coverage_report` to confirm coverage remains ≥ 97% ## Definition of Done - [ ] `import_session()` renders three separate Rich panels: "Session Import", "Validation", and "Merge" - [ ] "Session Import" panel includes: `Input` (file path), `Session ID`, `Messages`, and `Schema` fields - [ ] "Validation" panel includes: `Checksum`, `Schema`, and `Actor Ref` fields - [ ] "Merge" panel includes: `Existing` and `Strategy` fields - [ ] Success message reads `"✓ OK Import completed"` - [ ] A Behave scenario asserts all three panels and the success message are rendered correctly - [ ] All nox stages pass - [ ] Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-uat-tester
freemo added this to the v3.2.0 milestone 2026-04-05 02:54:23 +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

Starting implementation on branch fix/session-import-rich-output-missing-panels.

Plan: Fix import_session() in src/cleveragents/cli/commands/session.py to render three spec-required Rich panels (Session Import, Validation, Merge) with correct fields and update the success message. Add Behave BDD scenarios to assert all panels render correctly.

Difficulty assessment: Straightforward → starting at sonnet tier.


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

Starting implementation on branch `fix/session-import-rich-output-missing-panels`. **Plan:** Fix `import_session()` in `src/cleveragents/cli/commands/session.py` to render three spec-required Rich panels (Session Import, Validation, Merge) with correct fields and update the success message. Add Behave BDD scenarios to assert all panels render correctly. Difficulty assessment: Straightforward → starting at sonnet tier. --- **Automated by CleverAgents Bot** Supervisor: Implementation | Agent: ca-issue-worker
freemo removed this from the v3.2.0 milestone 2026-04-06 22:28:03 +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.

Blocks
Reference
cleveragents/cleveragents-core#2947
No description provided.