Confirmed exact production-provider failure
With public @poe-platform/safe-bash@0.1.690 bundled by normal Wrangler defaults, native Cloudflare navigation to https://example.com succeeds, then the automatic owned storage checkpoint fails:
Native storage origin operation failed: ReferenceError: __name is not defined
at collectStorageOrigin (<anonymous>:8:35)
Exact evidence: /tmp/poe2-playwright-690-cloud-storage.log, deployed worker 44465a2d.
The package serializes collectStorageOrigin.toString() and restoreOrigin.toString() into an isolated browser realm. Wrangler's default keepNames transform inserts references to a bundle-scoped __name helper into nested functions. The serialized function body does not carry that outer helper into the browser realm. The native fixture's keepNames: false build did not exercise production bundling.
Required behavior
Both read and restore expressions must be self-contained after supported consumer bundling, including keepNames: true and minification. Use maintained generated literal realm sources, preserving the typed canonical implementation and verifying generation stays synchronized. Do not require a consumer-specific bundler flag or private API workaround. Add a genuine compiler-differential regression that bundles with naming helpers and executes both expressions in a fresh realm, then verify the public release and real Cloudflare worker.
Confirmed exact production-provider failure
With public
@poe-platform/safe-bash@0.1.690bundled by normal Wrangler defaults, native Cloudflare navigation tohttps://example.comsucceeds, then the automatic owned storage checkpoint fails:Exact evidence:
/tmp/poe2-playwright-690-cloud-storage.log, deployed worker44465a2d.The package serializes
collectStorageOrigin.toString()andrestoreOrigin.toString()into an isolated browser realm. Wrangler's defaultkeepNamestransform inserts references to a bundle-scoped__namehelper into nested functions. The serialized function body does not carry that outer helper into the browser realm. The native fixture'skeepNames: falsebuild did not exercise production bundling.Required behavior
Both read and restore expressions must be self-contained after supported consumer bundling, including
keepNames: trueand minification. Use maintained generated literal realm sources, preserving the typed canonical implementation and verifying generation stays synchronized. Do not require a consumer-specific bundler flag or private API workaround. Add a genuine compiler-differential regression that bundles with naming helpers and executes both expressions in a fresh realm, then verify the public release and real Cloudflare worker.