gsxdsm
11ed9cb409
fix(engine): defend autostash drop against TOCTOU race
...
dropAutostashBySha resolved SHA→stash@{N} then ran git stash drop ${ref}
non-atomically. Any other process (interactive shell, parallel merger,
fix-agent) pushing a stash between resolve and drop shifted the index, so
we silently dropped the wrong entry while leaving ours behind. The task
log then claimed "Restored pre-merge autostash X cleanly" even though the
stash was still in the list — observed on FN-3558 (e81e922) and others.
Verify the ref still resolves to our SHA via git rev-parse before dropping;
on mismatch, re-resolve and retry up to 5x. Return success/failure so the
caller can record honest status to the task feed instead of unconditionally
logging "cleanly".
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-08 14:05:06 -07:00
..
2026-05-06 17:25:19 -07:00
2026-05-08 11:43:11 -07:00
2026-05-01 00:33:17 -07:00
2026-05-07 16:09:35 -07:00
2026-05-02 02:07:12 -07:00
2026-04-24 19:39:20 -07:00
2026-05-05 06:32:33 -07:00
2026-04-26 16:14:35 -07:00
2026-04-25 13:21:02 -07:00
2026-05-04 15:21:40 -07:00
2026-05-01 12:43:36 -07:00
2026-05-07 16:09:35 -07:00
2026-05-05 20:51:44 -07:00
2026-04-24 19:39:20 -07:00
2026-05-03 11:06:27 -07:00
2026-05-08 12:05:46 -07:00
2026-05-07 17:26:51 +02:00
2026-05-06 18:04:19 -07:00
2026-04-30 10:19:54 -07:00
2026-05-07 23:21:05 -07:00
2026-04-30 19:11:38 -07:00
2026-05-06 19:55:55 -07:00
2026-05-06 13:38:23 -07:00
2026-05-06 19:55:55 -07:00
2026-05-07 23:21:05 -07:00
2026-05-07 23:21:05 -07:00
2026-05-07 23:21:05 -07:00
2026-05-07 23:21:05 -07:00
2026-05-08 14:05:06 -07:00
2026-05-07 23:21:05 -07:00
2026-05-07 23:21:05 -07:00
2026-05-07 23:21:05 -07:00
2026-05-03 23:08:05 -07:00
2026-05-08 13:43:38 -07:00
2026-04-30 00:20:51 -07:00
2026-05-08 02:00:08 -07:00
2026-05-05 22:18:35 -07:00
2026-05-06 09:43:51 -07:00
2026-05-06 10:18:27 -07:00
2026-05-06 10:18:27 -07:00
2026-05-07 16:09:35 -07:00
2026-05-04 17:22:21 -07:00
2026-05-07 23:21:05 -07:00
2026-05-06 13:38:23 -07:00
2026-04-29 07:35:23 -07:00
2026-05-04 15:33:39 -07:00
2026-04-26 12:45:05 -07:00
2026-05-05 01:40:36 -07:00
2026-05-08 06:46:12 -07:00
2026-05-08 06:46:12 -07:00
2026-04-24 19:39:20 -07:00
2026-04-24 19:39:20 -07:00
2026-04-24 19:39:20 -07:00
2026-04-24 19:39:20 -07:00
2026-05-07 23:21:05 -07:00
2026-04-24 19:39:20 -07:00
2026-04-29 17:30:39 -07:00
2026-05-06 07:52:58 -07:00
2026-05-06 07:52:58 -07:00
2026-05-02 19:55:54 -07:00
2026-05-07 23:21:05 -07:00
2026-05-07 18:00:18 -07:00
2026-05-07 23:21:05 -07:00
2026-04-27 11:58:31 -07:00
2026-05-06 18:04:19 -07:00
2026-05-07 11:15:27 -07:00
2026-05-08 11:43:11 -07:00
2026-05-08 11:43:11 -07:00
2026-05-06 21:44:06 -07:00
2026-05-07 04:17:52 -07:00
2026-05-02 00:04:29 -07:00
2026-05-07 23:21:05 -07:00
2026-04-24 19:39:20 -07:00
2026-04-15 19:53:22 -07:00
2026-05-06 07:52:58 -07:00
2026-04-24 19:39:20 -07:00
2026-04-04 13:59:08 -07:00
2026-04-26 02:20:28 -07:00
2026-04-24 19:39:20 -07:00
2026-04-30 10:19:54 -07:00
2026-04-24 19:39:20 -07:00
2026-05-04 13:17:57 -07:00
2026-05-04 13:17:57 -07:00
2026-05-07 11:18:56 -07:00
2026-05-06 00:05:55 -07:00
2026-04-24 19:39:20 -07:00
2026-04-24 19:39:20 -07:00
2026-04-24 19:39:20 -07:00
2026-04-30 10:19:54 -07:00
2026-04-26 16:14:35 -07:00
2026-05-07 18:07:12 -07:00
2026-05-07 23:21:05 -07:00
2026-05-06 07:23:38 -07:00
2026-05-06 03:52:18 -07:00
2026-05-02 00:04:29 -07:00
2026-04-27 04:51:29 -07:00
2026-05-06 09:43:51 -07:00
2026-04-27 08:33:03 -07:00
2026-05-04 07:18:30 -07:00
2026-04-26 12:45:05 -07:00
2026-05-07 06:45:45 -07:00
2026-05-06 00:05:55 -07:00
2026-05-07 17:26:51 +02:00
2026-04-26 13:00:56 -07:00
2026-04-24 19:39:20 -07:00
2026-05-04 23:59:52 -07:00
2026-05-07 15:53:58 -07:00
2026-04-30 05:43:13 -07:00
2026-04-24 19:39:20 -07:00
2026-05-07 17:26:51 +02:00
2026-05-02 19:55:54 -07:00
2026-04-24 19:39:20 -07:00
2026-05-03 17:24:19 -07:00