Commit Graph

2 Commits

Author SHA1 Message Date
HAL9000 5febbbc93b fix(plan-cli): fix lint and BDD step issues for plan rollback command
CI / push-validation (pull_request) Successful in 57s
CI / lint (pull_request) Successful in 1m21s
CI / quality (pull_request) Successful in 1m19s
CI / typecheck (pull_request) Successful in 1m32s
CI / build (pull_request) Successful in 1m22s
CI / security (pull_request) Successful in 1m35s
CI / helm (pull_request) Successful in 1m33s
CI / unit_tests (pull_request) Successful in 6m48s
CI / docker (pull_request) Successful in 1m50s
CI / integration_tests (pull_request) Successful in 10m28s
CI / coverage (pull_request) Successful in 11m59s
CI / status-check (pull_request) Successful in 3s
- Add list-mode to rollback_plan: when no checkpoint ID given, list
  available checkpoints instead of aborting (fixes feature file scenario)
- Add CleverAgentsError import to rollback_plan function scope
- Rewrite plan_cli_rollback_steps.py with correct mocking pattern:
  patch get_container, use plan_app with ["rollback", ...] args,
  :S parse modifiers to avoid AmbiguousStep, proper exception hierarchy
- Rename 4 conflicting @then step patterns to be rollback-specific:
  "the rollback output should be valid JSON/YAML",
  "the plan rollback should succeed",
  "no rollback confirmation prompt should be shown"
- Fix JSON/YAML assertion steps to check format_output envelope
  structure (data is nested under "data" key in the envelope)
- Update plan_cli_rollback.feature to match renamed step patterns

ISSUES CLOSED: #9612
2026-06-06 16:25:55 -04:00
HAL9000 5e51ab727a feat(cli): implement plan rollback CLI command for checkpoint-based plan state restoration
Adds end-to-end testing support for the new plan rollback CLI feature:
- plan_cli_rollback.feature introduces BDD scenarios for plan rollback, covering both listing a plan's rollbacks and restoring from a specific checkpoint.
- plan_cli_rollback_steps.py provides step definitions necessary to execute the feature tests and validate CLI behavior.
- Tests validate two modes: list mode (agents plan rollback <plan-id>) and restore mode (agents plan rollback <plan-id> <checkpoint-id>), ensuring atomic rollback, proper error handling, and correct output formatting.
- These tests integrate with the CLI testing framework and Milestone v3.3.0, aligning with the CLI component's roadmap.

ISSUES CLOSED: #9561
2026-06-06 16:25:55 -04:00