mirror of
https://github.com/morluto/rea.git
synced 2026-11-10 00:36:35 +00:00
feat(browser): reuse admitted browser-socket transport and allow discovery_timeout_ms (#9203)
* feat(browser): reuse admitted browser-socket transport and allow discovery_timeout_ms * fix(browser): close unhealthy shared sockets and clamp max discovery timer * fix(browser): retry failed shared-socket cleanup while peer leases remain active * test(browser): race observation readiness with awaitAcknowledgement and join before mock restore * fix(browser): isolate shared-socket discovery aborts and coalesce cold connects * fix(browser): observe pending cold-connect cleanup failures and isolate fake CDP sessions * refactor(browser): carry typed connect cleanup owners and gate concurrent session test * test(browser): cover loopback socket reuse-key normalization * test(browser): verify distinct browser socket path IDs stay separate
This commit is contained in:
1 parent
94182f331e
commit
9d0e87f331
26 files changed
+2868
-411
No files matched your search
@@ -1,7 +1,10 @@
|
||||
import { javascriptRouteDeliveryOptions } from "./cli/javascriptRouteDelivery.js";
|
||||
import { z } from "incur";
|
||||
import { cliDecimalField } from "./cli/options.js";
|
||||
import { webRuntimeCommandTimeoutSchema } from "./domain/browserDeadline.js";
|
||||
import {
|
||||
browserDiscoveryTimeoutSchema,
|
||||
webRuntimeCommandTimeoutSchema,
|
||||
} from "./domain/browserDeadline.js";
|
||||
import { javaScriptAnalysisResourceControlsSchema } from "./domain/javascript/javascriptAnalysisResourceControls.js";
|
||||
import { javaScriptSourcePathsSchema } from "./domain/javascript/javascriptSourceSelection.js";
|
||||
|
||||
@@ -25,6 +28,20 @@ export const browserScopeOptions = {
|
||||
commandTimeoutMs: cliDecimalField(webRuntimeCommandTimeoutSchema),
|
||||
};
|
||||
|
||||
/** Shared options for passive browser commands that also accept discovery_timeout_ms. */
|
||||
export const passiveBrowserScopeOptions = {
|
||||
...browserScopeOptions,
|
||||
discoveryTimeoutMs: cliDecimalField(browserDiscoveryTimeoutSchema),
|
||||
};
|
||||
|
||||
/** Keep an omitted discovery deadline absent so Evidence records the caller selection only. */
|
||||
export const selectedDiscoveryTimeout = (
|
||||
discoveryTimeoutMs: number | undefined,
|
||||
): { readonly discovery_timeout_ms?: number } =>
|
||||
discoveryTimeoutMs === undefined
|
||||
? {}
|
||||
: { discovery_timeout_ms: discoveryTimeoutMs };
|
||||
|
||||
/** Keep an omitted command deadline absent so Evidence records the caller selection only. */
|
||||
export const selectedCommandTimeout = (
|
||||
commandTimeoutMs: number | undefined,
|
||||
@@ -34,7 +51,7 @@ export const selectedCommandTimeout = (
|
||||
: { command_timeout_ms: commandTimeoutMs };
|
||||
|
||||
export const browserPageInspectionOptions = z.object({
|
||||
...browserScopeOptions,
|
||||
...passiveBrowserScopeOptions,
|
||||
observationMs: observationDuration(500),
|
||||
includeAccessibilityText: z
|
||||
.boolean()
|
||||
|
||||
Reference in new issue
Block a user