Repository navigation
Description
Description
ADR 17786 decision 4 holds every value to its declared type, and decisions 5 and 7 enforce that before sending and on receipt. A review finding on #18190 led to a survey of the generated BiDi layers, which found three cases where list elements aren't held to their element type. Map values are tracked in #18106. .NET is left out because its BiDi layer is hand-written.
1. Primitive list elements
A wrong-typed element in a list of primitives (session.SubscribeParameters.events, session.ManualProxyConfiguration.noProxy) should error before sending and raise on receipt. Python, Java and JavaScript already do.
- Ruby: emit the element primitive for list fields in the generator (today
eventsrenders as{wire_key: 'events', list: true}), and check each element against it inRecordbefore sending (rb/lib/selenium/webdriver/bidi/serialization/record.rb:129skips the primitive check for lists) and on receipt (readreturns lists without checking their elements).
2. null list elements
A null element in a list whose element type isn't nullable should be rejected. JavaScript already does.
- Ruby: reject a
nilelement inRecordbefore sending and on receipt, unless the element type is nullable. Today primitive lists accept[1, nil]in both directions, and enum lists acceptnilon receipt (Serialization.to_symbolreturnsnilfor anilelement) though they reject it when sending. Lists of records and unions already reject it. - Python: reject a
Noneelement before sending and on receipt, unless the element type is nullable._validate_outbound_scalarreturns early onNone(py/selenium/webdriver/common/_bidi/serialization.py:500), and_read_scalarskips its primitive check forNone(:428). - Java: reject a JSON
nullelement on receipt, unless the element type is nullable.JsonTypeCoercerreturns null for it (java/src/org/openqa/selenium/json/JsonTypeCoercer.java:146). Sending already rejects it.
3. Union list elements
An element outside a list's union of scalars should be rejected. browsingContext.PrintParameters.pageRanges is a list of js-uint / text. JavaScript already does.
- Ruby: emit the allowed primitives for a list whose elements are a union of scalars (today
pageRangesrenders as{wire_key: 'pageRanges', required: false, list: true}), and check each element against them inRecordbefore sending and on receipt. - Python: resolve a union of scalars to the set of allowed primitives instead of
Any(py/generate_bidi_protocol.py:687), and check each element ofpageRangesagainst it before sending and on receipt. Today it islist[Any]. - Java: check each element of a union-typed list against the union's arms before sending and on receipt. Today a union element resolves to
Object(java/src/org/openqa/selenium/bidi/BiDiGenerator.java:1960), sopageRangesis an uncheckedList<Object>, andscript.MappingLocalValueandscript.MappingRemoteValueentries are uncheckedList<List<Object>>.
Activity
Bowen-Xue-ac2 commentedon Oct 21, 2026
Hi there, I opened #18216 (Python) and #18217 (Java), but I have not been able to complete the CLA signing process. Both CLA Assistant links return “no healthy upstream”, and the homepage returns the same error. Is there an alternative signing process, or should I retry once the service is available? Thanks.