Checkpoint
checkpoint
Git checkpoint and rollback for atomic batch edits.
Creates a lightweight git stash before applying edits so the agent can rollback if the result is unsatisfactory.
create_checkpoint(root)
Create a git stash checkpoint.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
root
|
Path
|
Project root directory. |
required |
Returns:
| Type | Description |
|---|---|
str | None
|
The stash commit SHA, or |
str | None
|
to stash. |
Source code in packages/axm-edit/src/axm_edit/core/checkpoint.py
rollback(root, checkpoint)
Rollback to a previous checkpoint.
Restores the working tree to the state captured by
:func:create_checkpoint.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
root
|
Path
|
Project root directory. |
required |
checkpoint
|
str
|
The stash SHA returned by |
required |
Returns:
| Type | Description |
|---|---|
bool
|
|