# U03 — Stop delivered inside deletion-triggered sweep

Run the same head test file against each source checkout, with verbose output. No RPC or real-provider release is claimed for this unit-only row.

| Before<br>[dc84b0962e](https://github.com/pingdotgg/t3code/commit/dc84b0962efa4f4e05ef392c08986a9cd7c994d1) | After<br>[06c0db5ad7](https://github.com/pingdotgg/t3code/commit/06c0db5ad787d743bd95e64935c0d111ad68f8e1) | Diff |
| --- | --- | --- |
| ✓ src/storageCleanup.test.ts > deleted thread worktrees > removes a deleted thread's worktree when its session stops during the deletion's sweep 215ms | ✓ src/storageCleanup.test.ts > deleted thread worktrees > removes a deleted thread's worktree when its session stops during the deletion's sweep 241ms | Both pass; a stop inside the deletion sweep queues the needed follow-up. |

## Before — [dc84b0962e](https://github.com/pingdotgg/t3code/commit/dc84b0962efa4f4e05ef392c08986a9cd7c994d1)

```text
   → expected 1 to be +0 // Object.is equality
 ✓ src/storageCleanup.test.ts > deleted thread worktrees > removes a deleted thread's worktree when its session stops during the deletion's sweep 215ms
 ↓ src/storageCleanup.test.ts > deleted thread worktrees > waits out the settle grace of a subagent that just settled
 ↓ src/storageCleanup.test.ts > orphan worktree reports > keeps orphan results visible when thread results fill the report
 ↓ src/storageCleanup.test.ts > orphan worktree reports > skips an ancestor of a referenced thread worktree (canonical)
 ↓ src/storageCleanup.test.ts > orphan worktree reports > skips an ancestor of a referenced thread worktree (win32)
 ↓ src/storageCleanup.test.ts > orphan worktree reports > skips an ancestor of a referenced thread worktree (linux)
 ↓ src/storageCleanup.test.ts > orphan worktree reports > continues reporting when a project root cannot be probed
 ↓ src/storageCleanup.test.ts > orphan worktree reports > reports a linked orphan's size without removing its files (nested)
 ↓ src/storageCleanup.test.ts > orphan worktree reports > reports a linked orphan's size without removing its files (direct)
 ↓ src/storageCleanup.test.ts > orphan worktree reports > does not report a folder referenced by a thread (active)
 ↓ src/storageCleanup.test.ts > orphan worktree reports > does not report a folder referenced by a thread (outside-active-snapshot)
 ↓ src/storageCleanup.test.ts > orphan worktree reports > does not report a folder containing a project checkout (exact)
 ↓ src/storageCleanup.test.ts > orphan worktree reports > does not report a folder containing a project checkout (nested)
 ↓ src/storageCleanup.test.ts > orphan worktree reports > does not report a folder containing a project checkout (symlink)
 ↓ src/storageCleanup.test.ts > orphan worktree reports > does not report project internals under a custom managed root (exact)
⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯
 Test Files  1 failed (1)
      Tests  1 failed | 3 passed | 126 skipped (130)
   Start at  17:56:13
   Duration  5.78s (import 56%, transform 26%, tests 16%, setup 2%)
```

## After — [06c0db5ad7](https://github.com/pingdotgg/t3code/commit/06c0db5ad787d743bd95e64935c0d111ad68f8e1)

```text
 ✓ src/storageCleanup.test.ts > deleted thread worktrees > does not sweep for a deleted thread whose cleanup effect failed when a session elsewhere stops 118ms
 ✓ src/storageCleanup.test.ts > deleted thread worktrees > removes a deleted thread's worktree when its session stops during the deletion's sweep 241ms
 ↓ src/storageCleanup.test.ts > deleted thread worktrees > waits out the settle grace of a subagent that just settled
 ↓ src/storageCleanup.test.ts > orphan worktree reports > keeps orphan results visible when thread results fill the report
 ↓ src/storageCleanup.test.ts > orphan worktree reports > skips an ancestor of a referenced thread worktree (canonical)
 ↓ src/storageCleanup.test.ts > orphan worktree reports > skips an ancestor of a referenced thread worktree (win32)
 ↓ src/storageCleanup.test.ts > orphan worktree reports > skips an ancestor of a referenced thread worktree (linux)
 ↓ src/storageCleanup.test.ts > orphan worktree reports > continues reporting when a project root cannot be probed
 ↓ src/storageCleanup.test.ts > orphan worktree reports > reports a linked orphan's size without removing its files (nested)
 ↓ src/storageCleanup.test.ts > orphan worktree reports > reports a linked orphan's size without removing its files (direct)
 ↓ src/storageCleanup.test.ts > orphan worktree reports > does not report a folder referenced by a thread (active)
 ↓ src/storageCleanup.test.ts > orphan worktree reports > does not report a folder referenced by a thread (outside-active-snapshot)
 ↓ src/storageCleanup.test.ts > orphan worktree reports > does not report a folder containing a project checkout (exact)
 ↓ src/storageCleanup.test.ts > orphan worktree reports > does not report a folder containing a project checkout (nested)
 ↓ src/storageCleanup.test.ts > orphan worktree reports > does not report a folder containing a project checkout (symlink)
 ↓ src/storageCleanup.test.ts > orphan worktree reports > does not report project internals under a custom managed root (exact)
 Test Files  1 passed (1)
      Tests  4 passed | 126 skipped (130)
   Start at  17:56:11
   Duration  5.64s (import 56%, transform 27%, tests 15%, setup 2%)
```
