#1103·obscura

Track Playwright engine compatibility and performance verification

Author: SGavrlCreated Sep 27, 2026Updated Sep 27, 2026

Status

Shipped on main in 542df146932eb9fd6bec5bdf7b724075c17410eb.

This issue records the testing-focused engine update and tracks the remaining external verification work. The commit contains engine, regression-test, build-iteration, and deterministic render-fixture changes.

Compatibility work shipped

  • Process script-driven full-document and same-document navigation through the page pipeline.
  • Preserve the cross-scheme file:// navigation gate through intercepted navigation.
  • Retain the upstream document.open() / write() / close() lifecycle behavior during the main-branch merge.
  • Implement Emulation.setLocaleOverride across navigation.
  • Improve CDP keyboard and mouse parity: modifiers, key codes, hover transitions, double-clicks, and navigation caused by input.
  • Apply preload scripts to existing child frames while retaining removal behavior.
  • Preserve Fetch interception request identity and response bodies, avoid duplicate request-start events, and pause documents before frame commit.
  • Prevent stale document releases from deleting newer remote handles.
  • Keep independent pages responsive when another page has a distant timer.
  • Add atomic single-worker --ready-file publication for CDP server startup.
  • Release by-value CDP results instead of retaining unreachable objects.
  • Return settled promises without draining unrelated timers.
  • Share watchdog scheduling rather than creating one thread per deadline.
  • Improve rejection events, event capture, form-control behavior, CSSOM ownership/invalidation, and non-geometric computed-style reads.

Performance-oriented work shipped

  • Add direct raster capture for CDP screencast JPEG encoding, avoiding a PNG round trip.
  • Downscale bounded screencast output without allocating the full native viewport raster first.
  • Coalesce screencast damage and defer frame delivery until after command responses.
  • Reduce copying in selector, slot, node, stylesheet, and flat-tree paths.
  • Correct retained layout behavior for containment, percentage sizing, sparse-grid overflow, display: contents, and grid track extents.
  • Consolidate CDP integration tests into one binary to reduce repeated V8/browser-engine linking.
  • Add a scoped incremental cargo test-js iteration command without changing production build settings.
  • Add allocation regression checks and deterministic render fixtures for the optimized paths.

Verification

Gate Result
Consolidated CDP integration suite 101 passed, 3 skipped
Affected browser/DOM/JS/render/CLI crates 1,445 passed, 1 skipped
Full release nextest workspace 1,879 passed, 5 skipped
Release obscura-cli render build Passed

Release build command:

bash
CARGO_INCREMENTAL=0 CARGO_BUILD_JOBS=2 cargo build --release -p obscura-cli --bins --features render

Known caveats

  • The obstacle course reported 32/33. Its observer-intersection fixture expects repeated callbacks from the same zero-area sentinel without re-observation or an intersection-threshold transition. Chromium also creates 10 cards rather than the expected 50. Obscura was not changed to violate IntersectionObserver behavior to satisfy this fixture.
  • The deterministic render runner produced Obscura captures for the sampled fixtures, but its paired Chromium phase could not run because Python Playwright was missing. No paired render-comparison result is claimed from that run.
  • The Rust gates demonstrate correctness and regression coverage. They do not establish a new Chromium-relative speedup.

Follow-up

  • Correct the IntersectionObserver obstacle-course fixture in obscura-benchmark and restore an honest 33/33 gate.
  • Run the complete paired deterministic render suite in an environment with Python Playwright.
  • Benchmark identical successful Playwright workloads on Obscura and Chromium with multiple runs and matched workers, network, viewport, settle policy, and capture path.
  • Report wall time, median/p95 test duration, peak process-tree memory, concurrency, and success rate without counting Chromium-broken tests against Obscura.