Skip to content

[adr] Selenium Manager released API#17741

Open
titusfortner wants to merge 3 commits into
trunkfrom
c/wizardly-blackwell-68a46f
Open

[adr] Selenium Manager released API#17741
titusfortner wants to merge 3 commits into
trunkfrom
c/wizardly-blackwell-68a46f

Conversation

@titusfortner

@titusfortner titusfortner commented Jul 2, 2026

Copy link
Copy Markdown
Member

📄 The decision, rationale, options, and consequences are in the record file this PR adds
(docs/decisions/selenium-manager-released-api.md). This body is proposal notes and logistics only.

🔗 Related

📝 Proposal notes

  • Why this is needed. We're looking to release Selenium Manager independently of the bindings,
    so a binding and the Selenium Manager it invokes can differ in version. This record fixes the
    forwards- and backwards-compatible contract, and the defaults, that requires.
  • What's included. The contract-locking decisions — the forward-compatibility behavior and every
    committed default — and the obligations releasing independently creates: independent
    versioning/distribution and telemetry. Additive features and bugs stay ordinary issues, not
    contract.

🗣 Discussion

📌 Tracking

Tracking issue: (linked on acceptance)

@qodo-code-review

Copy link
Copy Markdown
Contributor

PR Summary by Qodo

Add ADR for independently released Selenium Manager API contract

📝 Documentation 🕐 10-20 Minutes

Grey Divider

AI Description

• Add an ADR defining Selenium Manager’s independent versioning and distribution contract.
• Specify forward-compatibility behavior for version skew, unknown switches, and unknown values.
• Document committed defaults for output, resolution behavior, and telemetry expectations.
Diagram

