feat: recover interrupted manifest runs - #20
Conversation
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThe PR adds resumable v3 run manifests while preserving v2 undo compatibility.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| run_manifest.py | Introduces v3 manifest persistence, operation reconciliation, and hash-verified recovery for incomplete apply runs. |
| run_renamer.py | Integrates manifest checkpoints into apply and undo and adds explicit resume CLI handling. |
| execution.py | Adds progress callbacks for applied, failed, rolled-back, and rollback-failed operation outcomes. |
| tests/test_run_manifest.py | Covers interrupted runs, retryable failures, failed rollback reconciliation, duplicate cleanup, and changed-source rejection. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Start apply and write running v3 manifest] --> B[Execute operation]
B -->|Applied| C[Checkpoint applied]
B -->|Failure| D[Checkpoint failed and roll back completed operations]
D --> E[Checkpoint rolled_back or rollback_failed]
C --> F{Run finished?}
E --> G[Keep manifest incomplete]
G --> H[Resume manifest]
H --> I{Paths and hashes reconcile?}
I -->|No| J[Block without mutation]
I -->|Yes| K[Checkpoint recovered operations]
K --> L[Apply verified pending operations]
L --> F
F -->|Yes| M[Finalize applied manifest]
F -->|No| B
Reviews (4): Last reviewed commit: "fix: recover verified rollback duplicate..." | Re-trigger Greptile
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Summary
--resume-manifestto reconcile incomplete apply runs and execute only verified pending operationsSafety impact
Verification
.venv/bin/python -m pytest tests/ -v --cov=. --cov-report=term-missing --cov-fail-under=80(55 passed; 88.32%).venv/bin/python -m interrogate .(100.0%)Closes the remaining R1-2 manifest recovery work.