Baseline: upstream main 15fe2832727893cbdd2214383f9f971474849695. Fetched latest 54c5f25249961a1aa0b61932329092eadbd9d6fc changes only unrelated device/frontend files; peer/contracts/dependencies unchanged. Windows, Node v24.18.0, Effect4.0.5. Candidate changes only PeerLinks.ts and its cancellation regression test. Production SHA256 93fcc07691e0a9a7c5a490c672b6edddf923c50b8efee95c338b1bca43b768f9; baseline 7fec405588684456e2dce50594aa7695d9d39c53b412a6e821e9bcdf9ac348df.
Real loopback HTTP/OAuth/MCP, SQLite and scoped secret storage; synthetic caller histories and a controlled useful thread response. Actual fetch-attempt counters run before response generation. No browser, provider/model, WAN, disk/process-cold or rendered-client timing. No live user data. First-service read includes MCP initialization; setup excluded. Heap is post-return growth after a forced pre-call GC, not peak or total application memory. Retained heap and RSS snapshots remain in JSON. Result sizes are decoded/normalized JSON, not compressed wire bytes.
One fresh main/candidate/candidate/main process order per harness, three independent services per population/process. First/setup/refusal n6/version; warmed reads n48/version. Separate six batches of100calls/version for process and main-thread CPU, no per-call GC. All samples and full ranges retained, no exclusions or repeats. Plans and gates were frozen before candidate measurement. All four failedGates arrays empty.
| Workload | Main ms [range] | Candidate ms [range] | Latency change | Heap MiB main / candidate | Heap change | RSS change |
|---|---|---|---|---|---|---|
| ['fork', 1000, 28, 'fence-rejected'] | 19.684 [11.081, 25.562] | 13.975 [12.625, 25.192] | -29.00% (-5.709ms) | 2.708 / 1.913 | -29.37% (-0.795MiB) | +2.99% (+14.969MiB) |
| ['fork', 1000, 28, 'first-service-read'] | 73.160 [64.771, 81.416] | 64.379 [51.437, 72.484] | -12.00% (-8.781ms) | 3.970 / 3.168 | -20.19% (-0.801MiB) | +3.05% (+15.230MiB) |
| ['fork', 1000, 28, 'warm-read'] | 37.089 [14.190, 44.521] | 29.562 [12.885, 45.555] | -20.29% (-7.527ms) | 3.221 / 2.413 | -25.10% (-0.809MiB) | +3.04% (+15.189MiB) |
| ['oauth', 1, 28, 'fence-rejected'] | 13.175 [10.721, 14.994] | 12.971 [11.185, 15.267] | -1.55% (-0.204ms) | 1.233 / 0.469 | -61.97% (-0.764MiB) | +2.00% (+9.834MiB) |
| ['oauth', 1, 28, 'first-service-read'] | 54.463 [41.237, 67.790] | 55.086 [51.676, 63.014] | +1.14% (+0.623ms) | 2.454 / 1.682 | -31.46% (-0.772MiB) | +2.17% (+10.666MiB) |
| ['oauth', 1, 28, 'warm-read'] | 29.057 [11.848, 37.155] | 28.554 [12.783, 31.499] | -1.73% (-0.502ms) | 1.735 / 0.970 | -44.08% (-0.765MiB) | +2.11% (+10.340MiB) |
| ['ordinary', 1, 28, 'fence-rejected'] | 13.590 [12.541, 16.226] | 13.470 [12.035, 16.365] | -0.88% (-0.120ms) | 1.530 / 0.672 | -56.10% (-0.858MiB) | +3.89% (+18.344MiB) |
| ['ordinary', 1, 28, 'first-service-read'] | 64.467 [56.350, 69.731] | 57.806 [40.407, 75.283] | -10.33% (-6.661ms) | 2.891 / 1.958 | -32.26% (-0.933MiB) | +3.98% (+18.734MiB) |
| ['ordinary', 1, 28, 'warm-read'] | 29.615 [14.389, 39.857] | 29.899 [13.535, 36.198] | +0.96% (+0.284ms) | 2.118 / 1.190 | -43.81% (-0.928MiB) | +3.90% (+18.328MiB) |
| ['ordinary', 1, 50000, 'fence-rejected'] | 12.419 [7.356, 13.950] | 11.207 [4.246, 16.308] | -9.76% (-1.212ms) | 1.387 / 0.631 | -54.53% (-0.756MiB) | +1.96% (+9.680MiB) |
| ['ordinary', 1, 50000, 'first-service-read'] | 57.504 [55.025, 68.743] | 55.286 [40.544, 67.197] | -3.86% (-2.218ms) | 3.332 / 2.567 | -22.97% (-0.765MiB) | +1.94% (+9.545MiB) |
| ['ordinary', 1, 50000, 'warm-read'] | 29.706 [11.299, 38.493] | 27.866 [13.192, 37.389] | -6.19% (-1.840ms) | 2.431 / 1.669 | -31.34% (-0.762MiB) | +1.94% (+9.572MiB) |
| fresh-auto | 43.693 [39.834, 67.275] | 40.132 [29.469, 66.446] | -8.15% (-3.561ms) | 4.120 / 2.270 | -44.92% (-1.851MiB) | -1.47% (-6.900MiB) |
| relink-auto | 60.476 [40.743, 66.927] | 60.905 [45.202, 65.057] | +0.71% (+0.428ms) | 3.271 / 1.448 | -55.72% (-1.822MiB) | -1.67% (-7.861MiB) |
| fresh-full | 33.319 [28.513, 38.596] | 34.902 [30.550, 43.731] | +4.75% (+1.583ms) | 3.320 / 1.591 | -52.09% (-1.729MiB) | -1.59% (-7.549MiB) |
| bad-code | 21.967 [20.028, 24.009] | 18.902 [9.448, 23.846] | -13.96% (-3.066ms) | 3.029 / 1.274 | -57.94% (-1.755MiB) | -1.55% (-7.344MiB) |
| Workload (100 calls/batch) | Main / candidate process CPU ms | Process CPU change | Main / candidate thread CPU ms | Thread CPU change |
|---|---|---|---|---|
| ['fork', 1000, 28] | 1320.0 / 859.5 | -34.89% | 977.0 / 710.0 | -27.33% |
| ['oauth', 1, 28] | 539.0 / 415.0 | -23.01% | 383.5 / 359.5 | -6.26% |
| ['ordinary', 1, 28] | 734.5 / 633.0 | -13.82% | 531.5 / 516.0 | -2.92% |
| ['ordinary', 1, 50000] | 851.0 / 640.5 | -24.74% | 671.5 / 585.5 | -12.81% |
| 100 relinks | 1609.0 / 946.0 | -41.21% | 1093.5 / 563.0 | -48.51% |
Ordinary warm-read RSS rose3.90% (+18.33MiB); all RSS guards use <=5% OR <=15MiB, unchanged. This is a snapshot cost, not a claim of reduced total process memory. Fresh-full link latency rose4.75% (+1.583ms); relink rose0.71% (+0.428ms); ordinary warm-read rose0.96% (+0.284ms). No measured CPU control increased. All absolute/relative latency, RSS and CPU guards pass. Wide ranges are retained; memory growth is the primary finding, not a claim that users will see every latency median improvement.
The private view preserves original API identifier, annotations and the actual metadata/mcpOAuth group objects, along with existing HttpApiClient.make/context/namespaced methods. No public routes/schema/cache/protocol changes. Each read still performs a fresh descriptor GET; successful first read has3MCP POSTs and warmed read1. Fence refusal has1GET/0POST/no bearer release. Success link has1GET+3OAuth POSTs; bad-code refusal1GET+2POST with no stored link/session. Subsequent untimed MCP probes verify real resulting token/access modes. Useful result digests and decoded/normalized sizes match. No hidden retries, other requests or redirect-policy violations accepted.
Final focused tests and exact commands are in verification.txt. Server typecheck, changed-file formatting/lint and git diff --check passed on measured source. Independent source review found no functionality blockers. check:changed was attempted and stopped while stuck in ignored/generated-file enumeration; aggregate check INCOMPLETE. No paid model eval needed: no model-facing text/schema changed. UI/WAN/mobile timing unmeasured.
The attached files are exact measured scripts/raw samples with their original absolute task paths. They are not an installable generic runner. Clone the baseline, use the repository filtered cache-preferred install, apply candidate.patch for candidate runs, and remap the worktree/evidence paths (including file:// imports and installed dependency paths in fixture.mts) to your checkout before local execution. Original-byte SHA256 manifest and raw provenance allow auditing the exact recorded run; locally remapped scripts naturally have different hashes. Do not run build.py/build.mjs from another historical experiment or overwrite the provided baseline snapshot.
Restore the two evidence directories and peer-api-view layout named in the script, run python peer-api-view/run.py, then each report.py/cpu-report.py with main-view-a candidate-view-a candidate-view-b main-view-b. Measurements run serially with node --experimental-import-meta-resolve --expose-gc, from apps/server; runner restores candidate in finally. Run in a dedicated checkout with no competing tests/servers. Inputs, flags, sample sizes, order, assertions and thresholds must match to reproduce the comparison.
Implemented and reviewed with gpt-6.1-sol in the Codex harness through T3 Code.