Skip to content

Commit c8d3112

Browse files
sirtimidclaude
andcommitted
perf: make remote-comms timing constants configurable, optimize e2e tests
Add reconnectionBaseDelayMs, reconnectionMaxDelayMs, handshakeTimeoutMs, writeTimeoutMs, and ackTimeoutMs to RemoteCommsOptions so that e2e tests can use fast values instead of the production defaults (500ms-10s backoff, 10s ACK/handshake/write timeouts). Thread the new options through the full stack: RemoteCommsOptions → RPC spec → transport → ReconnectionManager/HandshakeDeps/RemoteHandle, and update the browser runtime comms-query-string serializer. Restructure the e2e test lifecycle: move the relay server to beforeAll/afterAll, remove unnecessary delay() calls, reduce waitUntilQuiescent intervals, and set fileParallelism: false in the e2e vitest config to prevent port conflicts between relay-dependent test files. Reduces remote-comms e2e suite from ~215s to ~97s (55% reduction). Closes #904 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 4f6a067 commit c8d3112

12 files changed

Lines changed: 323 additions & 64 deletions

File tree

packages/kernel-browser-runtime/src/utils/comms-query-string.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ const NUMBER_PARAM_NAMES = [
5252
'stalePeerTimeoutMs',
5353
'maxMessagesPerSecond',
5454
'maxConnectionAttemptsPerMinute',
55+
'reconnectionBaseDelayMs',
56+
'reconnectionMaxDelayMs',
57+
'handshakeTimeoutMs',
58+
'writeTimeoutMs',
59+
'ackTimeoutMs',
5560
] as const satisfies readonly NumberParamKey[];
5661

5762
const NonNegativeInteger = min(integer(), 0);

0 commit comments

Comments
 (0)