[🐛 Bug]: [bidi] Vendor extensions should not make a spec type extensible
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 15/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 活発
- 技術スタック
- java, javascript, python, ruby
- 領域
- api
調査の方向性
Start with extensible_record? in rb/lib/selenium/webdriver/bidi/support/bidi_generate.rb and the extensibility check in javascript/selenium-webdriver/generate_bidi.mjs, then read docs/decisions/17786-bidi-low-level-behavioral-contract.md. The issue asks for a design decision among four options, not a code patch, so a useful first step is a comment on which option the maintainers prefer. Done means that decision is recorded and the generators are changed to match.
索引モデルが issue の本文から書いたものです。
説明
Description
Problem
Firefox's CDDL adds two fields to browsingContext.Info: moz:name and moz:scope. The Ruby and JavaScript generators respond by making Info extensible, so it accepts and keeps any unknown field, not just these two.
The spec does not mark Info as extensible, and Firefox only adds two named fields. The generators add the extensibility themselves:
- Ruby:
extensible_record? - JavaScript:
generate_bidi.mjs
The same happens to browsingContext.GetTreeParameters and webExtension.InstallParameters, so callers can also send any extra field on them.
Why it matters
ADR 17786 says only types the spec marks extensible may carry or send extra fields, and an unknown field on any other type is logged and dropped (decisions 1, 6 and 9).
Proposal
In every option, a vendor extension no longer changes whether a spec type is extensible. The options differ in what happens to the vendor fields themselves.
Option 1: Add typed vendor fields to the shared type (what Python does today)
InfogetsmozName/mozScope.- Pro: Firefox data is kept and typed.
- Con: Firefox-only members appear on a shared type and are always empty for other browsers, which is confusing.
Option 2: Treat vendor fields as unknown (what Java does in its in-progress work)
- Log a warning and drop them.
- Pro: simplest; shared types stay browser-neutral.
- Con: Firefox data is lost, and every Firefox response logs a warning.
Option 3: Vendor-specific types
- For example,
MozBrowsingContext.getTree()returns aMozInfowith the typed fields. - Pro: typed, and shared types stay browser-neutral.
- Con: means copying whole result types;
Info.childrenis itself a list ofInfo, so the entiregetTreeresult tree would be duplicated.
Option 4: Keep the current Ruby and JavaScript behavior and update the ADR
- A vendor-extended type becomes extensible, and the ADR is amended to allow it.
- Pro: no change to Ruby or JavaScript, and Firefox data is kept.
- Con: the vendor fields stay untyped, and these types accept and send any extra field, not just the vendor ones. Java, Python and .NET would need to adopt the same behavior.
With options 1 to 3, Ruby and JavaScript need to stop marking these types extensible. With option 4, the ADR and the other bindings change instead.
Open to any other solutions to this as well.
Reproducible Code
It's how the BiDi generators in different languages implement vendor part of the schema.
- 主要言語
- Java
- スター
- 34.6k
- フォーク
- 8.7k
- 平均マージ
- 1日 16時間
- マージ済み PR(30日)
- 107
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
SeleniumHQ/selenium のほかの issue
-
C-py I-defect
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
SeleniumHQ/selenium#18438 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
SeleniumHQ/selenium#18323 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
B-build C-py I-enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
SeleniumHQ/selenium#18435 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[🐛 Bug]: Bindings change the user's options when Selenium Manager supplies a browser対応中かも @Liz-Lian が 2 日前に担当しました。 オープンC-dotnet C-java C-nodejs C-py C-rb I-defect
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
SeleniumHQ/selenium#18428 ·
メンテナーはふだん 1 日以内に返信
-
[🐛 Bug]: [rust] Selenium Manager can return a browser from the cache before it finishes copying対応中かも @Liz-Lian が 2 日前に担当しました。 オープンC-rust I-defect
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
SeleniumHQ/selenium#18427 ·
メンテナーはふだん 1 日以内に返信
SeleniumHQ/selenium の issue をすべて見る
似ている issue
-
area-integrations
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
? - Needs Triage bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
NVIDIA/cudf-spark-jni#5598 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
oracle/graalvm-reachability-metadata#12264 ·
メンテナーはふだん 1 日以内に返信
-
[source-facebook-pages] post stream never returns attachments.media_type対応中かも @v-k-data が今日担当しました。 オープンarea/connectors needs-triage type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信
-
[BUG] AppSync: GetIntrospectionSchema wraps the schema in JSON instead of returning the raw SDL bodyオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
floci-io/floci#10107 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信