# Changes scroll proof driver

Run the real web client at each commit in an isolated checkout and data home, with T3CODE_DEV_SEED=0. Seed with manual-evidence-seed.ts (PROOF_HOME is the isolated server home; T3_SCENARIO_APP_DIR is its checkout). Use a 1280x800 Chromium viewport and light theme.

1. Open the seeded thread through its environment/thread route. Open right panel > Diff. Expand all files. Set `.diff-render-surface.scrollTop` to its scrollHeight, which settles at 64400.
2. Install this request gate before opening Diff (it delays actual requests, never replaces responses):

```js
window.patchHold = {
  enabled: false, queued: [], requests: [],
  release() { this.enabled = false; this.queued.splice(0).forEach(send => send()); }
};
const originalSend = WebSocket.prototype.send;
WebSocket.prototype.send = function(data) {
  if (typeof data === 'string') {
    const request = JSON.parse(data);
    if (request.tag === 'review.getDiffPreview' && request.payload?.file) {
      window.patchHold.requests.push(request.payload);
      if (window.patchHold.enabled) {
        window.patchHold.queued.push(() => originalSend.call(this, data));
        return;
      }
    }
  }
  return originalSend.call(this, data);
};
```

3. Switch scope to Uncommitted. Wait at least 630 seconds (the query wrapper and inner query each have a five-minute idle TTL on these commits). The shorter 330-second attempts retained cached patches.
4. Set `patchHold.enabled=true`, start recording, switch back to Changes. Wait for held reads. Forward just the first four queued requests with `patchHold.queued.splice(0,4).forEach(send=>send())`. Keep the gate enabled so later batches remain held. Verify the viewport is at 0 and loaded content cannot reach saved 64400.
5. Move the pointer to the middle of `.diff-render-surface`, use native mouse-wheel input down 500px. Wait 2.3 seconds and record the chosen scrollTop. Capture the held state.
6. Call `patchHold.release()`. Wait five seconds, capture the final state and stop recording. Compare final scrollTop against the chosen position. The base jumps to the saved end; the head should stay at the chosen position.

Only the scroll behavior is the verdict. A failure to reach a scrollable pending state is blocked setup, not proof.

## Top variant

After the first run, scroll Changes back to its end, switch to Uncommitted, and wait another 630 seconds. Repeat the same held-batch sequence. Scroll down 500 in the diff container, then scroll up 500 to choose exactly 0 while later patches are held. Release the reads, wait five seconds, and capture. Compare against 0. Use the same two native container-scroll actions on both commits.

For T3 preview automation, target the container explicitly: `preview_act({ action: "scroll", selector: ".diff-render-surface", deltaY: 500, deltaX: 0 })`. A coordinate-only scroll targeted the page rather than this nested surface and left it at 0; that input was repeated against the correct container before the base verdict.
