fix(cli): add spec-required Validation and Merge panels and correct title/message in agents session import #3460
No reviewers
Labels
No labels
auto/needs-reevaluation
controller-managed
auto/blocked-by-deps
auto/ci-timeout
auto/claimed-implementer
auto/claimed-merge
auto/claimed-reviewer
auto/driver-down
auto/invariant-violation
auto/last-attempt-tier-0
auto/last-attempt-tier-1
auto/last-attempt-tier-2
auto/last-attempt-tier-min
Automation Tracking
auto/needs-conflict-resolution
auto/needs-implementer
auto/postmortem
auto/ready-to-merge
auto/restart-throttled
auto/revert
auto/sentinel
auto/stale-inactivity
auto/unstable
Blocked
Bounty
$100
Bounty
$1000
Bounty
$10000
Bounty
$20
Bounty
$2000
Bounty
$250
Bounty
$50
Bounty
$500
Bounty
$5000
Bounty
$750
MoSCoW
Could have
MoSCoW
Must have
MoSCoW
Should have
Needs Feedback
Points
1
Points
13
Points
2
Points
21
Points
3
Points
34
Points
5
Points
55
Points
8
Points
88
Priority
Backlog
Priority
CI Blocker
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Signed-off: Owner
Signed-off: Scrum Master
Signed-off: Tech Lead
Spike
State
Completed
State
Duplicate
State
In Progress
State
In Review
State
Paused
State
Unverified
State
Verified
State
Wont Do
Type
Automation
Type
Bug
Type
Discussion
Type
Documentation
Type
Epic
Type
Feature
Type
Legendary
Type
Refactor
Type
Support
Type
Task
Type
Testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
cleveragents/cleveragents-core!3460
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/session-import-missing-validation-merge-panels"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Fixes five spec deviations in the
agents session importRich output rendering (issue #3428).Changes
Core Fix (
src/cleveragents/cli/commands/session.py)The
import_session()CLI function previously rendered a single panel with wrong title and wrong fields. This PR:"Session Imported"→"Session Import"per spec §"agents session import"ActorandNamespacewithInput(file path) andSchema(version)Validationpanel withChecksum: verified,Schema: compatible,Actor Ref: resolved/noneMergepanel withExisting: none,Strategy: create new"Session imported"→"Import completed"Data Sources
Input: the--inputfile path argumentSchema:data['schema_version']from the import JSON (read before calling service)Actor Ref:"resolved"ifactor_namepresent in import data, else"none"Checksum/Schemavalidation: always"verified"/"compatible"— service raisesSessionImportErroron failure before reaching this codeMerge Existing/Strategy: always"none"/"create new"— import always creates a new session with a fresh ULIDTests Updated
features/session_cli.feature: updated existing scenario + added new scenario verifying all panel fieldsfeatures/session_cli_coverage_boost.feature: updated assertion from"Session Imported"to"Session Import"+"Import completed"robot/helper_session_cli.py: updatedexport_import_roundtrip()assertions + addedimport_rich_panels()test functionrobot/session_cli.robot: addedSession Import Rich Output Panelstest caseBefore / After
Before:
After (matches spec):
Closes #3428
Automated by CleverAgents Bot
Supervisor: Implementation | Agent: ca-issue-worker
agents session importRich output missing Validation and Merge panels; wrong panel title and success message #3428Code Review — PR #3460
Focus Areas: specification-compliance, behavior-correctness, api-consistency
Reviewed the full diff across all 5 changed files against the linked issue #3428, the spec (§"agents session import"), and CONTRIBUTING.md standards.
✅ What Looks Good
Specification Compliance (Core Fix)
"Session Imported"→"Session Import"per specActor/Namespace→Input(file path) /Schema(version)Validationpanel added withChecksum,Schema,Actor Reffields — matches spec layoutMergepanel added withExisting,Strategyfields — matches spec layout"Session imported"→"Import completed"Input,Session ID,Messages,Schema)Behavior Correctness
schema_versionandactor_nameare correctly extracted from thedatadict before callingservice.import_session(data), ensuring the values are available for panel renderingactor_ref_statuslogic ("resolved"ifactor_namepresent, else"none") is correctSessionImportErrorandDatabaseErrorstill propagate properlyTest Quality
features/session_cli.feature: Updated existing import scenario + added new "Import session shows correct panel fields" scenario that verifies all 8 field labels across all 3 panels — thoroughfeatures/session_cli_coverage_boost.feature: Import scenario assertions updated to match new outputrobot/helper_session_cli.py: Addedimport_rich_panels()function with comprehensive assertions for every panel and fieldrobot/session_cli.robot: AddedSession Import Rich Output Panelsintegration test caseCommit Message
fix(cli): add spec-required Validation and Merge panels...Closes #3428footer⚠️ Issues Found
1. [PROCESS] Unrelated Commit Included in PR — Severity: High
The branch
fix/session-import-missing-validation-merge-panelscontains two commits ahead of master:260d54a2fix(tui): make /help command list all catalogued slash commands from SLASH_COMMAND_SPECSbffec08ffix(cli): add spec-required Validation and Merge panels...Commit
260d54a2is for an entirely different issue (#3434 — TUI /help command) and is not related to this PR's scope (session import panels). This violates the atomic commit principle from CONTRIBUTING.md: "Each commit should represent a single, complete, and self-contained piece of work that resolves one issue."Required: Rebase the branch so it only contains the commit for #3428. The #3434 commit should be on its own branch/PR.
2. [PROCESS] Missing Milestone — Severity: Medium
The PR has
"milestone": null. Per CONTRIBUTING.md, every PR must be assigned to a milestone. The linked issue #3428 notes it's a backlog item, but the PR still needs a milestone assignment (even if it's a backlog/unscheduled milestone).3. [CODE]
# type: ignoreinrobot/helper_session_cli.py— Severity: LowLine at the bottom of
robot/helper_session_cli.py:This
# type: ignoresuppression is forbidden by CONTRIBUTING.md. While this line was pre-existing on master, this PR modifies the file (addsimport_rich_panelsfunction and updates_COMMANDSdict) and should fix the violation while touching the file. The fix is straightforward — use a proper type annotation for_COMMANDS(e.g.,dict[str, Callable[[], None]]instead ofdict[str, object]).4. [DESIGN] Hardcoded Validation/Merge Panel Values — Severity: Informational
The Validation panel always shows
Checksum: verified,Schema: compatibleand the Merge panel always showsExisting: none,Strategy: create new. The PR description explains this is becauseservice.import_session()raisesSessionImportErroron validation failure before reaching the panel rendering code, and import always creates new sessions.This is logically correct but means the panels are purely cosmetic — they can never show any other values. This is worth noting for future consideration:
No action required now, but consider adding a
# TODOcomment noting this coupling.Summary
# type: ignoreprohibitionOverall: The core implementation is solid and correctly addresses all 5 spec deviations from issue #3428. The test coverage is comprehensive across both Behave and Robot Framework. However, the branch needs to be rebased to remove the unrelated commit for #3434, and the PR needs a milestone assignment before merge.
Automated by CleverAgents Bot
Reviewer: Code Quality | Agent: ca-pr-self-reviewer
agents session importRich output missing Validation and Merge panels; wrong panel title and success message #3428