[🐛 Bug]: [bidi] Vendor extensions should not make a spec type extensible
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 15/100
- Tipo de issue
- Error
- Claridad
- Necesita aclaración
- Estado de actividad
- Activo
- Stack tecnológico
- java, javascript, python, ruby
- Área
- api
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Java
- Estrellas
- 34.6k
- Forks
- 8.7k
- Merge medio
- 1 d 16 h
- PR fusionados (30 d)
- 107
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de SeleniumHQ/selenium
-
C-py I-defect
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
SeleniumHQ/selenium#18438 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
SeleniumHQ/selenium#18323 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
B-build C-py I-enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 68/100
SeleniumHQ/selenium#18435 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[🐛 Bug]: Bindings change the user's options when Selenium Manager supplies a browserPosiblemente ocupada @Liz-Lian la tomó hace 2 días. AbiertoC-dotnet C-java C-nodejs C-py C-rb I-defect
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
SeleniumHQ/selenium#18428 ·
Los mantenedores suelen responder en 1 día
-
[🐛 Bug]: [rust] Selenium Manager can return a browser from the cache before it finishes copyingPosiblemente ocupada @Liz-Lian la tomó hace 2 días. AbiertoC-rust I-defect
Dificultad 3/5 1-2 días Aptitud para principiantes 65/100
SeleniumHQ/selenium#18427 ·
Los mantenedores suelen responder en 1 día
Todos los issues de SeleniumHQ/selenium
Issues similares
-
area-integrations
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
? - Needs Triage bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
NVIDIA/cudf-spark-jni#5598 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
oracle/graalvm-reachability-metadata#12264 ·
Los mantenedores suelen responder en 1 día
-
[source-facebook-pages] post stream never returns attachments.media_typePosiblemente ocupada @v-k-data la tomó hoy. Abiertoarea/connectors needs-triage type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
Los mantenedores suelen responder en 1 día
-
[BUG] AppSync: GetIntrospectionSchema wraps the schema in JSON instead of returning the raw SDL bodyAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
floci-io/floci#10107 · 1 comentario ·
Los mantenedores suelen responder en 1 día