From a1ea40d2e7d504face324ef60848c5e5865da3d0 Mon Sep 17 00:00:00 2001 From: CleverThis Date: Fri, 8 May 2026 10:23:34 +0000 Subject: [PATCH] feat(plans): implement agents plan rollback command for checkpoint-based rollback Documents the agents plan rollback command (CLI entry at src/cleveragents/cli/commands/plan.py) that was integrated into master under Epic #8493. The command provides checkpoint-based plan state restoration, allowing plans to be restored to a previous checkpoint and resuming execution from that point. CHANGELOG.md entry added under [Unreleased] > ### Added section; CONTRIBUTORS.md updated with HAL 9000's contribution for this checkpoint-based rollback feature. ISSUES CLOSED: #8557 Epic: #8493 --- CHANGELOG.md | 4 ++++ CONTRIBUTORS.md | 1 + 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2cf431bfe..a7b40ede8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,10 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). traceback in the structlog warning entry. Removed `@tdd_expected_fail` tag from the TDD test so both scenarios run as normal regression guards. (#988) +### Added + +- **Plan Rollback Command** (#8557): Implemented `agents plan rollback []` for checkpoint-based plan state restoration in Epic #8493. The command restores a plan's sandbox to the state captured at a given checkpoint, discarding all decisions made after that checkpoint. The checkpoint can be specified as an optional positional second argument or via the `--to-checkpoint` named option. Supports `--yes/-y` flag to skip confirmation prompts and `--format/-f` for output format selection (rich/plain/json/yaml). Included with comprehensive BDD test coverage (>= 97%) and spec-aligned output formatting showing rollback summary, changes reverted, impact analysis, and post-rollback state panels. + ### Fixed - **Actor configuration validation incorrectly requires top-level provider field** (#4300): Actor configuration in V3 is now obtained from the nested configuration diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 9d040f20b..b42a9f1a5 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -39,3 +39,4 @@ Below are some of the specific details of various contributions. * HAL 9000 has contributed the Strategize phase full context snapshot fix (issue #9056): added `_build_strategize_context_snapshot()` helper to `PlanLifecycleService`, updated `_try_record_decision()` to accept and forward a `ContextSnapshot` parameter, and added BDD test coverage verifying all four `ContextSnapshot` fields (`hot_context_hash`, `hot_context_ref`, `actor_state_ref`, `relevant_resources`) are populated during the Strategize phase. * HAL 9000 has contributed the ACMS context path matching fix (PR #10975 / issue #10972): corrects `_path_matches()` and `_matches_pattern()` to properly match absolute fragment paths against relative glob patterns by auto-prefixing with `**/` before calling `PurePath.full_match()`, preventing silent inefficacy of include/exclude filters for absolute paths in fragment metadata. * HAL 9000 has contributed database resource types (PostgreSQL, SQLite) with transaction-based sandbox strategy: implemented ``DatabaseResourceHandler`` providing full CRUD operations (`read`, `write`, `delete`, `list_children`) and connection validation with automatic credential masking for PostgreSQL and SQLite backends. Includes ``TransactionSandbox`` infrastructure wired into ``SandboxFactory``, BDD test coverage in ``features/database_resources.feature``, and Robot Framework integration tests in ``robot/database_resources.robot`` (PR #10591 / issue #8608, Epic #8568). +* HAL 9000 has contributed the agents plan rollback command (PR #8674 / issue #8557): implemented checkpoint-based plan state restoration with the `agents plan rollback []` CLI command as part of Epic #8493, enabling plans to be restored to previous checkpoints, discarding post-checkpoint decisions, and resuming execution from the rolled-back state. Supported by `--yes/-y`, `--to-checkpoint`, and `--format/-f` flags. Includes comprehensive BDD test coverage (>= 97%) for rollback, decision discarding, and plan resume functionality. -- 2.52.0