Skip to content

feat(core): fail closed on unsupported browser protocol capabilities - #107

Draft
seonghobae wants to merge 392 commits into
feat/browser-authority-registryfrom
feat/browser-protocol-capability-requirement
Draft

feat(core): fail closed on unsupported browser protocol capabilities#107
seonghobae wants to merge 392 commits into
feat/browser-authority-registryfrom
feat/browser-protocol-capability-requirement

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Partial implementation of #28 and Proposed ADR 0107, stacked on live PR #106.

Buyer/foundation gap

PR #106 makes browser protocol capabilities explicit metadata, but boolean supports alone leaves every caller to invent its own unsupported-capability error or fallback policy. ADR 0107 requires unsupported adapter capabilities to fail closed with typed errors before later browser use.

Live dependency / exact state

The branch was non-destructively aligned with the moved #106 prerequisite through merge commit 92fd4ab3be4c57c76395a0fcd9325ca0ea812590, preserving the capability-requirement implementation while inheriting the current descriptor and #40 authority lineage. Current head 193f3a... restores the capability-requirement changelog entry on top of the current prerequisite changelog. Keep Draft while #106/#40 remain active. No prerequisite check, review, status, coverage, mergeability, synthetic-merge, or predecessor-head evidence transfers.

TDD / implementation

  1. Test-only head c0da8bd7537c0b242d9f6e6d38dce8ff42417032 established the missing versioned descriptor boundary on the predecessor stack.
  2. Production added explicit WebDriver BiDi/CDP kind, separately bounded adapter/protocol/browser revision tokens, and a finite declared capability set.
  3. Test-only head 8d2549cbad8cdabfe09a5ee61aa7a7ee1de81cc8 exposed caller-order-dependent capability-set identity; predecessor production canonicalized the set.
  4. This slice adds BrowserProtocolAdapterDescriptor::require_capability and typed BrowserProtocolCapabilityRequirementError::UnsupportedCapability, so unsupported surfaces fail closed without protocol-family inference or silent fallback.
  5. Current alignment preserves that contract while incorporating the exact current prerequisite stack rather than carrying stale predecessor authority code.

Implemented boundary

BrowserProtocolAdapterDescriptor::require_capability returns Ok(()) only for a capability explicitly present in the canonical descriptor and otherwise returns typed UnsupportedCapability(capability). The decision is independent of WebDriver BiDi versus CDP family and triggers no fallback or side effect.

Exact-current proof

On unchanged exact head 193f3a3843f7bbb92b8d720ba8e127a82f2dcb47 against exact live prerequisite 1a13007b6cb43cff949b6bd09d69de0a02b327f6:

  • CI run 32044867924: success;
  • Rust contracts job 95430530156: repository contracts, canonical formatting, locked workspace/all-target check, full tests, strict Clippy, and rustdoc success;
  • Production coverage job 95430530084: exact owned-production function/line/region/branch enforcement success;
  • Manifest V3 Compatibility run 32044867694: success;
  • exact-head CodeRabbit commit status: success;
  • formal reviews currently returned: none;
  • inline review threads currently returned: none; and
  • GitHub reports the Draft mergeable against its exact prerequisite base.

No predecessor-head, prerequisite-head, synthetic, skipped, cancelled, absent, pending, stale, status-only, or model-only evidence is promoted as current proof.

Review / governance boundary

This Draft has no qualifying independent latest-push approval. Passing automation, bot comments, author activity, prerequisite reviews, or model output are not approval. Live protected-main governance and AGENTS.md remain authoritative; this scheduled writer does not merge, self-approve, alter workflows, add secrets, weaken checks, tag, or publish.

Truth boundary

This slice is deterministic adapter metadata validation only. It does not authenticate or invoke BiDi/CDP, prove actual capability implementation, mint browser/Agent authority, execute input, authorize network/TLS/HTTP, negotiate OriginWeave Protocol versions, expose arbitrary JavaScript, or claim the real browser adapter complete.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

cursoragent and others added 18 commits August 16, 2026 15:38
Keep CHANGELOG, doctoring, API, architecture, ADR 0010, and the roadmap
aligned with the same-call proof that observation handles require
QueryNodes capability and current document authority.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
Add the failing contract that zero-width and bidi-override format
characters cannot be admitted in accessibility roles, accessible names,
BiDi sharedId values, or registry external identifiers.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
Fail closed on reviewed Default_Ignorable and bidirectional format
characters in accessibility locators, BiDi sharedId values, and registry
external identifiers. Ordinary spaces in accessible names remain valid.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
Record the local fail-closed format-character policy and cite the
current Unicode security-mechanisms standard, the bidirectional
algorithm, and the superseded UTR 36 report.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
RED: bind_current_nodes must consume a non-cloneable protocol-use proof
and reject TypedInput and Navigation proofs before minting observation
handles. Navigation-only and TypedInput-only adapters can still call the
public no-proof API on the predecessor head.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
Transfer the non-cloneable QueryNodes protocol-use proof by ownership
into locateNodes admission and reject Navigation, TypedInput, and
NetworkObservation proofs before minting ObservedNodeHandle values.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
…-protocol-dispatch

feat(core): bind protocol dispatch to current browser context
…-origin-binding

feat(core): bind browser context origin before observation
…apter-version-binding' into HEAD

# Conflicts:
#	CHANGELOG.md
#	tests/test_repository_contract.py
…-origin-revalidation

feat(core): revalidate current browser context origin
…locate-nodes-response-envelope

feat(core): classify WebDriver BiDi response envelopes
…l-runtime-adapter-version-binding

feat(core): bind runtime adapter version before protocol use
…-origin-epoch-protocol-dispatch

fix(core): bind protocol dispatch to observed document epoch
…-evidence' into HEAD

# Conflicts:
#	CHANGELOG.md
#	tests/test_repository_contract.py
…l-runtime-kind-binding

feat(core): bind validated browser use to runtime protocol kind
…tocol-version-parsing

feat(core): parse canonical OriginWeave protocol versions
…response-envelope-parser

feat(core): parse bounded WebDriver BiDi response envelopes
…ocol-dispatch' into HEAD

# Conflicts:
#	CHANGELOG.md
…l-runtime-revision-check

feat(core): fail closed on browser runtime revision drift
…n-binding' into HEAD

# Conflicts:
#	CHANGELOG.md
…tocol-version-binding

feat(core): bind browser adapters to OriginWeave protocol version
…l-use-validation

feat(core): validate browser protocol use atomically
…-requirement' into HEAD

# Conflicts:
#	tests/test_repository_contract.py
…335-4e79-9ce1-985ad0d8ea71-aa6b

feat(core): consume SemanticObservation proof in bind_current_nodes
…l-validation-evidence

feat(evidence): record validated browser protocol metadata
…-requirement' into HEAD

# Conflicts:
#	CHANGELOG.md
#	crates/originweave-core/src/lib.rs
#	tests/test_repository_contract.py
…-origin-protocol-dispatch

feat(core): gate protocol dispatch on current context origin
@seonghobae
seonghobae changed the base branch from feat/browser-protocol-capability-descriptor to feat/browser-authority-registry August 26, 2026 22:16
… into HEAD

# Conflicts:
#	CHANGELOG.md
#	crates/originweave-core/src/browser_registry.rs
#	crates/originweave-core/src/lib.rs
#	crates/originweave-core/tests/browser_authority_registry.rs
#	docs/doctoring.md
#	tests/test_product_documentation_contract.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants