Skip to content

[parked spike — do not merge] #1610 cross-origin isolation headers: MT wasm + break inventory - #1612

Draft
pablo-mayrgundter wants to merge 2 commits into
mainfrom
claude/isolation-spike
Draft

[parked spike — do not merge] #1610 cross-origin isolation headers: MT wasm + break inventory#1612
pablo-mayrgundter wants to merge 2 commits into
mainfrom
claude/isolation-spike

Conversation

@pablo-mayrgundter

@pablo-mayrgundter pablo-mayrgundter commented Jul 21, 2026

Copy link
Copy Markdown
Member

PARKED (2026-07-21): the spike completed and refuted its premise — see the measurement thread in bldrs-ai/conway-geom#148 and the reframe in #1610. Browser geometry is ~75% serial JS driver; MT nets zero-to-negative on real machines today (45s vs 31s on PSB). Shipping these headers would regress PSB, so this stays a draft until extraction moves off the main thread and/or the MT tax shrinks — at which point the phases documented below (auth relay over BroadcastChannel, Picker in an owned popup) resume unchanged.

What the spike proved: the header flip + conway 1.421.1270 (worker-spawn fix, bldrs-ai/conway#421) gives crossOriginIsolated === true, MT wasm selection, and a live pthread worker fleet in a real deploy. The infrastructure works; the payoff doesn't, yet.


Phase 1 of #1610deploy-preview reconnaissance only, not for merge. Two header lines flip the app to full cross-origin isolation (COOP: same-origin + COEP: credentialless). No build changes needed: conway-geom's loader already auto-selects the MT wasm at runtime when crossOriginIsolated is true, and build-share already ships both wasm variants to /static/js.

Verification checklist (on this preview)

  1. Console: crossOriginIsolated → should be true; typeof SharedArrayBuffer"function".
  2. Load PSB (fresh tab) — network tab should fetch ConwayGeomWasmWebMT.wasm.
  3. Expected breakage: Google sign-in popup (COOP severs window.opener); Google Drive Picker iframe (CORP under COEP).

Fix phases before this merges (tracked in #1610)

  • Auth relay: our own popup running the redirect flow into a same-origin /auth callback page that relays the auth code over BroadcastChannel — channel scope is the origin, not the browsing-context group, so COOP's severing doesn't affect it.
  • Picker popup: host the Picker in our own popup window (popups aren't embedded content — COEP doesn't apply), same relay pattern.

🤖 Generated with Claude Code

https://claude.ai/code/session_01S6gTXmrq1GbhqknPqQMRuz

@netlify

netlify Bot commented Jul 21, 2026

Copy link
Copy Markdown

Deploy Preview for bldrs-share-dev ready!

Name Link
🔨 Latest commit ef9ed43
🔍 Latest deploy log https://app.netlify.com/projects/bldrs-share-dev/deploys/6a5fbb152791d80008606671
😎 Deploy Preview https://deploy-preview-1612--bldrs-share-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 51 (🔴 down 1 from production)
Accessibility: 88 (no change from production)
Best Practices: 83 (🔴 down 9 from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

DO NOT MERGE YET - deploy-preview reconnaissance for cross-origin
isolation. With these headers crossOriginIsolated goes true,
SharedArrayBuffer unlocks, and conway-geom's loader auto-selects the
multithreaded wasm (~2.8x geometry extraction; both wasm variants
already ship in /static/js).

Known breakage on this preview, by design (fix phases follow in
#1610): GIS OAuth popup (COOP severs window.opener) and the Google
Drive Picker iframe (CORP: same-site under COEP). The fix pattern for
both is same-origin popup documents relaying over BroadcastChannel;
see the header comments.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S6gTXmrq1GbhqknPqQMRuz
Picks up conway#421: under crossOriginIsolated, shim Init sets the
runtime module prefix so the MT engine module imports from
/static/js/ and its pthread workers resolve a correct script URL.
Package contents verified (setModulePrefix wiring present in the
shim).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S6gTXmrq1GbhqknPqQMRuz
@pablo-mayrgundter pablo-mayrgundter changed the title [spike — do not merge] #1610 cross-origin isolation headers: MT wasm + break inventory [parked spike — do not merge] #1610 cross-origin isolation headers: MT wasm + break inventory Jul 21, 2026
pablo-mayrgundter pushed a commit that referenced this pull request Jul 22, 2026
B1 incremental BatchedMesh assembly (dissolve the end-of-load build),
B2 residency slider + eviction metrics, P1 props worker at indexReady,
P2 geometry worker sharding (driver-parallel, consistent with the
#1612 MT spike findings), session observer generalization.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S6gTXmrq1GbhqknPqQMRuz
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