Repository navigation
fix(web): restore /flows and /docs on Next 16.3.8 (fix forward, alternative to #129) - #130
Conversation
/flows and every /docs/<slug> page have returned 500 in production since the Next.js 16.3.8 upgrade (#126). Next 16.3.8 looks prerendered pages up under a route-scoped key, /route-cache/<KIND>/<sha256 of source route>/$<page path>. The OpenNext static-assets incremental cache stores them as <build id>/<page path>.cache and passes the key through unchanged, so every lookup misses and the Worker renders each page at request time. Pages that cannot render in the Workers runtime then fail: docs MDX with "EvalError: Code generation from strings disallowed", /flows with "WebAssembly.instantiate(): Wasm code generation disallowed by embedder". Wrap the cache so a route-scoped key is translated back to its page path before the lookup. The test builds keys with Next's own getRouteCacheKey, so another change to the key shape fails CI instead of production. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 53 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🔍 Devin Review: 1 flag
Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
|
Preview deployed!
This is a Cloudflare Workers preview version of this PR's build. |
Production incident
/flowsand every/docs/<slug>page have returned500since #126 (Next.js 16.3.5 → 16.3.8) deployed at 2026-10-02 04:40 UTC.This is the fix-forward: it keeps Next 16.3.8. #129 is the alternative that pins back to 16.3.5. Merge one and close the other.
Cause
/route-cache/<KIND>/<sha256 of source route>/$<page path>(next/dist/server/lib/route-cache-key.js).<build id>/<page path>.cacheand passes the key through unchanged, so every lookup misses.EvalError: Code generation from strings disallowed for this context/flows:CompileError: WebAssembly.instantiate(): Wasm code generation disallowed by embedder/,/blog) return 200 only because they survive a live render; they are also missing the cache.Change
web/lib/prerender-cache-key.ts: translates a route-scoped key back to its page path; any other key passes through.web/open-next.config.ts: wraps the static-assets cache with that translation. The cachenameis unchanged, sopopulateCachestill copies the prerenders into assets.web/lib/test/prerender-cache-key.test.ts: builds keys with Next's owngetRouteCacheKey, so another change to the key shape fails CI.Verification (local
opennextjs-cloudflare build+populateCache local+wrangler dev, Next 16.3.8)//flows/docs/introduction/flows/plugins/blogWith the change,
/docs/quickstart,/docs/agents/cli,/docs/7.1.1/quickstart,/aboutand/docs/introduction.mdalso return 200 from the cache.tsc --noEmit: clean./flowsand/docs/introductionon this PR's preview URL before merging.Risk compared with #129
This depends on an internal Next key format and should be removed once
@opennextjs/cloudflarehandles route-scoped keys itself. #129 returns to the exact dependency set that was healthy in production yesterday.@khaliqgant — needs the two reviews plus a human merge to deploy.
🤖 Generated with Claude Code
Note
Cursor Bugbot is generating a summary for commit 5bf3e62. Configure here.
Summary by cubic
Fixes the production 500s on
/flowsand every/docs/<slug>page that started with the Next.js 16.3.8 upgrade in #126.Changes
Risk
@opennextjs/cloudflarehandles route-scoped keys itself.Written for commit 5bf3e62. Summary will update on new commits.
Agent Relay sessions
claudesessionfe983435· opened viagh pr create· last active 2026-10-02