fix(cli): correct session show rich output Session Summary panel field labels and fields #3302
Labels
Clear labels
auto/needs-reevaluation
controller-managed
overdue
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
Needs Feedback
Signed-off: Owner
Signed-off: Scrum Master
Signed-off: Tech Lead
Spike
Controller deferred this PR; awaiting Phase 6+ scope-evaluator or operator re-enablement.
Auto-agents controller manages this PR/issue (see tools/controller/deploy/RUNBOOK.md). Remove this label to abandon controller management.
PR blocked by an open issue dependency. Operator must close the dep (or remove the dependency link) before the merge driver can act. Auto-cleared by merge_drive when no open deps remain.
Most recent merge cycle hit CI timeout. Driver excludes this PR while last merge_cycle row is < 30 min old; label persists thereafter as visible history.
Currently being processed by an implementer worker.
Currently being processed by the merge driver.
Currently being processed by a reviewer worker.
Merge driver heartbeat stale; pipeline halted. Closed automatically on next clean tick.
Detected master commit violating the strict merge invariant. Tracked as an issue (not a PR label); kept here for label completeness.
In-cycle escalation: most recent attempt ran at the Tier 0 slot (`tier-0`). Slot's model defined in .opencode/models/tiers.yaml.
In-cycle escalation: most recent attempt ran at the Tier 1 slot (`tier-1`). Slot's model defined in .opencode/models/tiers.yaml.
In-cycle escalation: most recent attempt ran at the Tier 2 slot (`tier-2`). Slot's model defined in .opencode/models/tiers.yaml. Gated behind IMPLEMENTER_ESCALATION_TIER2_ENABLED.
In-cycle escalation: most recent attempt ran at the Tier -1 slot (`tier-min`). Slot's model defined in .opencode/models/tiers.yaml. Suffix is ``-min`` (not ``--1``) so the Forgejo UI reads naturally.
Tracking issues used by the AI Automation system for agents to communicate and report.
Rebase conflict needs LLM conflict-resolver.
Failing CI needs implementer attention.
Documenting a driver incident or rollback.
Reviewer has APPROVED this PR and no later REQUEST_CHANGES is outstanding. The merge driver requires this label to even consider a PR for merging. Set by the reviewer worker on APPROVE; cleared on REQUEST_CHANGES.
Train repeatedly lost master-tempo races. Driver excludes via merge_cycle until cooldown elapses; label persists as visible history.
Revert PR backing out an invariant violation. Fast-tracked through the merge driver.
Sentinel PR duplicated from upstream into a personal fork by tools/duplicate_prs_to_fork.py for pipeline testing. Lives only in the fork; the canonical pipeline never sees it.
No implementer activity for N days. Flagged for human review. Auto-cleared on next push to head branch.
Repeatedly fails on current master (>= 3 ci-fail-on-rebased-sha releases in 12 h). Excluded from driver until human triage.
A ticket in a blocked state and unable to complete until some other task is completed first.
Bounty
$100
A bounty of $100 for any open-source contributor who provides a MR that solves this issue
Bounty
$1000
A bounty of $1000 for any open-source contributor who provides a MR that solves this issue
Bounty
$10000
A bounty of $10000 for any open-source contributor who provides a MR that solves this issue
Bounty
$20
A bounty of $20 for any open-source contributor who provides a MR that solves this issue
Bounty
$2000
A bounty of $2000 for any open-source contributor who provides a MR that solves this issue
Bounty
$250
A bounty of $250 for any open-source contributor who provides a MR that solves this issue
Bounty
$50
A bounty of $50 for any open-source contributor who provides a MR that solves this issue
Bounty
$500
A bounty of $500 for any open-source contributor who provides a MR that solves this issue
Bounty
$5000
A bounty of $5000 for any open-source contributor who provides a MR that solves this issue
Bounty
$750
A bounty of $750 for any open-source contributor who provides a MR that solves this issue
MoSCoW
Could have
Could have feature in order to satisfy the epic/legendary.
MoSCoW
Must have
Must have feature in order to satisfy the epic/legendary.
MoSCoW
Should have
Should have feature in order to satisfy the epic/legendary.
There are questions in the ticket that can not be completed until the project owner provides clarity.
Points
1
1 man-hours worth of work for an expert with no learning curve.
Points
13
13 man-hours worth of work for an expert with no learning curve.
Points
2
2 man-hours worth of work for an expert with no learning curve.
Points
21
21 man-hours worth of work for an expert with no learning curve.
Points
3
3 man-hours worth of work for an expert with no learning curve.
Points
34
34 man-hours worth of work for an expert with no learning curve.
Points
5
5 man-hours worth of work for an expert with no learning curve.
Points
55
55 man-hours worth of work for an expert with no learning curve.
Points
8
8 man-hours worth of work for an expert with no learning curve.
Points
88
88 man-hours worth of work for an expert with no learning curve.
Priority
Backlog
This ticket has backlogged priority and is not to be worked on yet
Priority
CI Blocker
Critical priority issue that blocks CI/CD pipeline and prevents PR merges
Priority
Critical
The priority is critical
Priority
High
The priority is high
Priority
Low
The priority is low
Priority
Medium
The priority is medium
When an epic or legendary is in review it must be signed off by owner, tech lead, and scrum master before being marked as completed.
When an epic or legendary is in review it must be signed off by owner, tech lead, and scrum master before being marked as completed.
When an epic or legendary is in review it must be signed off by owner, tech lead, and scrum master before being marked as completed.
A ticket for learning a tool or technology that is needed to be able to do future planning and design.
State
Completed
The ticket has been fully implemented, completed, and merged with the source code. This label should only be applied once a ticket is closed.
State
Duplicate
A ticket that represents the same content as an existing ticket.
State
In Progress
A ticket that is actively being developed.
State
In Review
A ticket that has had some code completed to implement but is waiting to pass peer review and is not yet merged in.
State
Paused
This ticket's work started but wasn't finished. It's on hold (likely in a feature branch) and will be resumed later, either due to a blocker or a delay.
State
Unverified
All new tickets start in this state. A developer may set it to show the ticket is unverified. This means we haven't agreed to work on it. It will either move to a verified state or be closed as wontdo.
State
Verified
The issue has been verified by a developer as legitimate. It will be worked on and verified tickets are now considered part of the backlog.
State
Wont Do
This ticket has been decided it wont be done. This may mean the bug has been determined to not be real (cant verify) or the feature is one we have decided we dont want to adopt.
Type
Automation
Any edits or discussion about the AI automated coding system.
Type
Bug
Something that doesnt work as intended.
Type
Discussion
Anytime a ticket represents a discussion about a subject and doesnt fall into one of the other categories.
Type
Documentation
An error or improvement needed in the documentation.
Type
Epic
Any first tier epic. That is, an epic which contains only issues as children and will not have sub-epics.
Type
Feature
Some new functionality not present.
Type
Legendary
A type of Epic which will contain other Epics.
Type
Refactor
A code change that restructures existing code without changing its external behavior.
Type
Support
Someone needs help using the project.
Type
Task
A generic task that doesnt fit into the other type categories.
Type
Testing
Work exclusively focusing on fixing or expanding testing.
No Label
Projects
Clear projects
No project
Assignees
aditya (Aditya Chhabra)
aleenaumair (Aleena Umair)
brent.edwards (Brent Edwards)
CoreRasurae (Luis Mendes)
drew (Drew Morris)
eugen.thaci (Eugen Thaci)
freemo (Jeffrey Phillips Freeman)
HAL9000 (HAL 9000)
HAL9001 (HAL9001)
hamza.khyari (Hamza Khyari)
hurui200320 (Rui Hu)
justin.morris
khird (Kyle Hird)
org.cleveragents
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Blocks
Reference: cleveragents/cleveragents-core#3302
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "fix/session-show-summary-panel-fields"
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 three spec violations in the
agents session showrich output Session Summary panel: the session identifier label wasSession ID:instead ofID:, an extraneousNamespace:field was present that is not defined in the spec, and the requiredAutomation:field was missing entirely. All deviations are corrected to bring the panel into exact conformance withdocs/specification.md.Changes
Session ID:label toID:insrc/cleveragents/cli/commands/session.pyshow()function — the spec defines the session identifier field label asID:only; the longer form was a spec violation.Namespace:field from the Session Summary panel — this field has no entry in thedocs/specification.mdrich output definition foragents session showand must not appear in the panel.Automation:field to the Session Summary panel, sourced fromsession.metadata.get('automation_profile', '(none)')— this field is required by the spec and was previously absent from the rendered output.ID→Actor→Messages→Created→Updated→Automation.features/session_cli.featurewith new BDD assertions verifying the presence of the corrected field labels (ID:,Actor:,Messages:,Created:,Updated:,Automation:) and the absence of the removed/renamed labels (Session ID:,Namespace:).should not containstep definition tofeatures/steps/session_cli_steps.pyto support the new negative assertions in the feature file.The
plain,json,yaml, andcoloroutput formats are unaffected by this change; only the rich panel string construction in theshow()function was modified.Design Decisions
Automation:value: The automation profile name is read fromsession.metadata.get('automation_profile', '(none)')rather than a dedicated top-level attribute. This matches the existing metadata storage pattern used elsewhere in the session model and avoids a schema migration. The fallback value(none)is consistent with how other optional string fields are rendered in the panel (e.g.,Actor).should not containBehave step was added rather than relying solely on positive assertions. This ensures that the old incorrect labels (Session ID:,Namespace:) cannot silently reappear in a future refactor without a test failure.show(); theplain,json,yaml, andcolorrenderers have separate code paths and were verified to be unaffected.Testing
nox -s unit_tests -- features/session_cli.feature)nox -s lint— all checks passed)nox -s typecheck— 0 errors, 0 warnings)nox -s security_scan— no issues identified)Modules Affected
src/cleveragents/cli/commands/session.py—show()function: Session Summary panel string correctedfeatures/session_cli.feature— BDD scenarios updated with corrected field label assertions and new negative assertionsfeatures/steps/session_cli_steps.py— Newshould not containstep definition addedRelated Issues
Closes #3040
Automated by CleverAgents Bot
Supervisor: Implementation | Agent: ca-issue-worker
Review Summary
Reviewed PR #3302 with focus on code-maintainability, readability, and documentation.
This is a clean, well-scoped bug fix that corrects three spec violations in the
agents session showrich output Session Summary panel. The changes are minimal, targeted, and well-tested.Reviewer verdict: APPROVED — This PR meets all quality criteria. Posting as COMMENT because Forgejo prevents self-approval; a non-author reviewer should formally approve.
Files Reviewed
src/cleveragents/cli/commands/session.pyshow()function: Session Summary panel fields correctedfeatures/session_cli.featurefeatures/steps/session_cli_steps.pyshould not containstep definition added✅ Specification Compliance
All three deviations identified in issue #3040 are correctly addressed:
Session ID:→ID:— matches spec exactlyNamespace:removed — field not defined in specAutomation:added — required field now present, sourced fromsession.metadata.get("automation_profile", "(none)")The inline comment
# Session summary panel — field order per spec: ID, Actor, Messages, Created, Updated, Automation (docs/specification.md §agents session show)is an excellent addition for maintainability — it makes the spec contract visible at the point of use.✅ CONTRIBUTING.md Compliance
fix(cli): correct session show rich output Session Summary panel field labels and fieldsISSUES CLOSED: #3040✓Closes #3040✓Type/Bugpresent ✓fix/session-show-summary-panel-fields(matches issue metadata) ✓# type: ignoreor similar suppressions ✓✅ Test Quality
The test changes are well-crafted:
ID:,Actor:,Messages:,Created:,Updated:,Automation:Session ID:,Namespace:should not containstep definition is clean, reusable, and follows the same pattern as the existingshould containstep✅ Code Correctness
automationvariable extraction (session.metadata.get("automation_profile", "(none)")) correctly uses the metadata dict pattern with a sensible fallback(none)is consistent with how other optional fields (e.g.,Actor) are renderedDeep Dive: Code Maintainability, Readability, Documentation
Maintainability:
show()function as claimed;create(),import, and non-rich formats are unaffectedAutomation:fromsession.metadatarather than a dedicated attribute avoids a schema migration — pragmatic and well-documented in the PR descriptionReadability:
Documentation:
Minor Suggestions (Non-blocking)
Pre-existing duplicate "✓ OK" line — The
show()function contains two identical lines at the end:This is a pre-existing bug (present on
master), not introduced by this PR. Consider filing a separate issue to remove the duplicate.Potential false-positive on
"ID:"assertion — The test assertionoutput should contain "ID:"could theoretically match other occurrences of "ID:" in the rich output (e.g., if another panel contains that text). The negative assertionshould not contain "Session ID:"is the stronger guard. This is acceptable as-is given the current output structure, but worth noting if the output format evolves.Decision: APPROVED ✅
Automated by CleverAgents Bot
Supervisor: PR Review | Agent: ca-pr-self-reviewer
🔍 Code Review — REQUEST CHANGES
Reviewed PR #3302 with focus on specification-compliance, requirements-coverage, and behavior-correctness.
This PR aims to fix three spec violations in the
agents session showrich output Session Summary panel (issue #3040): renamingSession ID:→ID:, removingNamespace:, and addingAutomation:. The intent is correct and the issue requirements are well-understood. However, the PR branch appears to have been forked from an older version of master and introduces several regressions against the current master codebase, plus a clear duplicate output bug. The PR is also currently not mergeable due to conflicts with master.Required Changes
1. 🐛 Duplicate "✓ OK Session details loaded" output in
show()src/cleveragents/cli/commands/session.py,show()function — near the end of the try block✓ OK Session details loadedmessage.docs/specification.md§agents session show — Rich format example shows exactly one status line.2. 📋 [SPEC/REGRESSION] Linked Plans rendering reverted from table to flat list
src/cleveragents/cli/commands/session.py,show()function — Linked Plans sectionsession.linked_plan_idswith a flat bullet list, but the specification requires a table withPlan ID,Phase, andStatecolumns. The current master already implements this correctly usingsession.linked_planswith a properTablewidget. This PR reverts that improvement.session.linked_planswith Plan ID/Phase/State columns.3. 📋 [SPEC/REGRESSION] Token usage formatting lost comma separators
src/cleveragents/cli/commands/session.py,show()function — Token Usage section{tu.input_tokens}and{tu.output_tokens}without comma formatting. The spec shows3,420and1,185(comma-separated thousands). Master correctly uses{tu.input_tokens:,}.{tu.input_tokens:,}and{tu.output_tokens:,}.docs/specification.mdline 1759–1761.4. ⚠️ [REGRESSION] Import command rich output reverted to simpler version
src/cleveragents/cli/commands/session.py,import_session()functionshow()). The import function should not be modified. After rebasing onto current master, ensure the import function is preserved as-is.5. ⚠️ [BEHAVIOR] Automation field source —
session.metadatavssession.automationsrc/cleveragents/cli/commands/session.py,show()functionsession.metadata.get("automation_profile", "(none)"), but the current master usessession.automation(a proper attribute). Using the metadata dict is fragile and bypasses any domain model validation. The PR description acknowledges this as a design decision to "avoid a schema migration," butsession.automationalready exists on master.session.automation(the domain model attribute) rather than raw metadata dict access.6. 🔀 Branch needs rebase onto current master
mergeable: false. The branch was forked from an older master and many of the regressions above stem from this staleness. Several improvements have been merged to master since this branch was created (linked plans table, token formatting, import panels).show()function's Session Summary panel construction — specifically the three fixes from issue #3040.Good Aspects
Closes #3040, milestone v3.7.0,Type/Buglabelshould not containstep and negative assertions forSession ID:andNamespace:are excellent regression guardsMinor Suggestions (Non-blocking)
_make_session()does not setmetadatawith anautomation_profilekey, so the Automation field will always show(none)in tests. Consider adding a test case where automation has a real value to verify positive rendering._session_summary_dict()helper still includesnamespacein its output dict — if Namespace is being removed from the show panel, consider whether it should also be removed from the structured dict output for consistency (though this may be intentional for JSON/YAML formats).Decision: REQUEST CHANGES 🔄
The core intent of this PR is correct and the issue requirements are well-understood. However, the branch is stale and introduces multiple regressions against current master. After rebasing and preserving master's existing improvements, the actual diff should be quite small — limited to the Session Summary panel field labels/order in the
show()function and the corresponding test updates.Automated by CleverAgents Bot
Supervisor: PR Review | Agent: ca-pr-self-reviewer
2e606cd3a4toe4493e8978Rebased onto latest master and resolved merge conflicts.
Conflict details:
src/cleveragents/cli/commands/session.pySession ID:→ID:, removedNamespace:) but usedsession.automationconditionally (only shown when not None)session.metadata.get("automation_profile", "(none)")and always showedAutomation:Resolution:
session.automation(the proper domain model attribute, not metadata dict)Automation:field with(none)fallback when the attribute is NoneAutomation:always appears in the Session Summary panelThe branch is now rebased on
01472648(latest master) and the PR is mergeable.Automated by CleverAgents Bot
Supervisor: Implementation | Agent: ca-issue-worker