Skip to content

test(mv3): prove content-script isolated-world compatibility - #61

Draft
seonghobae wants to merge 4 commits into
test/mv3-update-migrationfrom
test/mv3-isolated-world
Draft

test(mv3): prove content-script isolated-world compatibility#61
seonghobae wants to merge 4 commits into
test/mv3-update-migrationfrom
test/mv3-isolated-world

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Partial implementation of #27.

Buyer-visible gap

The pinned Chromium fixture proved content-script injection, but issue #27 also requires isolated-world behavior. Injection alone does not prove that extension JavaScript globals remain separated from the page main world.

Dependency

This Draft remains stacked on PR #60 exact head e696e19c9eaf3dedb104a5de4bdbd7970abf90d4, transitively on #59/#56/#43. It is not independently integrable before those prerequisites.

TDD evidence

Exact test-only head e81cdbd9b31a62227698bd3d824fd901551061f0 added a fail-first repository contract requiring a page-main-world sentinel plus a distinct content-script-world sentinel. CI run 31434443638, job 93605281379, checked out that exact head and failed only because page.html and content_script.js lacked those isolation contracts. That is the intended RED; no predecessor success is reused.

Current exact head is c1705ad9fd2d96e620b89bb6e7ea1235063dcb6a.

Implemented boundary

The controlled fixture now:

  • assigns window.originweaveWorldSentinel = "page" in page/main-world JavaScript;
  • continuously republishes that main-world value only through a bounded controlled DOM data attribute;
  • assigns the same-named JavaScript global to "extension" inside the Manifest V3 content script;
  • waits a bounded interval so the page main world has an opportunity to republish its own value;
  • reports the existing content-script compatibility surface as ready only when the page still observes "page" while the content script independently observes "extension"; and
  • exposes no arbitrary page JavaScript, raw page data, model input, or new Agent capability.

If page and extension JavaScript worlds collapse, the page's repeated sentinel publication becomes "extension" and the existing compatibility gate fails rather than reporting success.

Exact-head proof

On unchanged exact head c1705ad9fd2d96e620b89bb6e7ea1235063dcb6a:

  • CI run 31434670642: success;
  • Python repository contracts: success;
  • formatting: success;
  • locked workspace check: success;
  • all workspace tests: success;
  • strict Clippy: success;
  • rustdoc/API documentation: success;
  • exact owned production function/line/region/branch coverage: success;
  • Manifest V3 Compatibility run 31434670629, job 93605998114: success against Chrome for Testing 150.0.7871.129 / Chromium revision r1639810;
  • real-browser evidence reports 3/3 successful repeatability trials with the existing content-script surface true on every initial/restart/update-migration pass; and
  • CodeRabbit exact-head commit status: success.

No predecessor-head result is transferred to this exact head.

Scope boundary

Compatibility evidence only. This does not expose arbitrary page JavaScript, add a browser adapter, create Agent authority, weaken content trust, alter workflows, or claim all Chrome isolated-world semantics. It proves one deterministic main-world/content-script separation contract in the pinned real Chromium fixture.

Keep Draft while #60/#59/#56/#43 remain active. This scheduled actor does not merge or self-approve.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

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: 586026a9-f744-42e7-aff5-8b048a749b43

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.

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