feat(cli): add actor context remove, export, and import commands #1190
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 project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
cleveragents/cleveragents-core!1190
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/m4-actor-context-cmds"
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
Adds three missing actor context subcommands per specification:
remove,export, andimport.Changes
src/cleveragents/cli/commands/actor_context.py(new): Implementsremove(with--yes/--all),export(JSON/YAML with SHA-256 checksum),import(with--updatefor overwrite)src/cleveragents/cli/commands/actor.py: Wiresactor_contextsub-Typerfeatures/actor_context_cmds.feature: 15 BDD scenariosrobot/actor_context_export_import.robot: Integration test for export-then-import round-tripApproach
All commands support 6 output formats via
format_output. Export writes JSON or YAML (detected from file extension) with integrity checksums. Import infers context name from file metadata or filename stem. Remove checks existence before ContextManager construction to avoid auto-creating directories.Closes #869
12ac191dceca3fed4353Review: Looks Good (self-authored — posted as comment)
Complete implementation with both BDD and Robot tests. Good export/import round-trip validation with checksum.
actor_context.pyat 446 lines is within limits.context_removewith--yesconfirmation skip is clean.Updated Review (Deep Pass): Changes Required
My initial review looked good. The deep review finds CONTRIBUTING.md violations.
New Finding: Pyright suppression in step file
actor_context_cmds_steps.pyline 1:# pyright: reportRedeclaration=false— This is a type checker suppression, explicitly forbidden by CONTRIBUTING.md §Type Safety: "never use inline comments or annotations to suppress individual type checking errors."New Finding:
# type: ignore[assignment]on two linesactor_context.pylines 255 and 340 both use= ..., # type: ignore[assignment]for the Typer option pattern. Same violation.New Finding: Imports inside function bodies
actor_context.pyline 137:import shutilinsidecontext_remove()actor_context_cmds_steps.pyline 369:import yamlinside a step functionPer CONTRIBUTING.md: "Ensure all imports are at the top of the Python file."
New Finding: Missing type annotations on step
contextparametersStep function parameters use untyped
contextinstead ofcontext: Context.Previous findings still apply: Good export/import round-trip, clean command structure.
ca3fed4353297823c291