Fix P1 deletion tracking bugs (bd-rbxi)

- bd-nqes: Made snapshot capture mandatory with fail-fast
- bd-mn9p: Added semantic JSON comparison (jsonEquals)
- bd-2ifg: Collect deletion errors and fail operation
- bd-8ayj: Atomic file ops with PID-specific temp files
- bd-aewm: Added defer cleanup for .merged temp file

All tests pass.

Amp-Thread-ID: https://ampcode.com/threads/T-5e744954-8a08-4697-960e-5f2a88d50c54
Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Steve Yegge
2025-11-06 18:47:06 -08:00
parent fa811300bd
commit e5a6c05e38
3 changed files with 57 additions and 13 deletions

View File

@@ -500,8 +500,10 @@ func createSyncFunc(ctx context.Context, store storage.Storage, autoCommit, auto
log.log("Exported to JSONL")
// Capture left snapshot (pre-pull state) for 3-way merge
// This is mandatory for deletion tracking integrity
if err := captureLeftSnapshot(jsonlPath); err != nil {
log.log("Warning: failed to capture snapshot for deletion tracking: %v", err)
log.log("Error: failed to capture snapshot (required for deletion tracking): %v", err)
return
}
if autoCommit {