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.
A VM created while dialog waiting was enabled cached that value locally. The
cached true value survived disabling or detaching the final Page observer,
so later dialogs could still wait after the shared context flag was false.
Read the BrowserContext shared switch for every dialog. Remove the VM-local
Boolean, its constructor snapshot, the ScriptVm/JsContextHost setters, and the
obsolete Page setter and renderer command. Page domain commands now rely on
the existing shared subscription aggregation.
Cover enabled-at-construction VMs and interleaved disable/detach across two
Pages and different sessions. Verify that confirm returns without a modal wait
while a native handler remains available to handle the prompt. Keep standalone
headless dialog fallback coverage through the shared switch.
Capture weak command capabilities for the exact native Document behind early
Fetch pauses. Use them for request, response, authentication and cleanup work,
and restore pause records when dispatch is rejected.
Carry publication Page sources through owner-action projection. Register and
attach workers during handoff, revoke abandoned Page workers, and preserve
source identity for dialogs, choosers, popups and script navigation.
Record native navigation history once, retain observed URLs and titles at
adoption, and publish error-Document failure before its frozen frame commit.
Add controlled WebSocket regressions for handoff, cancellation and recovery.
Separate backend identity, session frontend bindings, and publication. Publish missing Inspector paths before returning usable node IDs, validate CDP frontend inputs, and retain explicit internal automation bindings.
Preserve expanded and associated subtrees during refresh and mutation resync, including shallow template fragments. Cover cross-command behavior and message ordering with a raw CDP client mirror, Chromium comparisons, and real chromedp queries.
Route CDP Page.printToPDF and CLI PDF dumps through an owned snapshot PDF
backend with embedded subset fonts and logical text cluster mappings.
Preserve print layout isolation, page selection, and bounded local raster
fallbacks. Pin Krilla to upstream Git and share its font parsing dependencies
with the existing rendering stack where version constraints allow.
Add PDF extraction, pagination, graphics, and print lifecycle regressions,
fixed font fixtures, and reader and CDP smoke checks.
Refs #279.
Large semantic dumps retain a JSON object graph with allocated field names
and string node references for every AX node before formatting the output.
Build compact typed nodes with numeric references and pass them directly
from the renderer to the CLI. Keep one AX traversal for both typed nodes
and CDP payloads, converting protocol nodes individually as they are built.
Preserve omitted/empty fields, field insertion order, list markers, and
frame-root attachment order. Render text iteratively and trim in place.
Add compatibility coverage and a standalone benchmark that stages both
executables on the same filesystem, alternates runs, records peak RSS and
wall time, and rejects changes to dump output bytes.
Against main at 5f5e1fff3 on a generated 40,000-row list (three interleaved
runs, medians):
- semantic_tree_text: 718.42 -> 390.96 MiB; 2.919 -> 2.204 s.
- semantic_tree: 815.71 -> 483.81 MiB; 2.484 -> 2.369 s.
- markdown control: 95.52 -> 95.59 MiB; 0.895 -> 0.913 s.
A generated 200,000-row list also completes with identical bytes (one run):
- semantic_tree_text: 3473.02 -> 1775.07 MiB; 13.245 -> 10.015 s.
- semantic_tree: 3803.45 -> 2137.26 MiB; 12.626 -> 10.397 s.
JSON/text comparisons also match the baseline on a mixed fixture containing
hidden/ignored nodes, form values, list markers, shadow DOM, and child frames.
These generated fixtures are independent of the external MOL-269 evidence.
Validation:
- cargo fmt --all
- cargo clippy --workspace --all-targets --all-features -- -D warnings
- cargo nextest run --no-fail-fast (19,885 passed, 17 skipped)
- cargo build --release -p moli
Refs: MOL-269
A delayed addBinding adapter could repersist and reapply bindings after a
later Runtime.disable had cleared them. Commit persistent add/remove
mutations in the renderer turn and project their frozen state with the
NativeTerminal, alongside enable/disable. Adapter completion no longer
writes a stale binding snapshot back to either owner.
Unregister V8 bindings during disable as well as clearing restore metadata,
so re-enabling cannot reactivate a removed binding. Include the retained
binding output and metadata in transport memory accounting.
Cover delayed addBinding, unpolled and reversed binding completions, and
binding calls after re-enabling. Document and test the existing committed
SessionSink disable success policy after owner retirement, including
ordered delivery and no duplicate terminal on late adapter completion.
Append ready command records directly to the Page journal and publish them
at the common owner-turn settlement boundary. Replace continuation-owned
record batches with exact cursors for internal completion dependencies.
Publish loaded-page frontend Runtime.enable/disable, frozen Inspector output,
and session updates through NativeTerminal. Apply subscriptions and replay
at ordered ingress so delayed adapters cannot reverse newer enable/disable
state. Complete disable binding updates in the originating renderer turn.
Retain exact predecessors for internal/collector completion success and
projection errors, and charge replay/V8 state to the transport memory budget.
Cover unpolled and reversed completions, cancellation after publication,
owner retirement, unresolved Promise output and concurrent ready replies,
and navigation handoff with controlled regression tests.
Stamp every successful Page VM state capture with its VM creation identity
and capture sequence, including nested captures. Reject older revisions at
the shared Page cache installation point while preserving each query reply.
A real same-document regression holds two DOM snapshots and consumes them in
reverse order. Both return their captured titles, while the cached title
must remain the newer value.
Native CDP replies can expose resources before the protocol adapter consumes
its Page snapshot. Resolve, decode, and search sources in one renderer command
instead of refreshing a snapshot and selecting cached content in the adapter.
Pass the immutable main response body by committed loader and preserve frame
matching, decoding, byte limits, and the attachment check before settlement.
Require a single renderer turn in the held-native-publication regression.
Native Page replies can reach the frontend before the adapter updates the cached resource report. Capture a current renderer snapshot before selecting root frame subresources and reject completions from replaced renderer attachments.
Add regressions for resource searches before native adapter settlement and for navigation before consuming a resource snapshot.
Create script auxiliary Pages synchronously and let their CDP targets adopt
those exact Pages. Preserve Page and WindowProxy identity through document
navigation, sharing browsing-context names, opener references, message endpoints
and close state with related windows.
Commit browser responses into the existing Page with exact document admission,
cancellation and failure disposition. Capture accepted navigation origin, base,
policy, storage and referrer, preserve auxiliary history and restore related
browsing-context groups without issuing duplicate popup requests.
Reuse the initial same-origin Window while replacing its Document, and centralize
Document owner transitions, descendant retirement and Inspector publication.
Give related Pages independent Inspector routes and shared per-Page startup
pause state, route isolate foreground work through surviving Pages, and cache
cross-origin Window functions in each accessing realm with receiver-aware access.
Cover actual popup state, navigation and parser rebinding, accepted environments,
history, cross-origin access, multiple frontends, cancellation and task retirement.
Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast.
Track each window's selected tab and browser focus independently of protocol
page routing. Keep window bounds, adjacent-tab close selection, discovery and
target metadata consistent with their owning windows and documents.
Queue renderer activity updates outside the CDP actor, preserve their output
fences and remember admitted activity so focus reversals survive a busy page.
Cover window selection, focus-event state and busy-context activation.
Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast.
Expose secure Document.modelContext APIs with document-owned registrations,
callback realm and input validation, task-based result delivery, and independent
caller cancellation and target completion. Preserve cancellation reasons and
emit lifecycle events only for live owners.
Register native declarative forms in light and shadow trees through indexed
mutation candidates. Track schema changes to valid forms even before a
registration succeeds, including controls associated through a form attribute.
Use changed containers only for ancestor and form-owner checks; inspect added
and removed subtrees for discovery. Retire registrations at actual removal and
owner transitions while preserving submit handling and captured pending responses. Apply validated
fill intents to current options and checkable values in control event order.
Compute tools delegation from committed security origins, ancestor header
allowlists, container declarations, redirects, and combined sandbox policies.
Carry invocation identity, original origin, and resolved target through form
navigation; accept same-origin JSON-LD results and reject cross-origin commits.
Connect typed renderer observations to CDP discovery, invocation, cancellation,
and Runtime result projection. Include renderer and protocol regression coverage
for document lifetime, reentrancy, permissions, dynamic controls, and cancellation.
Validation on this commit tree: cargo fmt --all;
cargo clippy --workspace --all-targets --all-features -- -D warnings;
cargo nextest run --no-fail-fast.
Summary [ 100.619s] 19320 tests run: 19320 passed, 16 skipped
Apply scrollbar hiding to the live Page before acknowledging the command, preserve the startup flag, and replay the target setting before navigation scripts. Validate the required boolean and layout mode, track per-session state, and clear overrides on detach.
Refs #1081
Share terminal authority with Inspector and publish ready native replies
after their renderer facts, independently of adapter polling. Keep typed
internal completions separate and settle caches against the exact residence.
Define exhaustive backend entry requirements for nested Main dispatch and
release Main and IO admission at backend entry. Bind native continuations
and preserve their owner lifecycle before terminal projection.
Migrate Page and DOMSnapshot through the generic operation boundary,
including live tree URLs, initial DocumentLoader identity, document capture
and isolated worlds. Cover cancellation, retirement and pause ordering,
and release held popup fixture routes before awaiting initialization.
Move old-document debugger termination into renderer preparation scopes instead of tracking protocol navigation IDs in DevTools. Reject superseded response jobs using exact navigation tokens and cancellation authority, and retire their renderer-channel suspension independently.
Cover response interception and supersession while paused, repeated pauses, and prepare commit/cancellation/drop cleanup. Verified cargo fmt --all, workspace all-targets all-features clippy with warnings denied, 18444 nextest tests, and 20 stress iterations of 127 focused tests.
Track provisional loads by navigation ID on the existing renderer target and explicitly finish debugger policy on commit or cancellation. Return the pause-loop exit reason and terminate paused old-document execution through V8 Inspector.
Defer intercepted-response document creation until continuation, removing the eager prepared-document paths. Preserve committed documents for aborted navigations and cover repeated pauses, multiple sessions, interception and supersession.
Validated cargo fmt --all, strict workspace clippy, and cargo nextest run --no-fail-fast: 18,429 passed, 13 skipped. New regressions also passed 20 stress iterations and three confirmed debugger-paused ippure navigation probes.
Name coalesced work by the native caches it invalidates, and document that the Worker armed bit tracks the outstanding fallback message rather than mailbox contents.
Consolidate Date/Intl options regressions into named cases and fold time-first legacy dates into the shared parsing matrix, retaining their inputs and native-semantic assertions.
Publish typed invalidation flags under the environment lock and wake isolate owners only after releasing it. Bound page and worker notification work while preserving command FIFO, teardown safety, and observation ordering.
Remove stale wrapper-era dependencies and terminology, and add mailbox race and CDP burst regressions.
Move renderer DevTools command metadata, route-local ingress, and pause coordination out of script_vm. Share the per-session lane algorithm without merging Main and IO state, centralize target lifecycle wiring, and keep first-dispatch permits explicit at the owner boundary.