Skip to content

test(extension): execute pinned MV3 compatibility fixture - #35

Merged
seonghobae merged 18 commits into
mainfrom
feat/mv3-compatibility-harness
Aug 9, 2026
Merged

seonghobae merged 18 commits into
mainfrom
feat/mv3-compatibility-harness

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 9, 2026 •

Copy link
Copy Markdown
Contributor

Buyer-visible gap

Issue #27 requires executable evidence that OriginWeave's Chromium-compatibility strategy preserves real Manifest V3 behavior rather than relying on architecture prose. Protected main now has the pure-Rust extension-to-Agent authority kernel (#34), but no real Chromium compatibility lane.

Bounded slice

This PR adds the first real pinned-Chromium compatibility harness:

  • Chrome for Testing 150.0.7871.129 / Chromium revision r1639810;
  • local-only MV3 fixture with extension service worker, content script, chrome.storage.local, and Declarative Net Request;
  • real ChromeDriver/WebDriver browser session, not a mocked protocol;
  • real browser element click with observed DOM post-condition;
  • exact browser-version assertion;
  • local-only host permission and no model/secret dependency;
  • Harden Runner egress-policy: block with an explicit Google Chrome for Testing endpoint and the GitHub endpoints needed by pinned checkout/artifact actions;
  • bounded JSON compatibility evidence plus download SHA-256 receipts;
  • primary-source APA 7 doctoring and an explicit non-claim of universal Chrome-extension compatibility.

TDD lineage

5f786d1e3102ce50365113e8c04857dcfd415f1e added the repository contract first, requiring the MV3 fixture, pinned browser runner, workflow, and primary-source doctoring before those files existed. Subsequent commits implement the fixture and real-browser lane without changing product authority. The branch is based directly on current protected main 076da4296a13d11c70cce8f99163ebcd10ad2daf and is not behind at PR creation.

Security boundary

Chrome extension permissions remain separate from OriginWeave Agent authority. The fixture cannot widen task origin/capability grants and receives no raw secret, production PII, model credential, native-messaging host, external page content, or repository write authority. This PR does not claim Chrome Web Store, Google-service, DRM, codec, native-messaging, restart/update, or complete extension-API compatibility.

Acceptance for this slice

Do not merge unless the unchanged exact head passes repository CI, the new real Manifest V3 Compatibility workflow, Security Scan, SAST, current automated-review findings, and current branch/ruleset governance. A green compatibility lane is evidence only for the tested pinned build and surfaces; issue #27 remains open for the broader capability matrix, restart/update, managed-policy/native-messaging boundaries, repeated-run evidence, and release-gate integration.

Partial implementation of #27.

Summary by CodeRabbit

  • 새로운 기능

    • 고정된 Chrome 버전에서 Manifest V3 호환성을 검증하는 자동화 작업을 추가했습니다.
    • 서비스 워커, 콘텐츠 스크립트, 저장소, 네트워크 차단 및 브라우저 상호작용을 점검합니다.
    • 검증 결과와 다운로드 무결성 정보를 보관할 수 있습니다.
  • 문서

    • Manifest V3 호환성 검증 범위와 제한 사항을 문서화했습니다.
  • 테스트

    • 필수 확장 구성과 브라우저 검증 절차가 올바르게 설정되었는지 확인하는 테스트를 추가했습니다.

@coderabbitai

coderabbitai Bot commented Aug 9, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@seonghobae, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 5 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 96b99a0e-a634-4c56-9618-e3b5ea765dbb

📥 Commits

Reviewing files that changed from the base of the PR and between fca5e32 and 52ee2fc.

📒 Files selected for processing (3)
  • docs/doctoring/mv3-compatibility.md
  • scripts/ci/run_mv3_compatibility.py
  • tests/test_mv3_compatibility_contract.py
📝 Walkthrough

Walkthrough

고정된 Chrome for Testing에서 MV3 fixture를 실행하는 CI 워크플로를 추가했다. WebDriver 실행기는 서비스 워커, 콘텐츠 스크립트, 저장소, DNR, 실제 클릭 결과를 검증하고 JSON 증거를 출력한다. 검증 기준 문서와 계약 테스트도 추가했다.

Changes

Manifest V3 호환성 검증

