UAT: agents session export missing spec-required output panels — shows only success message instead of Session Export, Contents, and Integrity panels #3493

Open
opened 2026-04-05 18:38:28 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: fix/uat-session-export-missing-panels
  • Commit Message: fix(cli): add spec-required Rich output panels to agents session export
  • Milestone: None (backlog)
  • Parent Epic: #397

Background and Context

Code-level analysis of src/cleveragents/cli/commands/session.py against docs/specification.md §"agents session export" (lines 1987–2115).

The agents session export command is missing all three spec-required Rich output panels when exporting to a file. When exporting to stdout, it outputs only the raw JSON with no panels.

Current Behavior (Actual)

When exporting to a file (--output flag), the implementation (lines 607–617 of session.py) only prints:

✓ OK Session exported to /path/to/file.json

When exporting to stdout (no --output), it prints only the raw JSON content with no panels.

The export_session command has no Rich panel output at all for the file export path.

Expected Behavior (from spec §"agents session export", lines 1987–2115)

The spec requires three Rich panels to be displayed:

Panel 1 — Session Export:

╭─ Session Export ────────────────────╮
│ Session: 01HXM2A6K1P2E9Q9D4GQ7J4S7Z │
│ Output: /tmp/weekly-planning.json   │
│ Messages: 6                         │
│ Size: 24 KB                         │
│ Format: JSON                        │
╰─────────────────────────────────────╯

Panel 2 — Contents:

╭─ Contents ─────────────────╮
│ Messages: 6                │
│ Plan References: 1         │
│ Metadata Keys: 2           │
│ Actor Config: included     │
│ Schema Version: v3         │
╰────────────────────────────╯

Panel 3 — Integrity:

╭─ Integrity ──────────────────╮
│ Checksum: sha256:7a9b...42c1 │
│ Encrypted: no                │
╰──────────────────────────────╯

Followed by: ✓ OK Export completed

The JSON output format should also be structured as:

{
  "command": "agents session export ...",
  "status": "ok",
  "exit_code": 0,
  "data": {
    "session_export": { "session": "...", "output": "...", "messages": N, "size": "...", "format": "JSON" },
    "contents": { "messages": N, "plan_references": N, "metadata_keys": N, "actor_config": "included", "schema_version": "v3" },
    "integrity": { "checksum": "sha256:...", "encrypted": false }
  },
  "timing": { "duration_ms": 140 },
  "messages": [{ "level": "ok", "text": "Export completed" }]
}

Steps to Reproduce

  1. Create a session: agents session create
  2. Export to file: agents session export --output /tmp/test.json <SESSION_ID>
  3. Observe: Only "✓ OK Session exported to /tmp/test.json" is shown — no panels

Code Location

src/cleveragents/cli/commands/session.py, export_session() function, lines 543–632

Subtasks

  • Add "Session Export" Rich panel with Session, Output, Messages, Size, Format fields
  • Add "Contents" Rich panel with Messages, Plan References, Metadata Keys, Actor Config, Schema Version fields
  • Add "Integrity" Rich panel with Checksum (sha256:...) and Encrypted fields
  • Update success message to "✓ OK Export completed"
  • Implement JSON/YAML structured output format matching spec
  • Add Behave scenarios for export panel output
  • Run nox (all default sessions), fix any errors
  • Verify coverage >= 97%

Definition of Done

This issue is complete when:

  • agents session export displays all three spec-required panels: "Session Export", "Contents", "Integrity"
  • Success message reads "✓ OK Export completed"
  • JSON/YAML output format matches spec structure
  • All Behave scenarios pass
  • 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 details
  • 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
  • nox passes with coverage >= 97%

Backlog note: This issue was discovered during autonomous operation
on milestone . It does not block milestone completion and has been
placed in the backlog for human review and future milestone assignment.


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

