emma
62e4eaf7c1
fix(sync): make snapshot protection timestamp-aware (GH#865)
...
The --protect-left-snapshot mechanism was protecting ALL local issues
by ID alone, ignoring timestamps. This caused newer remote changes to
be incorrectly skipped during cross-worktree sync.
Changes:
- Add BuildIDToTimestampMap() to SnapshotManager for timestamp-aware
snapshot reading
- Change ProtectLocalExportIDs from map[string]bool to map[string]time.Time
- Add shouldProtectFromUpdate() helper that compares timestamps
- Only protect if local snapshot is newer than incoming; allow update
if incoming is newer
This fixes data loss scenarios where:
1. Main worktree closes issue at 11:31
2. Test worktree syncs and incorrectly skips the update
3. Test worktree then pushes stale open state, overwriting mains changes
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-01-03 13:27:36 -08:00
..
2026-01-02 16:06:09 -08:00
2026-01-02 00:19:14 -08:00
2026-01-02 01:49:22 -08:00
2025-12-24 00:06:41 -08:00
2025-12-28 20:48:37 -08:00
2026-01-01 10:51:51 -08:00
2025-12-28 16:40:43 -08:00
2025-12-27 16:21:08 -08:00
2026-01-03 11:53:14 -08:00
2026-01-03 13:25:15 -08:00
2026-01-03 13:25:15 -08:00
2025-12-20 03:24:51 -08:00
2025-12-28 16:23:45 -08:00
2025-12-22 21:15:41 -08:00
2025-12-30 16:51:14 -08:00
2025-12-24 00:06:41 -08:00
2025-12-28 10:05:16 -08:00
2025-12-27 16:02:15 -08:00
2025-12-23 01:56:19 -08:00
2026-01-01 12:42:43 -08:00
2025-12-28 16:40:43 -08:00
2025-12-28 18:43:09 -08:00
2025-12-24 00:08:10 -08:00
2025-12-30 00:00:25 -08:00
2025-12-30 00:00:25 -08:00
2026-01-02 00:02:20 -08:00
2025-12-29 14:03:39 -08:00
2026-01-01 10:46:56 -08:00
2026-01-01 10:46:56 -08:00
2026-01-02 14:01:56 -08:00
2026-01-02 16:00:54 -08:00
2025-12-23 12:06:42 -08:00
2025-12-27 16:02:15 -08:00
2026-01-01 10:53:59 -08:00
2026-01-01 20:06:13 -08:00
2026-01-02 17:10:43 -08:00
2025-12-31 13:14:15 -08:00
2026-01-01 10:48:14 -08:00
2026-01-01 23:55:40 -08:00
2026-01-02 16:06:09 -08:00
2025-12-27 16:02:15 -08:00
2025-12-28 10:05:16 -08:00
2025-12-29 14:43:00 -08:00
2025-12-29 14:43:00 -08:00
2025-12-24 00:06:41 -08:00
2025-12-28 10:05:16 -08:00
2025-12-24 00:06:41 -08:00
2025-12-22 21:30:57 -08:00
2025-12-30 00:27:12 -08:00
2025-12-24 00:06:41 -08:00
2025-12-31 13:14:15 -08:00
2025-12-30 16:49:50 -08:00
2025-12-27 16:02:15 -08:00
2025-12-24 00:06:41 -08:00
2026-01-03 13:24:28 -08:00
2025-12-24 00:06:41 -08:00
2025-12-28 10:05:16 -08:00
2026-01-02 16:06:09 -08:00
2026-01-03 13:22:52 -08:00
2026-01-01 20:06:13 -08:00
2025-12-27 16:02:15 -08:00
2025-12-24 00:06:41 -08:00
2025-12-31 12:24:17 -08:00
2025-12-21 15:50:10 -08:00
2025-12-24 13:03:27 -08:00
2025-12-30 15:52:33 -08:00
2025-12-28 16:40:43 -08:00
2025-12-23 01:56:19 -08:00
2025-12-30 16:29:28 -08:00
2025-12-30 18:29:03 -08:00
2025-12-28 18:43:09 -08:00
2025-12-29 14:39:43 -08:00
2025-12-28 20:48:37 -08:00
2025-12-28 20:48:37 -08:00
2025-12-28 20:48:37 -08:00
2026-01-02 00:02:38 -08:00
2025-12-28 10:05:16 -08:00
2025-12-31 13:14:15 -08:00
2025-12-29 14:39:43 -08:00
2025-12-31 13:14:15 -08:00
2025-12-24 00:07:52 -08:00
2025-12-31 13:14:15 -08:00
2025-12-24 00:06:41 -08:00
2025-12-31 11:39:17 -08:00
2025-12-31 11:39:17 -08:00
2026-01-01 18:17:12 -08:00
2025-12-21 23:08:00 -08:00
2026-01-01 10:53:59 -08:00
2025-12-23 01:56:19 -08:00
2026-01-01 10:51:22 -08:00
2026-01-01 11:05:05 -08:00
2025-12-30 14:13:32 -08:00
2026-01-02 16:14:35 -08:00
2026-01-02 13:11:36 -08:00
2026-01-02 16:40:47 -08:00
2025-12-31 13:14:15 -08:00
2025-12-28 20:48:37 -08:00
2025-12-27 16:02:15 -08:00
2026-01-01 19:46:34 -08:00
2026-01-01 19:46:34 -08:00
2025-12-29 14:33:19 -08:00
2025-12-27 16:02:15 -08:00
2025-12-24 00:06:41 -08:00
2026-01-03 13:27:36 -08:00
2026-01-03 13:27:36 -08:00
2025-12-22 21:15:41 -08:00
2025-12-30 21:21:46 -08:00
2025-12-28 18:43:09 -08:00
2025-12-20 17:09:50 -08:00
2025-12-30 20:40:09 -08:00
2025-12-28 20:48:37 -08:00
2025-12-28 18:43:09 -08:00
2025-12-20 17:09:50 -08:00
2025-12-28 18:43:09 -08:00
2025-12-30 18:19:53 -08:00
2025-12-30 16:45:51 -08:00
2025-12-28 10:05:16 -08:00
2025-12-30 16:07:31 -08:00
2026-01-01 10:51:51 -08:00
2025-12-28 10:05:16 -08:00
2025-12-30 16:58:10 -08:00
2025-12-30 16:58:10 -08:00
2025-12-28 18:43:09 -08:00
2025-12-28 18:43:09 -08:00
2025-12-28 18:43:09 -08:00
2026-01-01 14:18:49 -08:00
2025-12-27 16:02:15 -08:00
2026-01-01 20:06:13 -08:00
2026-01-01 20:06:13 -08:00
2025-12-30 14:13:32 -08:00
2025-12-30 14:13:32 -08:00
2026-01-01 23:55:40 -08:00
2025-12-28 18:43:09 -08:00
2025-12-23 01:56:19 -08:00
2026-01-02 00:02:20 -08:00
2025-12-22 23:30:08 -08:00
2026-01-02 18:03:27 -08:00
2025-12-20 17:09:50 -08:00
2025-12-30 00:06:42 -08:00
2025-12-30 00:06:42 -08:00
2025-12-30 14:13:32 -08:00
2025-12-30 00:06:42 -08:00
2025-12-30 00:06:42 -08:00
2025-12-31 00:33:11 -08:00
2025-12-29 17:10:26 -08:00
2025-12-31 13:08:41 -08:00
2025-12-29 16:17:51 -08:00
2025-12-31 13:04:19 -08:00
2026-01-02 14:08:22 -08:00
2025-12-30 14:13:32 -08:00
2025-12-30 06:59:51 -08:00
2026-01-02 16:00:54 -08:00
2025-12-27 16:02:15 -08:00
2026-01-02 01:31:19 -08:00
2026-01-02 01:35:32 -08:00
2025-12-30 16:29:28 -08:00
2025-12-28 10:05:16 -08:00
2025-12-20 17:09:50 -08:00
2025-12-29 14:17:44 -08:00
2025-12-29 14:17:44 -08:00
2025-12-22 18:47:18 -05:00
2025-12-31 00:33:11 -08:00
2025-12-31 00:05:53 -08:00
2026-01-01 10:51:51 -08:00
2025-12-27 21:33:01 -08:00
2025-12-20 17:09:50 -08:00
2025-12-20 17:09:50 -08:00
2026-01-01 20:06:13 -08:00
2026-01-01 20:06:13 -08:00
2025-12-31 13:14:15 -08:00
2025-12-27 16:02:15 -08:00
2025-12-27 16:02:15 -08:00
2025-12-28 16:40:43 -08:00
2025-12-27 22:24:19 -08:00
2025-12-27 22:24:19 -08:00
2025-12-31 13:14:15 -08:00
2025-12-20 17:09:50 -08:00
2025-12-29 12:43:22 -08:00
2025-12-29 13:16:47 -08:00
2025-12-22 01:26:45 -08:00
2025-12-27 16:21:08 -08:00
2025-12-20 17:09:50 -08:00
2025-12-27 16:02:15 -08:00
2025-12-31 13:14:15 -08:00
2025-12-24 00:06:41 -08:00
2026-01-02 00:02:38 -08:00
2025-12-21 23:11:48 -08:00
2025-12-28 18:43:09 -08:00
2025-12-27 16:02:15 -08:00
2025-12-30 16:00:22 -08:00
2026-01-01 20:06:13 -08:00
2025-12-28 10:05:16 -08:00
2026-01-03 13:27:36 -08:00
2025-12-24 00:10:14 -08:00
2025-12-24 00:10:14 -08:00
2025-12-30 15:57:08 -08:00
2025-12-30 15:57:08 -08:00
2025-12-20 13:14:39 -08:00
2025-12-20 17:22:43 -08:00
2025-12-29 14:39:43 -08:00
2025-12-30 18:04:26 -08:00
2025-12-30 18:11:08 -08:00
2025-12-28 10:05:16 -08:00
2026-01-01 19:31:12 -08:00
2026-01-03 13:24:28 -08:00
2025-12-27 16:02:15 -08:00
2025-12-28 10:05:16 -08:00
2025-12-30 18:11:08 -08:00
2026-01-02 00:05:12 -08:00
2026-01-03 13:24:28 -08:00
2025-12-24 23:33:34 -08:00
2026-01-03 12:44:16 -08:00
2025-12-28 20:48:37 -08:00
2025-12-30 16:29:28 -08:00
2025-12-30 16:29:28 -08:00
2025-12-27 16:02:15 -08:00
2025-12-27 16:08:34 -08:00
2025-12-27 16:02:15 -08:00
2025-12-27 16:02:15 -08:00
2026-01-01 20:06:13 -08:00
2026-01-02 16:14:35 -08:00
2025-12-20 17:09:50 -08:00
2025-12-30 17:14:55 -08:00
2025-12-30 16:29:28 -08:00
2026-01-02 01:07:34 -08:00
2025-12-28 10:05:16 -08:00
2026-01-02 01:07:34 -08:00
2025-12-27 21:27:44 -08:00
2026-01-01 23:55:40 -08:00
2025-12-29 14:39:43 -08:00
2025-12-27 16:02:15 -08:00