# Worktree index proof

Environment: Linux x86_64, Git 2.43.0, web dev client, Chromium, 1280 x 800 CSS pixels, light theme. Each commit ran its own real server and fresh T3 home with automatic seeding disabled. Fast worktree checkout was false.

1. Run `python3 seed.py <fixture-directory>` once to generate a synthetic repository with 12,001 tracked files (about 800 MB). Both sides use that same main commit.
2. Register `editor.mjs` as a local ACP provider named Fixture editor, command `node <absolute-path-to-editor.mjs>`, model `edit`. This deterministic fixture agent appends one line to README.md per turn and invokes no Git commands. The app code is unmodified.
3. On each checkout, start `T3CODE_DEV_SEED=0 vp run dev`. Use its own `.t3` home.
4. Add the synthetic repository using `node apps/server/src/bin.ts project add <fixture-directory> --title 'Index refresh evidence' --base-dir .t3`.
5. Start a worktree thread through the real server CLI: `node apps/server/src/bin.ts thread start <fixture-directory> 'Append one line without Git commands' --title 'Repeated small edits' --worktree main --branch <unique-branch> --provider fixtureEditor --model edit --wait --json --base-dir .t3`.
6. Open the resulting thread in the web client. Send `Append another line without Git commands` and wait for its checkpoint diff.
7. Put inspect-index.py in each created worktree and exclude it using the fixture repository's .git/info/exclude. In the thread terminal, run `python3 inspect-index.py`.

The inspector reads index metadata with ls-files --debug and rev-parse --git-path index. It uses the server's status arguments with GIT_OPTIONAL_LOCKS=0. Each numbered refresh measures an untraced status, then repeats under strace to count unchanged synthetic content files opened. Timings are diagnostic Git status timings, not end-to-end UI or checkpoint timings. The index timestamp must remain unchanged throughout. The changed README is deliberately excluded from the unchanged-content count.

Base retained 2,012 racy entries after two edits/checkpoints and reopened those 2,012 content files on every read. Head retained zero and opened zero unchanged content files.

AI-assisted; verified with the tests and tools listed above.
