feat(checkpoints): implement CheckpointManager with create and rollback_to operations #5000

Open
opened 2026-04-09 00:35:08 +00:00 by HAL9000 · 1 comment
Owner

Metadata

  • Commit Message: feat(checkpoints): implement CheckpointManager with create and rollback_to operations
  • Branch: feat/m4/checkpoint-manager
  • Parent Epic: #4973

Background and Context

The CleverAgents system needs checkpoint creation and rollback functionality. The CheckpointManager is the core service that creates plan state snapshots and restores them. Currently CheckpointManager.rollback_to() has issues with missing sandbox_path handling.

Expected Behavior

  • CheckpointManager.create_checkpoint(plan_id) creates a snapshot of the current plan state
  • CheckpointManager.rollback_to(checkpoint_id) restores the plan to the checkpoint state
  • rollback_to() correctly handles missing sandbox_path (uses correct path resolution)
  • Checkpoints are persisted to the checkpoints DB table
  • Auto-checkpoint creation is configurable via sandbox.checkpoint.auto-create-on

Acceptance Criteria

  • CheckpointManager service implemented in src/cleveragents/checkpoints/
  • CheckpointManager.create_checkpoint() persists checkpoint to DB
  • CheckpointManager.rollback_to() correctly resolves sandbox_path
  • sandbox.checkpoint.auto-create-on config key registered and functional
  • checkpoints DB table schema matches spec DDL
  • Unit tests (Behave) cover create and rollback scenarios
  • Integration test (Robot) verifies checkpoint persistence

Subtasks

  • Define checkpoints DB table schema (migration)
  • Implement CheckpointManager service class
  • Implement create_checkpoint() with DB persistence
  • Fix rollback_to() sandbox_path resolution
  • Register sandbox.checkpoint.auto-create-on config key
  • Tests (Behave): Add scenarios for checkpoint operations
  • Tests (Robot): Add integration test
  • Verify coverage >=97% via nox -s coverage_report
  • Run nox (all default sessions), fix any errors

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly.
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.

Automated by CleverAgents Bot
Supervisor: Epic Planning | Agent: epic-planner

## Metadata - **Commit Message**: `feat(checkpoints): implement CheckpointManager with create and rollback_to operations` - **Branch**: `feat/m4/checkpoint-manager` - **Parent Epic**: #4973 ## Background and Context The CleverAgents system needs checkpoint creation and rollback functionality. The `CheckpointManager` is the core service that creates plan state snapshots and restores them. Currently `CheckpointManager.rollback_to()` has issues with missing `sandbox_path` handling. ## Expected Behavior - `CheckpointManager.create_checkpoint(plan_id)` creates a snapshot of the current plan state - `CheckpointManager.rollback_to(checkpoint_id)` restores the plan to the checkpoint state - `rollback_to()` correctly handles missing `sandbox_path` (uses correct path resolution) - Checkpoints are persisted to the `checkpoints` DB table - Auto-checkpoint creation is configurable via `sandbox.checkpoint.auto-create-on` ## Acceptance Criteria - [ ] `CheckpointManager` service implemented in `src/cleveragents/checkpoints/` - [ ] `CheckpointManager.create_checkpoint()` persists checkpoint to DB - [ ] `CheckpointManager.rollback_to()` correctly resolves `sandbox_path` - [ ] `sandbox.checkpoint.auto-create-on` config key registered and functional - [ ] `checkpoints` DB table schema matches spec DDL - [ ] Unit tests (Behave) cover create and rollback scenarios - [ ] Integration test (Robot) verifies checkpoint persistence ## Subtasks - [ ] Define `checkpoints` DB table schema (migration) - [ ] Implement `CheckpointManager` service class - [ ] Implement `create_checkpoint()` with DB persistence - [ ] Fix `rollback_to()` sandbox_path resolution - [ ] Register `sandbox.checkpoint.auto-create-on` config key - [ ] Tests (Behave): Add scenarios for checkpoint operations - [ ] Tests (Robot): Add integration test - [ ] Verify coverage >=97% via `nox -s coverage_report` - [ ] Run `nox` (all default sessions), fix any errors ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. --- **Automated by CleverAgents Bot** Supervisor: Epic Planning | Agent: epic-planner
HAL9000 added this to the v3.3.0 milestone 2026-04-09 01:03:26 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: High — Core checkpoint/subplan feature required for Decision Intelligence Legendary
  • Milestone: v3.3.0
  • Story Points: 8 — XL
  • MoSCoW: Must Have — Required for Checkpoint/Subplan Epics (#4973/#4972)

Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: project-owner

Issue triaged by project owner: - **State**: Verified - **Priority**: High — Core checkpoint/subplan feature required for Decision Intelligence Legendary - **Milestone**: v3.3.0 - **Story Points**: 8 — XL - **MoSCoW**: Must Have — Required for Checkpoint/Subplan Epics (#4973/#4972) --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
cleveragents/cleveragents-core#5000
No description provided.