# PR watch proof

Base: [49eb9c8adc](https://github.com/pingdotgg/t3code/commit/49eb9c8adc7ee4d4789e5e65fda7cfa7fba87da7). Head: [bb28fd36d7](https://github.com/pingdotgg/t3code/commit/bb28fd36d7523e2bc8146cce0d42a6d0312fb5fb).

Environment on each side: real server and web client from its own commit, fresh independent T3 home, Linux Chromium 151, 1440 x 900 viewport, light theme. The Replay (dev) multi-turn provider supplies the agent replies. No production database is copied.

A fetch shim supplies synthetic GitHub responses for the linked reference [#36805](https://github.com/pingdotgg/t3code/pull/36805). This does not describe that live pull request. Its one CI check starts IN_PROGRESS and becomes SUCCESS; PullRequestCore continues returning HTTP 200 while PullRequestActivity returns HTTP 503. The watch fingerprint is deliberately unavailable (null), so the server performs full reads on its real two-minute watch cadence. There are no timers accelerated and no server implementation changes. The app's summary panel and the watch service read through the same shim.

## Identical interaction on both sides

1. Create a synthetic git project and a Replay thread through the real CLI. Finish the first replay turn. Link the synthetic PR reference through the command palette.
2. Start recording BEFORE enabling watch. Open Show linked pull requests through the command palette, right-click its row, and select Watch for changes while CI is still running.
3. Let the first scheduled watch sweep read activity successfully. Then turn the activity outage on.
4. Wait for the next actual watch sweep to return activity HTTP 503. Only now open the PR Summary detail panel. Wait for the visible activity HTTP 503 error. This timing is identical on both sides and avoids an earlier cached empty comments view.
5. Mark the synthetic check successful while keeping the activity outage on. Wait for two actual scheduled watch sweeps, identified by PullRequestWatchFingerprint followed by core/activity reads; UI polling alone does not satisfy this wait.
6. After ten more seconds, capture two screenshots at least 500 ms apart and require identical SHA-256 hashes before selecting the still. Stop recording. Neither final capture is edited or cropped.

## Observations

On base, the completed-check watch sweeps at 18:07:33 and 18:09:33 UTC both read core HTTP 200 and activity HTTP 503. The final frame at 18:09:44 shows All checks passed and the activity HTTP 503 error, but the thread remains Waiting with no checks wake.

On head, the completed-check watch sweeps at approximately 18:08:19 and 18:10:20 UTC still read activity HTTP 503. The thread receives “#36805: checks passed” and runs the second replay turn. The final frame at 18:10:30 shows that wake beside the same All checks passed and activity HTTP 503 error.

Both unedited recordings are approximately 7 minutes 25 seconds long. Recording starts before Watch for changes is selected, but after the initial link is established. The first successful activity read is empty, so this proof does not reproduce the triage run's preliminary new-comments wake. It isolates the missed completed-check wake using one watched PR.

## Driver

Save the three scripts together in a fresh proof directory. Install agent-browser if needed and set PR_PROOF_BROWSER to its executable. Set PR_PROOF_ROOT to that directory, T3CODE_DEV_SEED=0, and NODE_OPTIONS to --import=<absolute path to host-fixture.mjs>. Provide a GH_TOKEN for the GitHub provider to be enabled; the API response fixture intercepts GitHub fetches. Do not publish a real token.

In a retained foreground terminal, run `python3 start-manual.py <checkout> <before-or-after> <unused-port>`. In a second terminal with the same environment, run `python3 manual-driver.py <checkout> <before-or-after> <same-port> <unique-browser-session>`. Use a separate PR_PROOF_ROOT and browser session for each concurrently running side; copy the fixture scripts into each root. Each checkout needs dependencies installed with vp i. The runner's start-app.ts launches fresh dev state and configures the replay provider. The manual driver creates the project, links the PR, enables the watch, changes only fixture state, and captures the result. Stop each server with Ctrl-C and close its browser session afterward.

The steps and read logs contain only synthetic API operation data and UTC times. Raw server logs, auth state, pairing links, databases, and machine paths are excluded.
