# Revision-paired real-driver evidence

PR [#32374](https://git.cafe/pingdotgg/t3code/pull/32374). Captured **3/3 minimum rows: F01, F02, F04**. Unverified minimum rows: **none**. Only these three rows were executed; other matrix rows remain covered by their existing tests and were not recaptured or rerun here.

Environment: Linux 6.8.0-117-generic x64; Git 2.43.0; **Node v26.13.0 inside vp test**; before [80e6261](https://github.com/pingdotgg/t3code/commit/80e62619f5c01d84579bcf70ea6d566712007412); after [049b1e8](https://github.com/pingdotgg/t3code/commit/049b1e8e9cdb888d0090c1f5240f9ae027f8b68e). The shell's Node was v26.12.1; vp selected v26.13.0 for both runs, as printed by the runner.

Full selected revisions: before `80e62619f5c01d84579bcf70ea6d566712007412`; after `049b1e8e9cdb888d0090c1f5240f9ae027f8b68e`.

| Row | Before | After |
| --- | --- | --- |
| F01 root CRLF | Checkpoint published without `notes.md`; real-driver restore deletes notes. Tracked file restores capture-time bytes and `later.txt` is removed. | Checkpoint contains notes; real-driver restore recovers `notes at capture\n`, restores the tracked file, removes `later.txt`. |
| F02 untracked-only `sub` | `VcsUnsupportedOperationError`; no checkpoint ref. Restore unavailable and deliberately skipped; no HEAD fallback. | Capture → edit → restore succeeds; notes recover original bytes, `later.txt` disappears, modified outside sibling survives. |
| F04 newline prefix | `VcsUnsupportedOperationError`; no checkpoint ref. Restore unavailable and deliberately skipped; no HEAD fallback. | Real newline prefix triggers resolver fallback, then capture → edit → restore succeeds. Notes recover original bytes, `later.txt` disappears, modified outside sibling survives. |

F01/F02 root `.gitignore` was committed with exact bytes `a.txt\r\n\r\nb.txt\r\n` (hex `612e7478740d0a0d0a622e7478740d0a`). F04 cwd suffix was `outer space/line \nbreak `, preserving the embedded LF and trailing space; its isolated, external `core.excludesFile` contained `   \n` (hex `2020200a`). Both subdirectory fixtures contained no tracked workspace files. Ignore sources stayed unchanged throughout restore.

All six captures preserved the real index byte for byte and left no `t3-checkpoint-index-*` files. Root has no outside sibling; both nested fixtures kept `outside modified before capture\n` unchanged. Transcripts record exact argv/stdin, outputs/errors, JSON-escaped paths, NUL-decoded and hex checkpoint paths, notes bytes, index digests, workspace listings, and restore results.

## What else changed

- The combined repository lookup adds `--show-prefix` in all rows.
- F01 capture uses 8 Git commands instead of 11: root skips `check-ignore`, the cached-additions `diff`, and ignored-workspace `ls-files`; staging changes from `add -u` to `add -A`.
- F02 capture uses 9 commands instead of 7. Probe stdin changes from `.\0` to `../sub\0`; cached-additions `diff` and ignored-workspace `ls-files` disappear; successful staging/publication adds `add`, `write-tree`, `commit-tree`, and `update-ref`.
- F04 capture uses 12 commands instead of 7. Probe stdin becomes `../line \nbreak \0`. In addition to F02's changed rejection/publication path, newline prefix decoding requires three extra `rev-parse` calls: common-dir, separate prefix, and index-path lookup. This is actual Git 2.43.0 behavior, with no shim; it does not certify old Git compatibility.
- Restore behavior was invoked only where a checkpoint existed. No additional filesystem behavior difference was observed in these three fixtures beyond corrected inclusion/restorability of notes and the expected transition from rejected capture to successful capture.

## Reproduce

Install each detached revision with `vp install`. Copy the identical [driver](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/5875232cf9f80790/zz-evidence.scratch.test.ts) into each checkout at `apps/server/src/vcs/zz-evidence.scratch.test.ts`. From each `apps/server`, run:

```sh
vp test run src/vcs/zz-evidence.scratch.test.ts
```

The runner selects behavior from the checked-out revision, initializes independent deterministic synthetic repositories, and creates a new timestamped run directory inside `/tmp/lead-32374-r1/evidence-capture-1/` without deleting older evidence. It imports that checkout's real `GitVcsDriver.makeVcsDriverShape`, uses the existing tests' Node/Effect/VcsProcess layers, and only forwards/logs real Git commands. Capture and restore are never replaced by shell commands. Restore always uses `fallbackToHead: false`.

Both focused scratch runs passed (1/1 each); their assertions verify the observed matrix outcomes. The transcripts, rather than those assertions, are the runtime evidence. No real user data, provider turns, dev server, or application database was used. No changes were committed or pushed.

Runner SHA256: `3b9c5a2aeaa524a0b5461df99508222dac9a688270bc312e283834973bee6b89`.

## Evidence

[Before transcript](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/f44b7eecdd1603d6/before-transcript.txt) · [After transcript](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/10598fb5b1b69691/after-transcript.txt) · [Executable driver](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/5875232cf9f80790/zz-evidence.scratch.test.ts)

### F01 — root CRLF

| Before | After |
| --- | --- |
| [80e6261](https://github.com/pingdotgg/t3code/commit/80e62619f5c01d84579bcf70ea6d566712007412): [runtime transcript](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/f44b7eecdd1603d6/before-transcript.txt); checkpoint omits notes and restore deletes them. | [049b1e8](https://github.com/pingdotgg/t3code/commit/049b1e8e9cdb888d0090c1f5240f9ae027f8b68e): [runtime transcript](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/10598fb5b1b69691/after-transcript.txt); checkpoint includes notes and restore recovers original bytes. |

### F02 — untracked-only subdirectory CRLF

| Before | After |
| --- | --- |
| [80e6261](https://github.com/pingdotgg/t3code/commit/80e62619f5c01d84579bcf70ea6d566712007412): [runtime transcript](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/f44b7eecdd1603d6/before-transcript.txt); unsupported capture, no ref; no restore possible. | [049b1e8](https://github.com/pingdotgg/t3code/commit/049b1e8e9cdb888d0090c1f5240f9ae027f8b68e): [runtime transcript](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/10598fb5b1b69691/after-transcript.txt); capture/restore succeeds, notes recovered, later file removed, outside sibling preserved. |

### F04 — nested newline/space prefix and external spaces-only ignore

| Before | After |
| --- | --- |
| [80e6261](https://github.com/pingdotgg/t3code/commit/80e62619f5c01d84579bcf70ea6d566712007412): [runtime transcript](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/f44b7eecdd1603d6/before-transcript.txt); unsupported capture, no ref; no restore possible. | [049b1e8](https://github.com/pingdotgg/t3code/commit/049b1e8e9cdb888d0090c1f5240f9ae027f8b68e): [runtime transcript](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/10598fb5b1b69691/after-transcript.txt); real fallback succeeds, notes recovered, later file removed, outside sibling preserved. |

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