You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 227676f
Browse filesBrowse the repository at this point in the historyBrowse files
Share the Chrome launcher and retarget CdpClient onto deno-cri (#14835)
A Chrome driver has three layers: launch the process, transport CDP
commands over the socket, and the task logic on top. The launcher and
transport were each duplicated between mermaid's cri.ts and the axe
scanner; this unifies both, leaving only the task logic (cri.ts's
facade vs. scanCell) separate since their commands differ.
- New shared launchChrome() in src/core/cri/launch.ts replaces both
ad hoc launchers, fixing three failure-path bugs along the way: an
unread stdout pipe that could block Chrome, a cri.ts error path
that could hang awaiting cmd.status, and onCleanup handlers that
leaked one per mermaid render since they can't be unregistered
- axe's CdpClient now runs its CDP transport on the vendored
deno-cri, the same client cri.ts uses, removing the third
hand-rolled WebSocket implementation in the tree
- CdpClient adds its own in-flight-send tracking on top of deno-cri,
since deno-cri leaves in-flight commands unsettled forever on a
dropped socket rather than rejecting them
- registerForExitCleanup() now installs its own exit handler, closing
a gap where a command that spawns a browser without shelling out
(quarto call axe) could orphan the process on Ctrl-C
- New tests/smoke/axe/axe-transport-failclosed.test.ts exercises
fail-closed behavior against a real browser instead of a manual
check
- llm-docs/axe-scan-architecture.md updated to describe the shared
launcher and transport
No user-visible change. Verified via full unit/smoke suites, a
byte-identical mermaid PNG render before/after, and a full
quarto-web scan producing an identical finding set before/after.
Follow-up to a review thread on #14815.
0 commit comments