# U02 — Only failed deletion outbox effects

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 > does not sweep for a deleted thread whose cleanup effect failed when a session elsewhere stops 198ms | ✓ src/storageCleanup.test.ts > deleted thread worktrees > does not sweep for a deleted thread whose cleanup effect failed when a session elsewhere stops 118ms | Before fails expected zero snapshot reads (actual 1); head passes and retains failed-outbox checkout without an unrelated sweep. |

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

```text
 ✓ src/storageCleanup.test.ts > deleted thread worktrees > removes a deleted thread's worktree once a live thread's session in it stops 210ms
stdout | src/storageCleanup.test.ts > deleted thread worktrees > does not sweep for a deleted thread whose cleanup effect failed when a session elsewhere stops
[17:56:18.591] ERROR (#261): Error [AssertionError]: expected 1 to be +0 // Object.is equality
    at /home/ubuntu/wt/pr-26038-before/apps/server/src/storageCleanup.test.ts:1191:23 {
  actual: 1,
  expected: 0,
  showDiff: true,
  operator: 'strictEqual',
  [cause]: undefined
}

 ↓ src/storageCleanup.test.ts > deleted thread worktrees > removes a deleted thread's worktree once its terminal closes and its session stops
 ↓ src/storageCleanup.test.ts > deleted thread worktrees > retries a deleted thread's worktree kept for another reason when a session in it stops
 ↓ src/storageCleanup.test.ts > deleted thread worktrees > does not sweep for a kept deleted worktree when a session elsewhere stops
 × src/storageCleanup.test.ts > deleted thread worktrees > does not sweep for a deleted thread whose cleanup effect failed when a session elsewhere stops 198ms
   → 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)
 FAIL  src/storageCleanup.test.ts > deleted thread worktrees > does not sweep for a deleted thread whose cleanup effect failed when a session elsewhere stops
AssertionError: expected 1 to be +0 // Object.is equality
- Expected
+ Received
- 0
+ 1
 ❯ src/storageCleanup.test.ts:1191:23
    1189|           fixture.repo,
    1190|         );
    1191|         expect(reads).toBe(0);
       |                       ^
    1192|       }).pipe(Effect.provide(cleanupTestLayer), Effect.scoped),
⎯⎯⎯⎯⎯⎯⎯ 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 kept deleted worktree when a session elsewhere stops
 ✓ 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)
 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%)
```
