Windows thread-switch performance evidence

Environment: Windows Server 2025, four logical CPUs, Defender real-time protection enabled; production web build; Playwright Chromium, 1600x1000, default light theme.

For each commit in its own worktree: run vp i, then vp build from apps/web. Start apps/server with T3CODE_DEV_SEED=0, node src/bin.ts serve --base-dir <isolated-home> --port 3999 --host 127.0.0.1 --dev-url http://localhost:5733. Wait for server readiness.

Run node seed.cjs <apps/server> <isolated-home> <repos> 10 10 4; wait for DONE 100. Configure proj-0 and proj-1 with bare local origins and main tracking origin/main. In proj-1 create feature/x and commit one extra line in file0.txt. Stop the captured server process tree, including its replay agents. Restart without --dev-url to serve the production build.

Mint a fresh pairing URL using node src/bin.ts pair --ttl 1h --base-dir <isolated-home>, and rewrite its origin to http://127.0.0.1:3999. Never publish this URL.

Run node switch.cjs <playwright-module-dir> <pair-url> 14 <clicks.json>. It records 14 sidebar clicks, six seconds apart, with WebSocket diff-preview request and response timestamps. A first request prefixed T marks a cross-project switch. Video is captured by the same script.

Run node tracecount.cjs <clicks.json> 6000 <isolated-home>/userdata/logs/server.trace.ndjson* (expand the trace filenames in your shell). It counts git processes by trace span start time in the six-second window following each click and includes lookup descendants.

Repeat from a fresh server process for each cold run, retaining the same seeded home and repos. Measurements contain only synthetic project/thread names. No model-provider calls are measured. Videos have a white rectangle covering the environment display name; the thread, branch and Changes panel remain visible.

Excluded attempts: the first head seed stopped during project creation and was retried from a fresh home; warm repeat attempts were excluded because SSH disconnected and driver lifetimes overlapped. First-visit and warm-cache samples are never pooled.
