C/fervent khorana 05b3f6 - #106
Open
titusfortner wants to merge 40 commits into
Open
titusfortner wants to merge 40 commits into
titusfortner wants to merge 40 commits into
Conversation
…uctural, correlated)
…rom driver/bridge
WebSocketConnection accepts and stores a ClientConfig (defaulting to a new one) so the BiDi socket carries the same connection configuration as the HTTP client. The connect itself does not consume it yet (proxy/TLS deferred); exposed for the higher-level layer. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
BiDiBridge#get/go_back/go_forward/refresh now call the generated BiDi::Protocol::BrowsingContext via the Transport seam instead of the hand-written BiDi::BrowsingContext. The bridge owns the session-scoped behavior the generated layer intentionally lacks: the current window handle as the context and the page-load-strategy-derived readiness as the default wait. Autoloads BiDi::Protocol so the generated layer is on the load path. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Transport maps BiDi error codes to the same typed exceptions as the HTTP path via Error.for_error. BiDiBridge navigation rescues UnknownCommandError and retries through the inherited classic Bridge behavior; the command was rejected unparsed, so nothing executed and the retry is safe. Other BiDi errors continue to propagate. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
LogHandler now subscribes/unsubscribes via the generated Protocol::Session over the Transport seam instead of BiDi#send_cmd, while event delivery stays on the socket callbacks. Constructed with the bridge so it can resolve both the command Transport and the event seam; resolving bridge.bidi first preserves the friendly "BiDi must be enabled" error on a non-BiDi bridge. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
BiDi::Network now issues addIntercept/removeIntercept/continue*/provideResponse/ setCacheBehavior through the generated Protocol::Network over the Transport seam, and subscribes via Protocol::Session; the continueWithAuth variants use the generated union flat-hash path. Public wrapper signatures (and the Intercepted* objects that call them) are unchanged. add_intercept now returns the intercept id directly, and the wrapper takes the bridge so it can resolve the command Transport and the event seam. Unit specs assert wire output through a real Transport. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
A union command-param is emitted as a flat wire-keyed hash, which serializes through Transport's Hash branch — that drops nil unconditionally and cannot emit wire null, unlike a typed Parameters object. The generator now fails if a union command-param field is nullable, with an explicit allowlist for the one known case (emulation.setGeolocationOverride#coordinates) deferred to typed outbound union construction. New nullable union params fail loudly rather than silently shipping the null-vs-absent gap. Generated output is unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Transport.for now raises a clear WebDriverError when it cannot resolve a Transport (was a cryptic NoMethodError on a non-bidi context). Adds specs for that and for an explicit nil on a nullable command-param reaching the wire as null through the generated method + Transport (omitting UNSET fields). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
driver.bidi.session.status/subscribe/unsubscribe now go through Protocol::Session over the Transport instead of BiDi#send_cmd. The bridge passes its Transport into the BiDi instance so the session seam can reach it. status returns the generated StatusResult directly (responds to ready/message), dropping the duplicate Status struct and one BiDi::Struct user. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Credentials/Headers/Cookies/UrlPattern now construct the generated AuthCredentials/Header/CookieHeader/StringValue/UrlPattern* types and serialize those, instead of hand-building duplicate wire hashes — the wire shape is sourced once from the schema. Conveniences (URI parsing, to_s coercion, nil-unless-both guard) stay in the hand-written adapters. Wire output is unchanged (now string-keyed; specs updated to match). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WIP - just to make this easier to view the diff