feat(resource): implement ResourceHandler sandbox and checkpoint methods #1067
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
cleveragents/cleveragents-core!1067
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/resource-handler-sandbox"
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
ResourceHandlerprotocol with four sandbox/lifecycle methods:create_sandbox,create_checkpoint,rollback_to, andproject_accessSandboxResult,CheckpointResult,RollbackResult,AccessResult) to the handler protocolGitCheckoutHandler(git tag / git checkout) andFsDirectoryHandler(shutil.copytree snapshot / clear-and-restore)create_sandboxdelegates toSandboxManager(idempotent — returns existing sandbox on second call)project_accessdelegates toPermissionService(local mode = always permit)Details
Protocol Extension (
protocol.py)SandboxResult—sandbox_id,sandbox_path,strategy,created(idempotency flag),messageCheckpointResult—checkpoint_id,plan_id,timestamp,snapshot_path,messageRollbackResult—success,checkpoint_id,restored_files,messageAccessResult—permitted,principal,action,scope,reasonBase Handler (
_base.py)create_sandbox(): delegates toSandboxManager.get_or_create_sandbox(), checks for existing sandbox first (idempotent)project_access(): delegates toPermissionService.check_permission(), falls back to local-mode permitcreate_checkpoint()/rollback_to(): raiseNotImplementedError(subclasses override)_resolve_strategy_str()helper extracted for DRY strategy resolutionHandler Implementations
create_checkpointviagit tag checkpoint-{plan_id}-{timestamp},rollback_toviagit checkout {tag} -- .with restored file count fromgit diff --name-onlycreate_checkpointviashutil.copytreeto temp snapshot dir,rollback_tovia clear sandbox + copy snapshot back. In-process_checkpointsClassVar store.NotImplementedErrorstubs (no savepoint infrastructure exists)Tests
ISSUES CLOSED: #836
Day 43 Review — Rebase Required
This PR has merge conflicts with
masterand cannot be merged in its current state. This is one of 9 Hamza PRs in the resource/LSP domain (v3.5.0-v3.6.0) that all have conflicts. These PRs likely share a common dependency chain and should be rebased sequentially.@hamza.khyari: Please rebase onto current
master. If multiple PRs depend on each other, start with the base PR in the chain and work upward.Rebase priority: HIGH — these PRs represent significant feature work that is blocked by merge conflicts. Every day they remain conflicted is a day they cannot be reviewed or merged.
Review: APPROVED
ResourceHandler sandbox and checkpoint methods implementation. Feature follows project conventions.
e9ed73d148f8f85b1bc3New commits pushed, approval review dismissed automatically according to repository settings
f8f85b1bc3c7518a265ec7518a265e8b1a2add0d8b1a2add0d7bb77aee5c