# Storage cleanup runtime proof

This is a standalone real-server reproduction, not a unit test or mocked service.

Requirements: two T3 Code checkouts with `vp i` completed, Node selected by `vp`, Python 3, Git, Linux `/proc`, `headless-desktop`, GNOME Terminal, ImageMagick, ffmpeg.

Run sequentially, in an otherwise idle environment:

```
python3 run.py before <base-checkout>
python3 run.py after <head-checkout>
```

The scripts live together in an empty scratch directory. Each run creates its own timestamped subdirectory. Application source is unchanged; `driver.ts` is copied into `apps/server/evidence-driver.ts` to resolve the checkout's own dependencies.

1. Create a real Git repository and linked worktree, with committed `node_modules/` ignore rule.
2. Start that checkout's actual source server on a fresh isolated database. Set `T3CODE_DEV_SEED=0`. Enable `storageCleanup.worktreeAfterDays=8`; leave `worktreeKeepWhen=uncommitted-changes`. Disable automatic sidebar settlement so it does not update the idle thread during cleanup.
3. During synthetic seeding only, preload `seed-clock.mjs` to offset `Date.now` by nine days. Create one project and idle thread referencing the worktree using the real authenticated WebSocket RPC. Stop the server.
4. Write 1,200,000 regular ignored JavaScript files: 12,000 packages, each with 50 files in `dist` and 50 in `lib`. Do not create `.modules.yaml`.
5. Restart the actual server with normal wall clock, no preload, no injected filesystem delay, and no mocks. Observe its automatic cleanup report, then call `server.runStorageCleanup` twice more. Record live elapsed times, the service's report entries, whether the worktree still exists, and server process CPU (Linux clock ticks, one core = 100%).
6. Record the real terminal showing live RPC output through Xvfb and ffmpeg. Pair captures at the same 1920×1080 viewport and default terminal theme. The terminal shows only synthetic labels; no server pairing secrets or internal paths are displayed.

`*-startup.json` and `*-sweep-*.json` are real server reports, with synthetic absolute paths redacted. `*.txt` and `*.events.jsonl` are the live driver transcript and timestamped events. The recording is real time, not an animation or reconstructed transcript.

The seed-only clock offset changes timestamps, not directory traversal or cleanup timeouts. Cleanup uses production filesystem and Git code. This proves the large-tree timeout mechanism on Linux, not the WSL2 filesystem-specific threshold or a fleet of hundreds of worktrees.
