feat(core): gate protocol dispatch on current context origin - #120
Merged
seonghobae merged 262 commits intoAug 26, 2026
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 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 |
Close the locateNodes result-item gap by requiring the exact node remote type and a usable sharedId within the registry identifier budget before an untrusted adapter value can be retained as a later handle. Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
Require fail-closed rejection of whitespace and control injection in accessibility roles, accessible names, BiDi sharedIds, and registry external identifiers before production support exists. Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
…websocket-session-correlation feat(core): correlate BiDi WebSocket endpoint with exact session
…explicit-connect-target feat(core): derive explicit BiDi loopback connect targets
…websocket-endpoint feat(core): admit bounded WebDriver BiDi WebSocket endpoints
…response-document-budget feat(core): bound raw WebDriver BiDi response documents
…loopback-tcp-connect feat(network): establish bounded BiDi loopback TCP transport
…locate-nodes-response-correlation feat(core): correlate WebDriver BiDi locateNodes responses
…correlated-result-budget feat(core): admit correlated locateNodes results fail-closed
seonghobae
marked this pull request as ready for review
August 26, 2026 21:09
…locate-nodes-command feat(core): serialize bounded WebDriver BiDi locateNodes commands
…locate-nodes-response-envelope feat(core): classify WebDriver BiDi response envelopes
seonghobae
changed the base branch from
feat/browser-context-origin-revalidation
to
feat/browser-protocol-runtime-adapter-version-binding
August 26, 2026 21:30
seonghobae
changed the base branch from
feat/browser-protocol-runtime-adapter-version-binding
to
feat/browser-protocol-validation-evidence
August 26, 2026 21:30
…-origin-epoch-protocol-dispatch fix(core): bind protocol dispatch to observed document epoch
…-evidence' into HEAD # Conflicts: # CHANGELOG.md # tests/test_repository_contract.py
…response-envelope-parser feat(core): parse bounded WebDriver BiDi response envelopes
…ocol-dispatch' into HEAD # Conflicts: # CHANGELOG.md
…335-4e79-9ce1-985ad0d8ea71-aa6b feat(core): consume SemanticObservation proof in bind_current_nodes
seonghobae
changed the base branch from
feat/browser-protocol-validation-evidence
to
feat/browser-protocol-capability-requirement
August 26, 2026 21:59
…-requirement' into HEAD # Conflicts: # CHANGELOG.md # crates/originweave-core/src/lib.rs # tests/test_repository_contract.py
seonghobae
merged commit Aug 26, 2026
3a1c63d
into
feat/browser-protocol-capability-requirement
5 checks passed
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.
Partial implementation of #28, stacked on exact PR #118 head
1eae12991eb5a2f91ce2d1486e9008c9ac3663e3.Buyer/security gap
PR #116 composes current OriginWeave session/context ownership with exact browser-protocol metadata before one callback, while PR #117/#118 establish and revalidate the canonical origin for the current document. Those boundaries remain independently callable. A trusted observation/navigation adapter could still use
dispatch_if_context_currentwithout proving that the origin it just sampled from the running browser is the exact origin currently bound to that session/context/document.Dependency
This Draft targets unchanged exact #118 head
1eae12991eb5a2f91ce2d1486e9008c9ac3663e3, transitively on #117/#116 and the browser-protocol/session stack. Keep Draft while prerequisites remain active. No prerequisite check, review, status, coverage, or mergeability evidence transfers.TDD / RCA sequence
a726f18b4057686cef92ca91da6b6bc07d8d5afdestablished the missing same-call origin/protocol composition boundary before production support existed.cf58087b87c3a54fe1665c5ed5027b07b8b913af. CI run31591690758passed repository contracts, formatting, workspace checks, tests and exact Production coverage, but Rust contracts failed specifically at strict Clippy. The newly added dispatch method carried an oversized positional authority/metadata argument surface; keeping that shape or allowing the lint would make the public boundary harder to call safely.BrowserContextOriginDispatchTarget, grouping the exact session/context target with the freshly sampled canonical origin.dispatch_if_context_origin_currentnow consumes that typed authority target instead of separate positional context/origin arguments. No lint allow or quality-gate weakening was introduced.144895d5b86ca6b4cceeb0653638e41e9578f130passes CI run31597315876; Rust contracts, tests, strict Clippy, rustdoc and exact Production coverage are all successful. Manifest V3 Compatibility run31597315791also succeeds on the same exact head. No formal reviews or inline review threads are currently returned.Implemented boundary
The branch now requires a typed
BrowserContextOriginDispatchTargetcarrying the exact OriginWeave session/context pair plus the canonical origin sampled for immediate use. The registry revalidates that origin first and returns the currentDocumentEpoch; only then does the descriptor validate exact OriginWeave protocol generation, runtime protocol family, adapter version, protocol/browser revisions and required capability before invoking one callback with the non-cloneable protocol-use proof and sampled epoch.Origin mismatch, an unbound origin after document rotation, or protocol metadata mismatch all fail before callback execution.
Truth boundary
This slice composes deterministic registry origin state with deterministic protocol metadata validation only. It does not authenticate the adapter/browser process, derive the current URL/origin from Chromium, authorize a navigation destination or network/TLS/HTTP use, create semantic observations, execute browser I/O, grant Agent capability, or prove a post-condition. A trusted runtime must derive the expected canonical origin and runtime protocol metadata from the adapter that is about to perform I/O and prevent intervening registry mutation across its larger execution transaction.