Give BiDi commands independent admission, Native and navigation waits instead
of retaining the socket turn or a single Runtime slot. Share input state by
top-level host, retain its performActions queue, and allow release/control work
during pauses without applying future input state early.
Keep CDP navigation queues local to their sessions, project independent output
while another page is modal, and recover Worker network ownership from its
original session. Preserve exact host bindings, renderer/load predecessors,
original Runtime results and actual realm-retirement ordering.
Validate with cargo fmt --all, workspace Clippy (all targets/features, warnings
denied), and cargo nextest run --no-fail-fast: 23,068 passed, 20 existing skips.
Keep the socket actor responsive while a context-targeted Runtime command waits for its Document. Retain the original host and session binding until admission can validate and dispatch in one finite owner turn. Cover close, replacement, navigation completion, session end and disconnect in standalone and Classic-attached BiDi, including exact-once responses and revoked identities.
Apply negotiated per-type policies through Page-owned one-shot dialog completion, including Classic-attached BiDi sessions. Publish required auxiliary Page predecessors only at a modal wait, keep normal popup completion ordering, and resolve dialogs against their captured Page owner.
Require explicit task kinds and reject input from read-only tasks. Collect each input outcome in the host and settle retained effects independently of the task result. Report ordinary pending navigations and cover multiple effects, task errors, and screenshots.
Add opt-in ace-protocol support with AcePageTask and PageExtensionHost
for renderer-owner-thread inspection, native input, and screenshots.
Expose BrowserRuntimeHandle through a runtime-ready callback so embedders
can discover targets and submit tasks without CDP request/response envelopes.
Reuse supervised page workflows for output ordering, input effects, and
target/document lifetime checks. Recover lost waiters without replaying
admitted tasks, and revoke runtime access on browser shutdown.
The BiDi adapter and protocol server duplicate channel-envelope insertion. Own it in the BiDi protocol implementation and reuse it from the server, preserving optional channels, object-only insertion and replacement of an existing goog:channel field.
Native discovery and rejected commands could leave a dialog handler marked
available indefinitely. Register Classic and BiDi handlers explicitly at
session setup or attachment, and release them on session end, disconnect,
and runtime shutdown before waiting for renderer cleanup.
Keep adapter registrations independent and distinguish handler availability
from modal waiting. Apply waiting policy to existing and newly created browser
contexts. Releasing the final native handler settles dialogs without an
original Page observer.
Centralize Page subscription release while preserving the distinct disable
and detach cancellation policies. Cover command purity, independent adapter
lifetimes, context initialization, abandoned completions, and Classic dialog
handling after a real BiDi disconnect or session.end.
Dismiss queued dialogs when their final original Page subscriber detaches,
before waiting for session cleanup. Late Page subscribers cannot inherit an
existing dialog. Preserve dialogs that still have a native automation handler
or another original subscriber, without introducing renderer waits on detach.
Cancel every dialog observed by a disabling Page subscription, including
queued entries behind an unobserved head. Also settle renderer dialog prefixes
that arrive after the last handler has left.
Emit one native opening/closing fact per physical dialog and project CDP wire
events independently for each subscribed session. Track native handler
availability separately from renderer modal waiting so Classic and BiDi retain
their existing behavior.
Cover detach and disconnect over independent WebSockets, queued cancellation,
late subscriptions, native handler preservation, and event fanout counts.
Own pending dialogs and prompt text on PageTargetHost so disposing Primary
cannot lose a renderer completion. Settle dialogs when their document is
replaced or their target closes or drops.
Capture Page subscription generations when a dialog opens. Only those CDP
observers may handle or cancel it, and Page.disable consistently dismisses
the shared dialog from either session. Keep native automation independent
of Page.enable and send CDP dialog events only to enabled Page sessions.
Cover Primary disposal, disabled and late-enabled observers, Page.disable,
target drop, and dialog handling over independent WebSocket connections.
Synchronize the existing multi-session regression on specific events and
responses instead of elapsed time.
Carry the retained Window's clock anchors into the new Document without inheriting lifecycle slots or rematerializing cached Performance objects. Add Chromium-backed timing and identity regressions with an intentionally delayed navigation response.
Fix MOL-554 by keeping renderer output fences for different Pages as
independent predecessors of the existing protocol output work item.
Preserve command correlation when publishing cleanup and detach events
after every original renderer prefix has crossed protocol ingress.
Cover continued and outstanding Fetch requests across two Pages, and prove
that projecting one Page's cursor cannot release another Page's output.
Validation: cargo fmt --all; workspace all-target/all-feature Clippy;
Nextest 21,987 passed, 19 skipped; Playwright reproduction passes 3/3.