[adr] Install browser extensions from the driver directly - #17817
[adr] Install browser extensions from the driver directly#17817titusfortner wants to merge 18 commits into
Conversation
Code Review by Qodo
1.
|
PR Summary by QodoPropose ADR: install/uninstall extensions via driver API (BiDi pipe on Chromium)
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
|
Code review by qodo was updated up to the latest commit 551bc46 |
|
Code review by qodo was updated up to the latest commit d047e73 |
There was a problem hiding this comment.
Pull request overview
This PR adds a proposed Architecture Decision Record (ADR) documenting a cross-binding design decision to support mid-session browser extension installation directly from the driver, using BiDi as the implementation mechanism and adjusting Chromium transport/CDP behavior to make this work without extra user flags.
Changes:
- Adds ADR 17817 describing a new driver-level
installExtension/uninstallExtensionsurface across bindings. - Documents the rationale for using BiDi + pipe transport in Chromium and the resulting CDP API limitations.
- Captures alternatives considered (API placement, naming, transport default, unsigned extension posture) and their tradeoffs.
|
Code review by qodo was updated up to the latest commit cfdf561 |
|
Code review by qodo was updated up to the latest commit b1b9606 |
|
Code review by qodo was updated up to the latest commit bfec758 |
|
Code review by qodo was updated up to the latest commit 4b825a3 |
|
Code review by qodo was updated up to the latest commit e894d6a |
|
Code review by qodo was updated up to the latest commit 8ac2df1 |
|
Code review by qodo was updated up to the latest commit 183e0ad |
|
Code review by qodo was updated up to the latest commit 192c35b |
|
Code review by qodo was updated up to the latest commit 1969b32 |
|
Code review by qodo was updated up to the latest commit e23bc4e |
… vendor-option raise
|
Code review by qodo was updated up to the latest commit 2c7d7e8 |
diemol
left a comment
There was a problem hiding this comment.
I think this makes sense, and it is good that we're going to have an alignment across all bindings.
| - Because the browser may run on a different host than the client (Grid), the implementation cannot pass a | ||
| client-local path; the extension has to be delivered to the target host itself. |
There was a problem hiding this comment.
1. Ambiguous remote-end wording 🐞 Bug ⚙ Maintainability
The ADR says the extension must be “delivered to the target host,” but doesn’t define whether that is the WebDriver remote end (driver/server) vs a Grid node/browser host, which can lead to inconsistent assumptions about where path resolution and content transfer occur. Clarify using WebDriver “remote end” terminology and explicitly state that implementations must transfer extension content (archive bytes/base64) rather than sending a client-local filesystem path.
Agent Prompt
## Issue description
The ADR’s consequence text uses the term “target host” without defining the protocol boundary (WebDriver remote end vs Grid node/browser host). This can cause inconsistent interpretations of who is responsible for transferring extension data vs resolving filesystem paths.
## Issue Context
Selenium already handles similar “client-local path” vs “remote execution” boundaries by uploading file contents to the WebDriver remote end rather than passing local filesystem paths.
## Fix Focus Areas
- docs/decisions/17817-driver-extension-install.md[89-90]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
|
Code review by qodo was updated up to the latest commit fdffcad |
📄 The decision, its rationale, considered options, and consequences are in the record file this PR adds; read it there. The sections below are proposal notes and review logistics.
🔗 Related
Prototype implementation in Ruby: #17879
--load-extensionswitch on Chrome builds #15788 — Chrome removed the--load-extensionswitch in branded builds, which is what makes post-session install a requirement rather than a convenience.📝 Proposal notes
--remote-debugging-pipeand--enable-unsafe-extension-debuggingto install/debug extensions via CDP — crrev.com/c/7765453 ("Remove requirements for--remote-debugging-pipeand--enable-unsafe-extension-debuggingfor debugging of extensions via CDP"), with the switch removed entirely in the follow-up crrev.com/c/7776996. Extension install now works over the WebSocket, so BiDi extension install and the CDP API coexist — there's no pipe-vs-port choice and no CDP-disabling side effect.moz:permanentandmoz:allowPrivateBrowsing) that must be supported as well (see Merge vendor cddl files into shared BiDi schema and implement custom Firefox webExtension options #17840).allowPrivateBrowsingsupport arrived in geckodriver 0.36.0. Before 0.36.0 the classic/moz/addon/installendpoint accepted onlytemporary; passingallowPrivateBrowsingerrors on those older geckodrivers. geckodriver ≥ 0.36.0 honors it (firefox-beta ships this, which is why classic +allowPrivateBrowsing: truegrants access rather than failing). Because geckodriver itself errors when the option is unsupported, bindings do not need to validate it on the classic path. The BiDi path is uniform across versions.🗣 Discussion
Discussed at the TLC meetings below; see the minutes for the full discussion and attribution.
web extension install/uninstall; Grid installs on Chromium stay unsupported for now.
📌 Tracking
Tracking issue: (linked on acceptance)