## Metadata - **Branch**: `fix/uat-session-export-missing-panels` - **Commit Message**: `fix(cli): add spec-required Rich output panels to agents session export` - **Milestone**: None (backlog) - **Parent Epic**: #397 ## Background and Context Code-level analysis of `src/cleveragents/cli/commands/session.py` against `docs/specification.md` §"agents session export" (lines 1987–2115). The `agents session export` command is missing all three spec-required Rich output panels when exporting to a file. When exporting to stdout, it outputs only the raw JSON with no panels. ## Current Behavior (Actual) When exporting to a file (`--output` flag), the implementation (lines 607–617 of `session.py`) only prints: ``` ✓ OK Session exported to /path/to/file.json ``` When exporting to stdout (no `--output`), it prints only the raw JSON content with no panels. The `export_session` command has no Rich panel output at all for the file export path. ## Expected Behavior (from spec §"agents session export", lines 1987–2115) The spec requires three Rich panels to be displayed: **Panel 1 — Session Export:** ``` ╭─ Session Export ────────────────────╮ │ Session: 01HXM2A6K1P2E9Q9D4GQ7J4S7Z │ │ Output: /tmp/weekly-planning.json │ │ Messages: 6 │ │ Size: 24 KB │ │ Format: JSON │ ╰─────────────────────────────────────╯ ``` **Panel 2 — Contents:** ``` ╭─ Contents ─────────────────╮ │ Messages: 6 │ │ Plan References: 1 │ │ Metadata Keys: 2 │ │ Actor Config: included │ │ Schema Version: v3 │ ╰────────────────────────────╯ ``` **Panel 3 — Integrity:** ``` ╭─ Integrity ──────────────────╮ │ Checksum: sha256:7a9b...42c1 │ │ Encrypted: no │ ╰──────────────────────────────╯ ``` Followed by: `✓ OK Export completed` The JSON output format should also be structured as: ```json { "command": "agents session export ...", "status": "ok", "exit_code": 0, "data": { "session_export": { "session": "...", "output": "...", "messages": N, "size": "...", "format": "JSON" }, "contents": { "messages": N, "plan_references": N, "metadata_keys": N, "actor_config": "included", "schema_version": "v3" }, "integrity": { "checksum": "sha256:...", "encrypted": false } }, "timing": { "duration_ms": 140 }, "messages": [{ "level": "ok", "text": "Export completed" }] } ``` ## Steps to Reproduce 1. Create a session: `agents session create` 2. Export to file: `agents session export --output /tmp/test.json <SESSION_ID>` 3. Observe: Only `"✓ OK Session exported to /tmp/test.json"` is shown — no panels ## Code Location `src/cleveragents/cli/commands/session.py`, `export_session()` function, lines 543–632 ## Subtasks - [ ] Add "Session Export" Rich panel with Session, Output, Messages, Size, Format fields - [ ] Add "Contents" Rich panel with Messages, Plan References, Metadata Keys, Actor Config, Schema Version fields - [ ] Add "Integrity" Rich panel with Checksum (sha256:...) and Encrypted fields - [ ] Update success message to `"✓ OK Export completed"` - [ ] Implement JSON/YAML structured output format matching spec - [ ] Add Behave scenarios for export panel output - [ ] Run `nox` (all default sessions), fix any errors - [ ] Verify coverage >= 97% ## Definition of Done This issue is complete when: - [ ] `agents session export` displays all three spec-required panels: "Session Export", "Contents", "Integrity" - [ ] Success message reads `"✓ OK Export completed"` - [ ] JSON/YAML output format matches spec structure - [ ] All Behave scenarios pass - [ ] 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 details - [ ] 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 - [ ] `nox` passes with coverage >= 97% > **Backlog note:** This issue was discovered during autonomous operation > on milestone <M>. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-uat-tester
freemo added this to the v3.7.0 milestone 2026-04-05 20:36:13 +00:00
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
#397 Epic: Server & Autonomy Infrastructure
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#3493
No description provided.