You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
codeSplitters: Workers Logs traces still minified after the source-map release (#706) #799
What happened: after the release at b7d2628 (which includes #708: minified Worker plus worker.sourceMaps), a harmless throw on live (POST /api/repos/quinn/pulsetest/branches with a non-JSON body, 500) shows up in Workers Logs with the minified stack, not the source:
SyntaxError: Unexpected token 'x', "x" is not valid JSON
at async G5 (worker.js:695:2396)
at async gAe (worker.js:869:790)
at async Object.fetch (worker.js:869:8043)
Script version 4363dd6b-d8aa-4907-b629-fbd26f5f488c, ray a48f77c0097da9be, 2026-10-11 10:08:37 PDT. The expected frames are src/branches.ts:162 and src/worker.ts.
What I checked:
packages/cli/src/gen/alchemy.ts:144 adds a **/*.map rule when sourceMaps is set, and rustybuns.config.ts:65 sets it.
In alchemy 2.0.0-beta.77, Cloudflare/Workers/Sources/Prebuilt.js globs files by those rules and WorkerProvider.js (contentTypeFromExtension) sends .map as application/source-map. So the map should be one of the upload's parts.
Next: confirm the deployed version actually holds worker.js.map (dashboard → codesplitters → Edit code, or the Versions API's module list). If it does, compare the multipart part name and the //# sourceMappingURL= comment with what wrangler sends. Also check whether Cloudflare wants upload_source_maps in the metadata, or caps the map's size.
Looked into this from code (no deploy). The fix to try is in #802.
Upload parts are not the problem. Alchemy beta.77 sends worker.js (main_module) and worker.js.map as application/source-map, with part names taken from the file names. wrangler 4.149's upload_source_maps sends the same parts and adds no metadata flag.
The map is fine on size and link. It's 1.45 MB gzipped (the cap is 15 MB), //# sourceMappingURL=worker.js.map is the last line, and it resolves frames to src/*.ts locally.
Likely cause: the map's content. wrangler rewrites each map before upload: file becomes the module name and each source loses one leading ../. Bun's linked map has no file at all, and Alchemy uploads it byte-for-byte. rustybuns deploy: upload Worker source maps in wrangler's shape (#799) #802 makes rustybuns plan/deploy do wrangler's rewrite when worker.sourceMaps is on.
Not confirmed: it needs the owner's next release and one uncaught error in Workers Logs. If that trace still points at worker.js, the rest of our side matches wrangler, so I'll file it upstream with Alchemy and Cloudflare.
Update: the fix to try is #801, which is now on main. I closed #802 as a duplicate. It still needs the next release and one uncaught error in Workers Logs to confirm.
Confirmed live, 12 Oct. After the release with #801 (Worker codesplitter, version 6ca8b0f9-5a49-4bd0-9fc4-7c4ec8269223), the same harmless throw (POST /api/repos/quinn/pulsetest/branches with body x) now logs:
SyntaxError: Unexpected token 'x', "x" is not valid JSON
at async kK (src/branches.ts:162:26)
at async Nye (src/worker.ts:373:22)
at async Object.fetch (src/worker.ts:559:25)
Activity
QuinnsCode commentedon Oct 12, 2026
Looked into this from code (no deploy). The fix to try is in #802.
worker.js(main_module) andworker.js.mapasapplication/source-map, with part names taken from the file names. wrangler 4.149'supload_source_mapssends the same parts and adds no metadata flag.//# sourceMappingURL=worker.js.mapis the last line, and it resolves frames tosrc/*.tslocally.filebecomes the module name and each source loses one leading../. Bun's linked map has nofileat all, and Alchemy uploads it byte-for-byte. rustybuns deploy: upload Worker source maps in wrangler's shape (#799) #802 makesrustybuns plan/deploydo wrangler's rewrite whenworker.sourceMapsis on.Not confirmed: it needs the owner's next release and one uncaught error in Workers Logs. If that trace still points at
worker.js, the rest of our side matches wrangler, so I'll file it upstream with Alchemy and Cloudflare.🤖 Generated with Claude Code
rustybuns deploy: shape Worker source maps as wrangler does (#799) (#801
QuinnsCode commentedon Oct 12, 2026
Update: the fix to try is #801, which is now on main. I closed #802 as a duplicate. It still needs the next release and one uncaught error in Workers Logs to confirm.
🤖 Generated with Claude Code
QuinnsCode commentedon Oct 12, 2026
Confirmed live, 12 Oct. After the release with #801 (Worker
codesplitter, version6ca8b0f9-5a49-4bd0-9fc4-7c4ec8269223), the same harmless throw (POST /api/repos/quinn/pulsetest/brancheswith bodyx) now logs:The #706 box on #609 is ticked.
🤖 Generated with Claude Code