Layer / File(s) Summary
MV3 fixture 계약
tests/fixtures/mv3_basic/*
서비스 워커, 콘텐츠 스크립트, 로컬 저장소, DNR 차단 규칙, 클릭 및 fetch 결과를 정의했다.
WebDriver 세션 실행
scripts/ci/run_mv3_compatibility.py
로컬 fixture 서버와 임시 프로필을 만들고, 고정 Chrome 및 ChromeDriver를 W3C WebDriver API로 실행한다. 오류와 제한 시간 초과를 처리하고 프로세스를 정리한다.
MV3 증거 검증
scripts/ci/run_mv3_compatibility.py
MV3 상태를 반복 확인하고 실제 버튼 클릭을 수행한다. 성공 시 버전, revision, 표면별 상태 및 실행 시간을 JSON으로 출력한다.
CI 실행 및 계약 검증
.github/workflows/mv3-compatibility.yml, docs/doctoring/mv3-compatibility.md, tests/test_mv3_compatibility_contract.py
변경 경로와 수동 실행을 지원하는 읽기 전용 워크플로를 추가했다. 고정 Chrome 바이너리를 다운로드하고 해시와 결과를 artifact로 보관한다. 문서와 계약 테스트는 실행 구성 및 검증 범위를 확인한다.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related issues

  • OriginWeave 이슈 27: 고정 MV3 fixture, CI 증거 수집 및 문서 요구사항을 구현하지만 extension-authority isolation 범위는 포함하지 않는다.

Sequence Diagram(s)

sequenceDiagram
  participant GitHubActions
  participant MV3Runner
  participant ChromeDriver
  participant ChromeForTesting
  participant MV3Fixture
  GitHubActions->>ChromeForTesting: 고정 Chrome 및 ChromeDriver 다운로드
  GitHubActions->>MV3Runner: 호환성 실행
  MV3Runner->>MV3Fixture: 로컬 HTTP 서버로 fixture 제공
  MV3Runner->>ChromeDriver: WebDriver 세션 생성
  ChromeDriver->>ChromeForTesting: 고정 Chrome 실행
  ChromeForTesting->>MV3Fixture: fixture 페이지 로드 및 MV3 실행
  MV3Runner->>ChromeDriver: 상태 확인 및 실제 클릭
  ChromeDriver-->>MV3Runner: MV3 증거 반환
  MV3Runner-->>GitHubActions: JSON 결과 출력
  GitHubActions->>GitHubActions: 해시 및 결과 artifact 업로드
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 고정된 MV3 호환성 fixture를 실행하는 PR의 주요 변경 사항을 정확하고 간결하게 설명합니다.
Docstring Coverage ✅ Passed Docstring coverage is 80.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/mv3-compatibility-harness

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.

Comment thread scripts/ci/run_mv3_compatibility.py Fixed

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/doctoring/mv3-compatibility.md`:
- Line 25: Update the APA 7 reference for “Chrome for Testing” to credit Mathias
Bynens as the author and retain the official page’s final update date of June
12, 2023; keep the official Chrome for Developers URL and APA 7 formatting
intact.

In `@tests/test_mv3_compatibility_contract.py`:
- Around line 19-31: Extend the manifest contract assertions in the test around
manifest and content_scripts validation to require the expected loopback-only
host_permissions value, such as ["http://127.0.0.1/*"]. Ensure the test fails if
broader or additional host permissions are introduced.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ff3305a4-62f4-4232-9c07-2413b884deac

📥 Commits

Reviewing files that changed from the base of the PR and between 076da42 and fca5e32.

📒 Files selected for processing (9)
  • .github/workflows/mv3-compatibility.yml
  • docs/doctoring/mv3-compatibility.md
  • scripts/ci/run_mv3_compatibility.py
  • tests/fixtures/mv3_basic/content_script.js
  • tests/fixtures/mv3_basic/manifest.json
  • tests/fixtures/mv3_basic/page.html
  • tests/fixtures/mv3_basic/rules.json
  • tests/fixtures/mv3_basic/service_worker.js
  • tests/test_mv3_compatibility_contract.py

Comment thread docs/doctoring/mv3-compatibility.md Outdated
Comment thread tests/test_mv3_compatibility_contract.py
@seonghobae
seonghobae merged commit ef525de into main Aug 9, 2026
29 checks passed
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