Repository navigation
test: loosen protocol.handle "is fast" bound on branches without native relay - #55346
Conversation
…ve relay Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_012xBsNB7nT6PbXD8j5cairW
There was a problem hiding this comment.
LGTM. This is a test-only change that raises the threshold on one flaky performance assertion. I reviewed it from a standalone clone.
What was reviewed:
- The
protocol module > handle > is fasttest in spec/api-protocol.spec.ts. Only themedianRatiobound changes, from 3 to 5. The 4-pair balanced-order sampling, the median calculation and the length/handler-call checks are all unchanged. - The bound of 5 still sits above the 3.1-3.6x medians reported in the description, so it should still catch a gross regression.
- The assertion uses a vitest
toBeLessThanmatcher and runs in the test body, as spec/CLAUDE.md requires.
Extended reasoning...
The change edits a single assertion and its comment in spec/api-protocol.spec.ts. It does not touch production code. It also touches no security-sensitive surface, since it only changes a test timing tolerance. No CODEOWNERS entry covers spec/. The PR timeline shows no other reviewers and no open objections, and the bug hunt ran to dry_streak with no findings.
|
The Generated by Claude Code |
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_012xBsNB7nT6PbXD8j5cairW
|
No Release Notes |
Requested by Samuel Attard · Slack thread
Description of Change
protocol module > handle > is fastasserts that the median ratio of aprotocol.handle-intercepted 128 MB fetch to a direct fetch is below 3. On 43-x-y there is no native relay for untouchednet.fetchresponses (#52953 only landed on 44+), so the intercepted body is pumped through JS and the real ratio sits around 3-4x on Linux x64 CI; the test fails outright or only passes on retry (e.g. https://github.com/electron/electron/actions/runs/40242888705/job/121353182234). This raises the bound to 5, matching the gross-regression bound main uses since #55083, which can't be backported as-is because its relayed-vs-piped assertion depends on native relay. Test-only change.Validated locally against the released Electron v43.8.3 (no build) on Linux x64 under xvfb, 5 runs of just this test, all passing with the new bound. Median ratios: 3.58, 3.56, 3.32, 3.13, 3.28. Every one of those medians would have failed the old
< 3bound.Checklist
Generated by Claude Code
Release Notes
Notes: none