# Checkpoint Git LFS runtime proof

This proof runs the real source server and real `t3 project` / `t3 thread` CLI with Replay (dev). No unit test or replacement clean filter is used. The videos are measurement replays of actual server/CLI events and filesystem observations, sampled every 100 ms; they are not screenshots of a T3 UI.

## Requirements and reproduction

Linux, Git 2.43.0, [official Git LFS 3.4.1 Linux amd64 release](https://github.com/git-lfs/git-lfs/releases/tag/v3.4.1), Python 3 + Pillow, ffmpeg, Node selected by the checkout's global `vp`, and dependencies installed with `vp i` in both checkouts. Put the uploaded driver.py, restore.mjs, lfs-duty.py, and record.py in one scratch directory. Extract the official release there as `git-lfs-3.4.1/git-lfs`.

Make the launcher executable with `chmod +x lfs-duty.py`. Run sequentially, reusing the same scratch directory:

```sh
python3 driver.py BASE_CHECKOUT before SCRATCH
python3 driver.py HEAD_CHECKOUT after SCRATCH
python3 record.py BEFORE_RUN OUTPUT
python3 record.py AFTER_RUN OUTPUT
```

Base: [b718326b88](https://github.com/pingdotgg/t3code/commit/b718326b888ecd608fd5ffb2477e94f770ae2e1c) (merge-base).
Head: [56122b0157](https://github.com/pingdotgg/t3code/commit/56122b01576ec0fd1d06a860aae42d1d8c090ba7).

The driver creates fresh isolated server data on each side (`T3CODE_DEV_SEED=0`), uses the same immutable synthetic corpus, installs Git LFS into a scratch global Git config, and disables synthetic repository hooks. It starts `node apps/server/src/bin.ts serve --dev-url ...` from the relevant source checkout; the dev URL enables the built-in replay provider. No browser is needed for this server-only failure.

## Matched timeout workload

1. One initial commit contains `.gitattributes`: `*.npz filter=lfs diff=lfs merge=lfs -text`.
2. Six untracked 1 GiB random `.npz` files are linked from the shared immutable corpus into `data/`.
3. Start a `devReplay` / `command-output` thread and await both the 5-second baseline timeout and the post-turn 30-second capture timeout.
4. Record file sizes and process state while the server is still running. Add two more 1 GiB files and send turn two on that same thread. Await its 30-second capture timeout and record again.
5. Independently monitor `.git/lfs/tmp`, every `.git/objects/tmp_objdir-t3-checkpoint-*/lfs/tmp`, objects in both private and shared LFS storage, private capture directory counts, server liveness, and the LFS child PIDs captured by the launcher.

The original reproduction was sensitive to storage/CPU speed: one previous base capture completed at about 29.3 seconds while head timed out. This run deliberately makes the actual, unchanged official Git LFS `filter-process` slow on both sides: lfs-duty.py launches it and alternates 20 ms running with 380 ms stopped, using only the child PID it captured. It never reads or changes the filter protocol or payload. This ensures both commits exercise the same cutoff paths with the same data, instead of comparing a completed capture with a timed-out one. No conclusions about unthrottled throughput are drawn.

## Successful capture and restoration

A separate synthetic repository has the same attributes. The app creates an isolated worktree and completes an empty setup turn; the driver then writes a new 1 MiB LFS payload inside that worktree and sends a second replay turn. The payload is identical on both sides and absent from each fresh shared LFS cache. Its official LFS filter runs without the duty limit. The app captures it, publishes a checkpoint ref and a shared LFS object, and removes private capture storage. The driver sets `lfs.url` to an unreachable loopback endpoint, overwrites the file, and uses the running app's typed WebSocket `checkpoint.rollback` command with `restoreFiles: true`. It compares the restored payload SHA-256 against the original. It then independently restores the saved checkpoint with Git's real LFS smudge and compares the bytes again. These checks exercise preservation of the LFS payload, not only pointer creation or a zero temp-file count.

The successful-capture and timeout measurements precede server shutdown. `summary.json` explicitly records server liveness; the complete samples include it on every observation. `events.json` contains the sanitized CLI output and relevant server warnings; raw startup logs, credentials, and local absolute paths are intentionally excluded from the upload.
