fix(injection): make MAIN-world functions self-contained across the executeScript boundary - #116
Conversation
Signed-off-by: Tapish Khandelwal <tapishkhandelwal13@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 46f1c1c1e8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 36badc08cb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: Tapish Khandelwal <tapishkhandelwal13@gmail.com>
Summary
Restores page-generated filed-return acquisition by making every MAIN-world injected function independent of module scope.
Root Cause / Decision Record
main-world-execution-failed, never as a portal generation timeout.Scope
Pack Workflow Preflight
pnpm workflow:preflightwas run before editing/push, or the skip reason is documented.Sanchika Adoption Gate
../sanchika,sanchika/packages/*/src, or parent source paths.Privacy And Data-Flow Impact
Sensitive Surface Review
Chrome Web Store Impact
Verification
pnpm install --frozen-lockfilepnpm audit --audit-level high(not run; no dependency change)pnpm exec wxt preparepnpm exec prettier --check .pnpm exec eslint . --max-warnings 0pnpm exec tsc --noEmitpnpm exec vitest run— 101 files, 1459 testspnpm exec wxt buildnode scripts/verify-extension-package.mjs .output/chrome-mv3pnpm exec wxt zip(release-only; not run)node scripts/verify-extension-zip.mjs(release-only; not run)git diff --check--allow-missing-head-review; no current-head automated review was found, so this remains an audit gap and no readiness is claimed.Artifact Evidence
752856f.MAIN-world Injection Audit
capturePortalPdfBlob, used by both page-generated capture call sites. It closed over the module byte cap and visible-target helper.fetchFiledReturnJsonInMainWorldandselectFiledReturnsFiltersInMainWorld.ReferenceError: controlHasVisibleTarget is not defined; it now rebuilds and exercises every distinct injected function.main-world-execution-faileddistinguishes absent or rejected injection execution from a portal generation timeout.PR Review Follow-Up
36badc0; rejected local staging becomes durable artifact review, with focused and full Vitest coverage36badc0; no-action JSON clears its checkpoint while page-generated paths retain recovery intent752856f; all post-injection delivery siblings returndelivery-unconfirmed, and rejected callback writes retain recovery ownershipScreenshots
Not applicable; this is a background execution-boundary fix.
DCO
Signed-off-by:trailer; final commit752856fis signed, and history was not rewritten.