# Linear comment pagination performance capture

This measures the real T3 server's authenticated `issues.comments` WebSocket RPC, the request used by **Load older comments**. It is not a unit test or a direct call into the Linear adapter. Both app commits use fresh databases on the same leased Windows Server 2025 machine and Node v26.13.1. A local HTTP proxy forwards requests unchanged to live Linear and records GraphQL operation names and durations. It adds no delay.

## Reproduce

1. Install dependencies with `vp i` in separate base and head checkouts.
2. Place `measure.ts` at `apps/server/measure.ts` in each checkout. The file imports that checkout's real contracts and RPC client.
3. Supply `LINEAR_API_KEY` and `LINEAR_TEST_TEAM_KEY` through a private environment file; never publish that file.
4. In each checkout, run `node --env-file=<private-env-file> apps/server/measure.ts <new-output-directory> 25` sequentially. There must not be another process listening on port 14989.
5. Copy each run's `measurement.json` to `base.json` and `head.json`, then run `python report.py <directory-containing-those-files>`. `convert comparison.svg comparison.png` produces the shareable capture.

The driver creates a synthetic local git project through the server's HTTP API, connects Linear through the authenticated RPC, binds the project to the test team, reads issue details for pagination cursors, then requests the same older page repeatedly. Existing triage fixtures T3CF-125 and T3CF-126 each have 75 comments. Their older pages have 25 plain comments and 25 comments with viewer-owned thumbs-up reactions respectively. An exhausted cursor from the plain page supplies the empty-page condition. The fixtures are read-only during this capture.

Each condition has four blocks, each with two excluded warmups and 25 retained samples (100 per condition per commit). Conditions alternate plain / empty / reacted inside each round. Every retained sample is included in the JSON. The driver checks that each condition's entire serialized response has an invariant SHA-256 hash; the report compares those hashes across commits, including comment contents, pagination and reaction ownership without publishing the contents.

The initial run used 10 retained samples per block (40 per condition). It showed lower medians, but plain-page improvement did not exceed the full range of base block medians. Those initial data are retained separately. The larger run was selected before collecting its data; no samples are discarded from either run.

Spread means maximum minus minimum of the four block medians. The claimed improvement must exceed this spread on both sides. Pooled quartiles and all block medians are also reported. Browser click-to-render latency is outside this server measurement.
