Tracking issue for the B1 PR (branch feat/per-write-checkpoints-b1; PR to be opened after review).
Part of the file-write safety series — plan: easonLiangWorldedtech/Zoo-Code#33, epic: #1375. Item: B1 — Per-write checkpoint. Stacked on #1395 (S3 atomic publish); to be rebased onto main once #1395 lands.
Scope
- Every successful
write_to_file / edit_file / apply_patch records a shadow-git checkpoint after the write succeeds (one per write; apply_patch = one checkpoint after the whole patch), in addition to the existing pre-write and user-message checkpoints. The checkpoint reuses the existing shadow git at <globalStorage>/tasks/<taskId>/checkpoints and the existing checkpoint_saved plumbing — no new say/webview message types.
- Task start records one O(1) baseline checkpoint (
allowEmpty, suppressed, no worktree), exactly once per task.
- The per-write checkpoint and the baseline are non-blocking (fire-and-forget, crash-safe) so the write path keeps its ≈0 added latency.
- New setting
perWriteCheckpoints (boolean, default true) — the master switch for the B cluster, gating both behaviors; ships with the full persisted-setting round trip (types, ExtensionState, ClineProvider getState/getStateToPostToWebview, webview SettingsView cachedState save flow, CheckpointSettings UI, all locales).
Acceptance
- One checkpoint per successful write (mock-service assertions per tool); none on rejected or failed writes
- Task-start baseline recorded exactly once per task instance, cheap (no worktree)
- Rollback index: the checkpoint id is surfaced through the existing
checkpoint_saved / currentCheckpointUpdated plumbing
- Setting round trip: default
true; stored true/false/unset all resolve correctly in getStateToPostToWebview(); UI save via cachedState; import/export round trip
- CI green (ubuntu unit-test gate), 100% codecov patch coverage
Status
Tracking issue for the B1 PR (branch
feat/per-write-checkpoints-b1; PR to be opened after review).Part of the file-write safety series — plan: easonLiangWorldedtech/Zoo-Code#33, epic: #1375. Item: B1 — Per-write checkpoint. Stacked on #1395 (S3 atomic publish); to be rebased onto
mainonce #1395 lands.Scope
write_to_file/edit_file/apply_patchrecords a shadow-git checkpoint after the write succeeds (one per write;apply_patch= one checkpoint after the whole patch), in addition to the existing pre-write and user-message checkpoints. The checkpoint reuses the existing shadow git at<globalStorage>/tasks/<taskId>/checkpointsand the existingcheckpoint_savedplumbing — no new say/webview message types.allowEmpty, suppressed, no worktree), exactly once per task.perWriteCheckpoints(boolean, defaulttrue) — the master switch for the B cluster, gating both behaviors; ships with the full persisted-setting round trip (types, ExtensionState, ClineProvider getState/getStateToPostToWebview, webview SettingsView cachedState save flow, CheckpointSettings UI, all locales).Acceptance
checkpoint_saved/currentCheckpointUpdatedplumbingtrue; storedtrue/false/unset all resolve correctly ingetStateToPostToWebview(); UI save via cachedState; import/export round tripStatus