Skip to content

feat(core): bind runtime adapter version before protocol use - #114

Merged
seonghobae merged 59 commits into
feat/browser-protocol-validation-evidencefrom
feat/browser-protocol-runtime-adapter-version-binding
Aug 26, 2026
Merged

feat(core): bind runtime adapter version before protocol use#114
seonghobae merged 59 commits into
feat/browser-protocol-validation-evidencefrom
feat/browser-protocol-runtime-adapter-version-binding

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Partial implementation of #28 and Proposed ADR 0107, stacked on the live PR #113 branch feat/browser-protocol-validation-evidence at exact current head 2562ca403117dfe789a73716162c7e1f20c1af0c.

Buyer/security gap

The active protocol-use validator binds the exact OriginWeave generation, runtime protocol family, pinned upstream protocol revision, pinned browser revision, and required capability, but previously did not compare the adapter implementation version reported by the trusted runtime with the descriptor's reviewed adapter version. A descriptor for originweave-bidi-v1 could therefore validate a runtime that reported a different adapter build as long as the protocol/browser revisions happened to match. Proposed ADR 0107 independently versions adapters and requires adapter version/provenance for audit and rollback, so runtime adapter-version drift must fail closed before browser I/O.

Dependency

This Draft targets PR #113 at exact current head 2562ca403117dfe789a73716162c7e1f20c1af0c, transitively on #112/#111/#110/#109/#108/#107/#106/#40. Current exact #114 head is 36bac73ecd66b3846f634fb977139d15c1e237de. The live comparison is ahead of the prerequisite with merge base equal to the exact #113 head; GitHub currently reports the Draft mergeable. Keep Draft while prerequisites remain active. No prerequisite check, review, status, coverage, mergeability, synthetic-merge, predecessor-head, skipped, cancelled, queued, absent, or model-only evidence transfers.

TDD / implementation

Historical test-only head b521bbcc3c70907cdf66a189d932c6cfa8c3a526 required validate_use to receive trusted runtime adapter-version metadata, accept the exact reviewed adapter version, reject a different runtime adapter version before revision/capability checks, and reject malformed runtime adapter-version metadata fail closed. CI run 31576973212 failed on that exact test-only head; its independent Manifest V3 result is historical evidence only.

The production implementation adds the narrow runtime adapter-version check inside the existing same-call validation boundary. validate_use checks, in order: exact OriginWeave Protocol generation, exact runtime protocol family, bounded runtime adapter-version syntax and exact adapter-version equality, exact runtime protocol/browser revisions, then the required declared capability. Malformed runtime adapter-version metadata fails as InvalidAdapterVersion; valid-but-different metadata fails as AdapterVersionMismatch before revision or capability state can influence the result.

Exact-current proof

On unchanged exact head 36bac73ecd66b3846f634fb977139d15c1e237de against exact current prerequisite #113 head 2562ca403117dfe789a73716162c7e1f20c1af0c:

  • CI run 32199896206: success;
  • Manifest V3 Compatibility run 32199896197: success;
  • GitHub reports the Draft mergeable against its exact current prerequisite base;
  • formal reviews returned by the fresh refetch: none; and
  • inline review threads returned by the fresh refetch: none.

Security Scan and SAST workflows are absent on this stacked exact head and are therefore not passing evidence. No predecessor-head, prerequisite, synthetic, skipped, queued, absent, or model-only evidence is promoted as current proof. Passing automation is not independent approval.

Truth boundary

This slice compares deterministic runtime adapter-version metadata only. It does not authenticate the adapter process, attest how the runtime version was derived, execute WebDriver BiDi/CDP, bind browser session/context/origin authority, prove capability implementation, or make the complete Chromium vertical slice ready. A trusted runtime still must derive the exact adapter/protocol/browser metadata from the adapter that is about to perform browser I/O.

This scheduled actor does not merge, self-approve, alter workflows, add secrets, weaken checks, tag, or publish.


Open in Devin Review

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9baa009d-3134-4ed2-a1b4-9fa260c71138

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@seonghobae
seonghobae marked this pull request as ready for review August 26, 2026 21:11

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

…l-runtime-dispatch-validation

feat(core): bind browser protocol validation to dispatch call
…-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
devin-ai-integration[bot]

This comment was marked as resolved.

…-origin-revalidation

feat(core): revalidate current browser context origin
@seonghobae
seonghobae merged commit 7d550d8 into feat/browser-protocol-validation-evidence Aug 26, 2026
4 of 5 checks passed

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

Open in Devin Review

Comment on lines 317 to 328
runtime_kind,
});
}
if !metadata_token_is_valid(runtime_adapter_version) {
return Err(BrowserProtocolUseValidationError::InvalidAdapterVersion);
}
if self.adapter_version != runtime_adapter_version {
return Err(BrowserProtocolUseValidationError::AdapterVersionMismatch);
}
self.require_runtime_revisions(runtime_protocol_revision, runtime_browser_revision)
.map_err(BrowserProtocolUseValidationError::RuntimeRevision)?;
self.require_capability(required_capability)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Info: validate_use gains required parameter, all callers updated

validate_use now takes a required runtime_adapter_version. Every caller in the workspace was updated; the only non-test consumer is dispatch_if_runtime_matches. No production caller is left passing the old argument list.

(Refers to this code)

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

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.

1 participant