feat: provision cloudflare workers and pin db pool per isolate#89
Open
FrkAk wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Task Reference: [MYMR-165]
Provisions the Cloudflare Workers production environment for
app.mymir.devand addresses runtime regressions surfaced during the first deploy. Beta is now live.MymirBrokerDurable Object, Custom Domain attachment.maxUses: 1connections to fix the React Server Components streaming race againstpool.end()("Cannot use a pool after calling end").worker-cf.ts) as the wrangler entry; deletes the obsolete postbuild patch script.requestDbStoreAsyncLocalStorage toglobalThisviaSymbol.for(...)so the wrangler/esbuild bundle and the Next.js/webpack bundle share one instance.aliasforserver-onlyto a no-op shim so the Workers bundle doesn't crash at startup on the package's throwing default export.env.productionisolation so an accidentalwrangler deploywithout--envfails fast instead of misbinding production resources.env.productionto exist, no placeholder IDs, and exact-name match against all five required production secrets via parsed JSON output.RealtimeBridgeso events missed during SSE disconnect windows are picked up on the next observed read.Type of change
Testing
Production verified end-to-end on `https://app.mymir.dev\` via Chrome DevTools: sign-in, dashboard, project view, task detail panel, MCP OAuth handshake, SSE realtime updates — all working, zero console errors, no "pool ended" lines in `wrangler tail` since the per-isolate refactor.
Notes for reviewer