feat(correction): wire checkpoint rollback into correction service revert flow #1199
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!1199
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/correction-checkpoint-rollback"
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
Wires checkpoint rollback into the correction service revert flow, enabling automatic workspace snapshots, physical artifact archival, and selective rollback to any checkpoint.
Changes
src/cleveragents/application/services/checkpoint_service.py: Addedcreate_workspace_snapshot(),selective_rollback(),archive_artifacts(),_compute_diff_snapshot()for diff-based storagesrc/cleveragents/application/services/correction_service.py: Addedrevert_decisions()with checkpoint rollback invocation,_archive_decision_artifacts()for physical archival, atomic semantics inexecute_revert()src/cleveragents/application/container.py: Wiredcheckpoint_serviceintoCorrectionService(also fixes #986)src/cleveragents/cli/commands/plan.py: Added--to-checkpointoption torollback;correctuses container-provided servicesrc/cleveragents/domain/models/core/checkpoint.py: Addedpre_decisionto checkpoint_typefeatures/correction_checkpoint_rollback.feature: 12 BDD scenariosfeatures/tdd_correction_checkpoint_wiring.feature: Removed@tdd_expected_fail(bug #986 fixed)Bonus Fix
This PR also fixes bug #986 (CorrectionService missing checkpoint_service wiring) by properly wiring
checkpoint_servicein the DI container and removing the@tdd_expected_failtag from its TDD test.Closes #943
7467fa304c643760004cReview: Looks Good (self-authored — posted as comment)
Clean DI fix wiring checkpoint rollback into the correction service.
Notes
self._checkpoint_service._resolve_sandbox_path(plan_id)accesses a private method across service boundaries. Consider making_resolve_sandbox_path()public onCheckpointService.plan correctnow properly resolvesCorrectionServicefrom the container — significant DI hygiene improvement.rollback_to_checkpointtoselective_rollback.Updated Review (Deep Pass): Changes Required
My initial review flagged only the private method access. The deep review reveals more issues.
New Finding: Missing Robot Framework Integration Test
No
robot/correction_checkpoint_rollback.robotexists. The PR has BDD tests but no Robot integration test. Per CONTRIBUTING.md §Multi-Level Testing Mandate, integration tests are required.New Finding: Missing argument validation on new public methods
create_workspace_snapshot():plan_id,sandbox_ref,decision_idnot validated for empty/nullselective_rollback():plan_id,checkpoint_idnot validatedrevert_decisions():plan_id,target_decision_idnot validatedPer CONTRIBUTING.md §Argument Validation: "All public methods must validate arguments."
New Finding: Multiple silent exception catches
selective_rollback()line ~407: HEAD capture catchesExceptionwith no logging — setscurrent_head = None_compute_diff_snapshot()line ~518: catchesException, returns empty list silently_archive_decision_artifacts()line ~804: catchesException, logs at debug level, returns empty listPrevious finding confirmed:
_checkpoint_service._resolve_sandbox_path()accesses private method across class boundary.b0a62ed37c38e05ac45a