feat(core): parse bounded WebDriver BiDi response envelopes - #186
Draft
seonghobae wants to merge 40 commits into
Draft
feat(core): parse bounded WebDriver BiDi response envelopes#186seonghobae wants to merge 40 commits into
seonghobae wants to merge 40 commits into
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Stacked on exact PR #185 head
afe81c45b5d5be09f980bbd1dd153874b628fef1.Buyer/security gap
#185 bounds the raw WebDriver BiDi response document before parsing. This branch first added complete fail-closed response-envelope parsing and then closed the next local integration gap: one consuming boundary takes that exact bounded document through complete parsing and the existing exact in-flight
locateNodescommand correlation contract, without allowing caller-selected kind/id metadata to bypass document parsing.A current-spec audit also found one concrete interoperability defect on this canonical parser branch: the reviewed WebDriver BiDi Editor’s Draft
ErrorCodevocabulary includesno such client window, but OriginWeave’s closed error-code admission set omitted it. Unknown protocol text must still fail closed, so the repair adds only the reviewed code rather than broadening parsing.Test-first / repair lineage
e9d90dfa73552a8d0dd4e1d022478864b3300167was observed in CI run32106400534; the smallest production repair reused the existing parser and correlation implementations rather than duplicating either authority boundary.f5e087d58f5540993946c5f4057bef3f1623def9. CI run32114308435, Rust contracts job95640284991, checked out that exact head and failed specifically becauseparser_accepts_current_webdriver_bidi_error_code_vocabularyrejectedno such client window.4077a79a49d77cb929a3818371b33c6e90cc7f56added exactlyno such client windowto the closed reviewed ErrorCode set. Unknown values remain rejected; no fallback, retry, catch-all, or success conversion was introduced.32114516094, Rust contracts job95640912016, rejected the new unknown-code regression for use ofexpect_err()under repository-D clippy::expect-used. Headb7e5ba55090f22fefefd89bab638858ca42610d1replaced that panic-prone assertion with an explicitmatchwhile preserving the exact fail-closed parser-error check.9d39c5907c8d983d8c446f6f1df9654990576c60records the reviewed current BiDi ErrorCode contract and authority consequences indocs/doctoring/browser-agent-protocols.md. The existing Unreleased changelog already describes the bounded response parser/correlation boundary and remains accurate.No predecessor-head check or review evidence transfers to the resulting exact head.
Implemented contract
Current exact head
9d39c5907c8d983d8c446f6f1df9654990576c60:no such client window, while rejecting unknown error-code text fail closed;WebDriverBiDiLocateNodesCommandand feeds only parsed response kind/id into the existing exact command-correlation boundary;id: nullas uncorrelatable;WebDriverBiDiLocateNodesResponseDocumentErrorand preserves nested causal errors viastd::error::Error::source();Exact-current GREEN evidence
On unchanged exact head
9d39c5907c8d983d8c446f6f1df9654990576c60against unchanged exact prerequisiteafe81c45b5d5be09f980bbd1dd153874b628fef1:32115080633: success;95642656079: repository contracts, canonical formatting, locked workspace/all-target check, full tests, strict Clippy, and rustdoc success;95642656053: exact owned-production function, line, region, and branch measurement and enforcement success;32115080487: success;Protected-main-only security/central review workflows absent for this stacked Draft are absent, not passing. No predecessor-head, prerequisite-head, queued, skipped, cancelled, stale, synthetic, status-only, or model-only evidence is promoted as current proof.
Standards / truth boundary
The latest published W3C technical-report baseline reviewed by this branch remains the 1 June 2026 Working Draft; the current Editor’s Draft reviewed on 18 August 2026 identifies itself as the 20 July 2026 draft.
docs/doctoring/browser-agent-protocols.mdrecords those APA 7 primary-source references and the closed current ErrorCode vocabulary consequence. OriginWeave’s JSON size/depth/field budgets are product safety limits rather than protocol maxima, and protocol compatibility never substitutes for authenticated transport or OriginWeave authority.This slice still does not authenticate Chromium, ChromeDriver, or WebSocket/TLS transport provenance; validate
locateNodesnode payload semantics beyond the separately owned admission boundary; mint OriginWeave node authority; authorize an Agent action; execute browser input; or prove a post-condition. Those remain later trusted-runtime boundaries.Keep Draft while #185 and its prerequisite stack remain active. Passing automation is not independent approval. This scheduled actor does not merge, self-approve, alter workflows, add secrets, weaken checks, tag, or publish.