graph TD
  ADR["ADR: Released API"] --> B["Bindings"] --> SM["Selenium Manager"] --> RES["Driver resolution"]
  ADR --> SM
  U["Standalone users"] --> SM
  SM --> TEL["Telemetry events"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Add a machine-readable CLI/output spec (schema) alongside the ADR
  • ➕ Enables automated compatibility checks for output fields across releases
  • ➕ Helps bindings validate parsing expectations and reduces ambiguity
  • ➖ Extra maintenance burden; schema versioning becomes part of the contract
  • ➖ Doesn’t replace the need for narrative rationale/decision history
2. Add conformance tests for version-skew scenarios in CI
  • ➕ Turns the forward-compatibility rules into executable guarantees
  • ➕ Reduces risk of accidental breaking changes in rust/ changes
  • ➖ Requires infrastructure to test multiple SM versions and skewed binding inputs
  • ➖ May be slower to implement than the documentation-only step
3. Introduce a version handshake/capabilities query between bindings and SM
  • ➕ Allows bindings to adapt behavior based on SM feature support
  • ➕ Can reduce reliance on “warn and ignore” semantics for unknown switches
  • ➖ Adds protocol complexity and another contract surface to support long-term
  • ➖ Harder to keep minimal for a CLI-first tool

Recommendation: The ADR-first approach is appropriate to lock the cross-version contract before/alongside 1.0 and independent releases. Consider follow-up work to add conformance tests (best ROI) and optionally a machine-readable schema if output parsing becomes a frequent source of regressions.

Files changed (1) +85 / -0

Documentation (1) +85 / -0
selenium-manager-released-api.mdAdd ADR defining Selenium Manager independent-release API contract +85/-0

Add ADR defining Selenium Manager independent-release API contract

• Introduces a decision record specifying independent semantic versioning/distribution for Selenium Manager, CLI output defaults, and forward-compatibility behavior under version skew. Documents resolution rules (provided/PATH drivers) and telemetry consent/metadata requirements, plus considered options and consequences.

docs/decisions/selenium-manager-released-api.md

Comment on lines +1 to +5
# 17741. Selenium Manager ships as an official, independently released tool

- Status: Proposed
- Discussion: https://github.com/SeleniumHQ/selenium/pull/17741

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Informational

1. Missing decision date 🐞 Bug ⚙ Maintainability

The decision record omits the required - Date: YYYY-MM-DD metadata line, so the record doesn’t
state when its status last changed and doesn’t conform to the decision template used in this repo.
Agent Prompt
### Issue description
The new decision record is missing the required `Date` metadata line (date the status last changed).

### Issue Context
The decision template includes `Status`, `Date`, and `Discussion` fields at the top of the file.

### Fix Focus Areas
- docs/decisions/17741-selenium-manager-released-api.md[1-5]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +82 to +85
## Consequences

- Once released, the contract constrains every `rust/` change: no switch, value, or output field
changes without a deprecation cycle, and the current defaults are locked.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

2. Missing binding status table 🐞 Bug ⚙ Maintainability

The record lacks a ## Binding status section/table, which the documented process uses to track
per-binding implementation and which is the only section intended to be editable after acceptance.
Agent Prompt
### Issue description
The decision record is missing the `## Binding status` section and tracking table.

### Issue Context
The template includes a binding-status table, and the process doc says bindings track convergence there and that updating that table is the only post-acceptance edit allowed (besides the status line).

### Fix Focus Areas
- docs/decisions/17741-selenium-manager-released-api.md[82-85]
- docs/decisions/0000-template.md[39-51]
- docs/decisions/README.md[28-45]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment thread docs/decisions/17741-selenium-manager-released-api.md Outdated
@qodo-code-review

qodo-code-review Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (4) 📘 Rule violations (0) 📜 Skill insights (0)

Context used
✅ Compliance rules (platform): 11 rules

Grey Divider


Action required

1. Missing binding status table 🐞 Bug ⚙ Maintainability
Description
The record lacks a ## Binding status section/table, which the documented process uses to track
per-binding implementation and which is the only section intended to be editable after acceptance.
Code

docs/decisions/17741-selenium-manager-released-api.md[R82-85]

+## Consequences
+
+- Once released, the contract constrains every `rust/` change: no switch, value, or output field
+  changes without a deprecation cycle, and the current defaults are locked.
Evidence
The record ends after ## Consequences with no binding-status section, while the template and
process docs define and rely on a binding-status table for implementation tracking.

docs/decisions/17741-selenium-manager-released-api.md[82-85]
docs/decisions/0000-template.md[39-51]
docs/decisions/README.md[28-45]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The decision record is missing the `## Binding status` section and tracking table.

### Issue Context
The template includes a binding-status table, and the process doc says bindings track convergence there and that updating that table is the only post-acceptance edit allowed (besides the status line).

### Fix Focus Areas
- docs/decisions/17741-selenium-manager-released-api.md[82-85]
- docs/decisions/0000-template.md[39-51]
- docs/decisions/README.md[28-45]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Telemetry policy inconsistent ✓ Resolved 🐞 Bug ≡ Correctness
Description
The ADR’s Decision section says telemetry is collected by default (opt-out), but the Considered
options section marks “opt-out when bundled, opt-in when standalone” as selected, leaving the actual
standalone default ambiguous.
Code

docs/decisions/17741-selenium-manager-released-api.md[R47-80]

+**Telemetry.**
+
+- Data is collected by default and can be disabled. It is anonymous and holds no PII, but SM makes a
+  best effort to inform users: run from an interactive session it prompts on first use and stores the
+  result; run non-interactively it emits a clear `WARN` with what data is sent and how to disable it.
+- The binding must pass in the Selenium version and language (name and version).
+- SM must pass in the SM version.
+
+## Considered options
+
+- **Leaving Beta.**
+  - Stay in Beta — contract stays mutable.
+  - Drop the label but keep versioning coupled to the bindings — empty releases, no standalone use.
+  - Independently versioned, standalone-released — **selected**.
+- **Default `--output`.**
+  - Keep `logger` — log lines on stdout pollute `$(selenium-manager …)`.
+  - `mixed` — result on stdout, logs on stderr; bindings set it explicitly, so are unaffected — **selected**.
+- **Unknown switch, or unknown value of a switch with a default.**
+  - Error — turns expected skew into a broken session.
+  - Warn and ignore the switch, or use the default value — **selected**.
+- **Unknown value of a switch with no default** (e.g. `--browser`).
+  - Warn and substitute a fallback — silently does something other than what was asked.
+  - Error, directing the user to update SM — **selected**.
+- **A provided driver.**
+  - Keep bypassing SM — the browser is left unmanaged.
+  - Always run SM — breaks backward compatibility.
+  - Run it behind a toggle, default unchanged — **selected**.
+- **A mismatched `PATH` driver.**
+  - Use it with a warning — usually still fails at session start.
+  - Do not use it, fetch a matching one — **selected**.
+- **Telemetry consent.**
+  - Silent opt-out everywhere — weak for a released tool.
+  - Opt-in everywhere — the binding path collects nothing.
+  - Opt-out with a notice when bundled, opt-in when standalone — **selected**.
Evidence
These two sections describe incompatible defaults: “collected by default” contradicts “opt-in when
standalone” being the selected policy, which makes the contract unclear for implementers and users.

docs/decisions/17741-selenium-manager-released-api.md[47-53]
docs/decisions/17741-selenium-manager-released-api.md[77-80]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The ADR contains two conflicting statements about telemetry consent/defaults (opt-out vs opt-in for standalone).

### Issue Context
In `## Decision`, telemetry is described as collected by default and disableable. In `## Considered options`, the selected option states opt-in when standalone.

### Fix Focus Areas
- docs/decisions/17741-selenium-manager-released-api.md[47-53]
- docs/decisions/17741-selenium-manager-released-api.md[77-80]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

3. Defaults not enumerated 🐞 Bug ⚙ Maintainability ⭐ New
Description
The ADR says “current defaults” are locked as part of the stable contract, but it doesn’t actually
list which defaults are being locked and instead points to an external reference. This conflicts
with the repo’s rule that decision records must be understandable without following links and leaves
the contract ambiguous when defaults change.
Code

docs/decisions/17741-selenium-manager-released-api.md[R37-38]

+- Current defaults must not change once released, and must all be documented
+  ([configuration reference](https://www.selenium.dev/documentation/selenium_manager/#configuration)).
Evidence
The ADR explicitly says defaults are locked but directs readers to an external configuration
reference, while the decisions process requires the record to stand alone without needing links.

docs/decisions/17741-selenium-manager-released-api.md[37-38]
docs/decisions/17741-selenium-manager-released-api.md[86-87]
docs/decisions/README.md[63-64]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The ADR locks “current defaults” but doesn’t enumerate them, requiring readers to follow an external link to know what is actually committed.

### Issue Context
`docs/decisions/README.md` states decision records must stand alone without requiring links. The ADR currently references an external configuration page instead of listing the defaults it intends to lock.

### Fix Focus Areas
- docs/decisions/17741-selenium-manager-released-api.md[8-12]
- docs/decisions/17741-selenium-manager-released-api.md[37-38]
- docs/decisions/17741-selenium-manager-released-api.md[86-87]
- docs/decisions/README.md[63-64]

### Suggested change
Add an explicit, in-record list of the defaults that are being made part of the immutable contract (and keep the link as “background/further reading” if desired).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


4. Overbroad unknown-switch claim 🐞 Bug ≡ Correctness ⭐ New
Description
The ADR justifies ignoring unknown switches by claiming switches “only adjust resolution,” but
Selenium Manager already has switches that affect telemetry, network/offline behavior, and cache
deletion. Leaving this phrasing as-is is misleading and could cause future contract confusion about
what kinds of new switches are safe to ignore under version skew.
Code

docs/decisions/17741-selenium-manager-released-api.md[R27-28]

+- *Unknown switch* → warn (tell the user to update SM) and ignore; the binding still gets valid
+  paths. A switch only adjusts resolution, so dropping it is safe.
Evidence
The ADR asserts that switches only adjust resolution, but the current CLI includes switches with
broader side effects (offline/telemetry/cache), making the rationale factually inaccurate and
potentially misleading as a contract principle.

docs/decisions/17741-selenium-manager-released-api.md[27-28]
rust/src/main.rs[115-155]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The ADR says unknown switches can be ignored because “a switch only adjusts resolution,” which is not generally true for Selenium Manager switches.

### Issue Context
Selenium Manager’s current CLI already includes switches that change behavior beyond “resolution” (e.g., offline mode, telemetry opt-out, cache deletion). The ADR should avoid a blanket statement and instead define a constraint like: *any future switch added after 1.0 must be safe to ignore (advisory-only), otherwise it must be introduced via a mechanism that won’t be silently dropped by older binaries.*

### Fix Focus Areas
- docs/decisions/17741-selenium-manager-released-api.md[24-34]
- rust/src/main.rs[115-155]

### Suggested change
Replace the sentence “A switch only adjusts resolution, so dropping it is safe.” with a more precise contract statement about which classes of future switches are permitted (i.e., only those that are safe to ignore), and call out that privacy/safety-affecting controls must not be introduced as ignorable switches.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Informational

5. Missing decision date 🐞 Bug ⚙ Maintainability
Description
The decision record omits the required - Date: YYYY-MM-DD metadata line, so the record doesn’t
state when its status last changed and doesn’t conform to the decision template used in this repo.
Code

docs/decisions/17741-selenium-manager-released-api.md[R1-5]

+# 17741. Selenium Manager ships as an official, independently released tool
+
+- Status: Proposed
+- Discussion: https://github.com/SeleniumHQ/selenium/pull/17741
+
Evidence
The added record’s header includes Status and Discussion but not Date, while the repo’s
template explicitly includes a Date field.

docs/decisions/17741-selenium-manager-released-api.md[1-5]
docs/decisions/0000-template.md[6-9]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The new decision record is missing the required `Date` metadata line (date the status last changed).

### Issue Context
The decision template includes `Status`, `Date`, and `Discussion` fields at the top of the file.

### Fix Focus Areas
- docs/decisions/17741-selenium-manager-released-api.md[1-5]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Previous review results

Review updated until commit e90b495

Results up to commit b59bb22


🐞 Bugs (2) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)


Action required
1. Missing binding status table 🐞 Bug ⚙ Maintainability
Description
The record lacks a ## Binding status section/table, which the documented process uses to track
per-binding implementation and which is the only section intended to be editable after acceptance.
Code

docs/decisions/17741-selenium-manager-released-api.md[R82-85]

+## Consequences
+
+- Once released, the contract constrains every `rust/` change: no switch, value, or output field
+  changes without a deprecation cycle, and the current defaults are locked.
Evidence
The record ends after ## Consequences with no binding-status section, while the template and
process docs define and rely on a binding-status table for implementation tracking.

docs/decisions/17741-selenium-manager-released-api.md[82-85]
docs/decisions/0000-template.md[39-51]
docs/decisions/README.md[28-45]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The decision record is missing the `## Binding status` section and tracking table.

### Issue Context
The template includes a binding-status table, and the process doc says bindings track convergence there and that updating that table is the only post-acceptance edit allowed (besides the status line).

### Fix Focus Areas
- docs/decisions/17741-selenium-manager-released-api.md[82-85]
- docs/decisions/0000-template.md[39-51]
- docs/decisions/README.md[28-45]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Telemetry policy inconsistent ✓ Resolved 🐞 Bug ≡ Correctness
Description
The ADR’s Decision section says telemetry is collected by default (opt-out), but the Considered
options section marks “opt-out when bundled, opt-in when standalone” as selected, leaving the actual
standalone default ambiguous.
Code

docs/decisions/17741-selenium-manager-released-api.md[R47-80]

+**Telemetry.**
+
+- Data is collected by default and can be disabled. It is anonymous and holds no PII, but SM makes a
+  best effort to inform users: run from an interactive session it prompts on first use and stores the
+  result; run non-interactively it emits a clear `WARN` with what data is sent and how to disable it.
+- The binding must pass in the Selenium version and language (name and version).
+- SM must pass in the SM version.
+
+## Considered options
+
+- **Leaving Beta.**
+  - Stay in Beta — contract stays mutable.
+  - Drop the label but keep versioning coupled to the bindings — empty releases, no standalone use.
+  - Independently versioned, standalone-released — **selected**.
+- **Default `--output`.**
+  - Keep `logger` — log lines on stdout pollute `$(selenium-manager …)`.
+  - `mixed` — result on stdout, logs on stderr; bindings set it explicitly, so are unaffected — **selected**.
+- **Unknown switch, or unknown value of a switch with a default.**
+  - Error — turns expected skew into a broken session.
+  - Warn and ignore the switch, or use the default value — **selected**.
+- **Unknown value of a switch with no default** (e.g. `--browser`).
+  - Warn and substitute a fallback — silently does something other than what was asked.
+  - Error, directing the user to update SM — **selected**.
+- **A provided driver.**
+  - Keep bypassing SM — the browser is left unmanaged.
+  - Always run SM — breaks backward compatibility.
+  - Run it behind a toggle, default unchanged — **selected**.
+- **A mismatched `PATH` driver.**
+  - Use it with a warning — usually still fails at session start.
+  - Do not use it, fetch a matching one — **selected**.
+- **Telemetry consent.**
+  - Silent opt-out everywhere — weak for a released tool.
+  - Opt-in everywhere — the binding path collects nothing.
+  - Opt-out with a notice when bundled, opt-in when standalone — **selected**.
Evidence
These two sections describe incompatible defaults: “collected by default” contradicts “opt-in when
standalone” being the selected policy, which makes the contract unclear for implementers and users.

docs/decisions/17741-selenium-manager-released-api.md[47-53]
docs/decisions/17741-selenium-manager-released-api.md[77-80]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The ADR contains two conflicting statements about telemetry consent/defaults (opt-out vs opt-in for standalone).

### Issue Context
In `## Decision`, telemetry is described as collected by default and disableable. In `## Considered options`, the selected option states opt-in when standalone.

### Fix Focus Areas
- docs/decisions/17741-selenium-manager-released-api.md[47-53]
- docs/decisions/17741-selenium-manager-released-api.md[77-80]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Informational
3. Missing decision date 🐞 Bug ⚙ Maintainability
Description
The decision record omits the required - Date: YYYY-MM-DD metadata line, so the record doesn’t
state when its status last changed and doesn’t conform to the decision template used in this repo.
Code

docs/decisions/17741-selenium-manager-released-api.md[R1-5]

+# 17741. Selenium Manager ships as an official, independently released tool
+
+- Status: Proposed
+- Discussion: https://github.com/SeleniumHQ/selenium/pull/17741
+
Evidence
The added record’s header includes Status and Discussion but not Date, while the repo’s
template explicitly includes a Date field.

docs/decisions/17741-selenium-manager-released-api.md[1-5]
docs/decisions/0000-template.md[6-9]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The new decision record is missing the required `Date` metadata line (date the status last changed).

### Issue Context
The decision template includes `Status`, `Date`, and `Discussion` fields at the top of the file.

### Fix Focus Areas
- docs/decisions/17741-selenium-manager-released-api.md[1-5]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Qodo Logo

@titusfortner titusfortner force-pushed the c/wizardly-blackwell-68a46f branch from f87abc8 to e90b495 Compare July 2, 2026 15:18
Comment on lines +37 to +38
- Current defaults must not change once released, and must all be documented
([configuration reference](https://www.selenium.dev/documentation/selenium_manager/#configuration)).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remediation recommended

1. Defaults not enumerated 🐞 Bug ⚙ Maintainability

The ADR says “current defaults” are locked as part of the stable contract, but it doesn’t actually
list which defaults are being locked and instead points to an external reference. This conflicts
with the repo’s rule that decision records must be understandable without following links and leaves
the contract ambiguous when defaults change.
Agent Prompt
### Issue description
The ADR locks “current defaults” but doesn’t enumerate them, requiring readers to follow an external link to know what is actually committed.

### Issue Context
`docs/decisions/README.md` states decision records must stand alone without requiring links. The ADR currently references an external configuration page instead of listing the defaults it intends to lock.

### Fix Focus Areas
- docs/decisions/17741-selenium-manager-released-api.md[8-12]
- docs/decisions/17741-selenium-manager-released-api.md[37-38]
- docs/decisions/17741-selenium-manager-released-api.md[86-87]
- docs/decisions/README.md[63-64]

### Suggested change
Add an explicit, in-record list of the defaults that are being made part of the immutable contract (and keep the link as “background/further reading” if desired).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +27 to +28
- *Unknown switch* → warn (tell the user to update SM) and ignore; the binding still gets valid
paths. A switch only adjusts resolution, so dropping it is safe.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remediation recommended

2. Overbroad unknown-switch claim 🐞 Bug ≡ Correctness

The ADR justifies ignoring unknown switches by claiming switches “only adjust resolution,” but
Selenium Manager already has switches that affect telemetry, network/offline behavior, and cache
deletion. Leaving this phrasing as-is is misleading and could cause future contract confusion about
what kinds of new switches are safe to ignore under version skew.
Agent Prompt
### Issue description
The ADR says unknown switches can be ignored because “a switch only adjusts resolution,” which is not generally true for Selenium Manager switches.

### Issue Context
Selenium Manager’s current CLI already includes switches that change behavior beyond “resolution” (e.g., offline mode, telemetry opt-out, cache deletion). The ADR should avoid a blanket statement and instead define a constraint like: *any future switch added after 1.0 must be safe to ignore (advisory-only), otherwise it must be introduced via a mechanism that won’t be silently dropped by older binaries.*

### Fix Focus Areas
- docs/decisions/17741-selenium-manager-released-api.md[24-34]
- rust/src/main.rs[115-155]

### Suggested change
Replace the sentence “A switch only adjusts resolution, so dropping it is safe.” with a more precise contract statement about which classes of future switches are permitted (i.e., only those that are safe to ignore), and call out that privacy/safety-affecting controls must not be introduced as ignorable switches.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@qodo-code-review

Copy link
Copy Markdown
Contributor

Code review by qodo was updated up to the latest commit e90b495

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant