| … | … | @@ -2255,7 +2259,29 @@ const makeWsRpcLayer = ( | |
| 2256 | 2260 | observeRpcEffect( | |
| 2257 | 2261 | WS_METHODS.vcsRemoveWorktree, | |
| 2258 | - | gitWorkflow.removeWorktree(input).pipe(Effect.tap(() => refreshGitStatus(input.cwd))), | |
| 2262 | + | Effect.all([ | |
🟠 High src/ws.ts:2262
The ownership check can return no matching thread while a thread moves between active and archived, allowing gitWorkflow.removeWorktree(input) to delete a worktree still referenced by that thread. getShellSnapshot() and getArchivedShellSnapshot() are read independently, so an unarchive between those reads makes the thread absent from both results; perform the ownership lookup and removal decision atomically, or use one query covering all non-deleted rows.
✅ Resolved in 896ed9a0db5fabf4925eeca2fcaba7006d9b2051
Fixed in 896ed9a0d — the two independent snapshot reads are gone; ownership now comes from a single atomic query (listThreadIdsByWorktreePath) over every non-deleted row, so a thread moving between active and archived can no longer fall between reads. The drift-adoption check in CheckpointReactor uses the same query.
Sorry, I'm unable to act on this request because you do not have permissions within this repository.