test(next): stop the App Route dylib gate pinning the text backend - #8274
Conversation
The gate pinned PERRY_LLVM_INPROCESS="${PERRY_LLVM_INPROCESS:-0}", so it
compiled the fixture through the text transport rather than the native
in-process path that is the default. `${VAR:-0}` cannot express "unset",
so no invocation of this gate could exercise the shipped configuration —
the job ran, but not on its subject.
The pin was correct while #8228 made the native path unable to compile
five of this fixture's modules (insertelement had no case in the dialect
reader). #8241 fixed that, so the pin now only hides the backend under
test. Forward the variable only when the caller sets it: an explicit
backend remains selectable for bisection, and the unset default reaches
the compiler unchanged.
Verified on 183d30c: native backend compiles 104/104 modules and the
gate passes 100/100 verifier repetitions twice, with `freeze/LLVM
pipeline started` present 5x per compile against 0x on the text path.
Refs #8040, #8228.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Next.js App Route dylib gate now uses the native backend by default. It forwards ChangesNext.js native backend gate
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
#8259 is a different, already-closed issue; fragment filenames are PR-keyed. Claude-Session: https://claude.ai/code/session_01AHvBYz7E6wWKv8kmvLLGpj
|
Merging. This is the payoff for #8241, and the diagnosis is exactly right. The I verified the replacement idiom rather than eyeballing it, since a conditional env-forward is easy to get subtly wrong:
So the default run exercises the shipped configuration and a bisection can still pin either backend explicitly. Both properties hold. The sequencing is right too. The pin was correct when written — #8228 meant the native path could not compile five of this fixture's modules, because One expectation to set: this gate can now legitimately go red, because it is finally testing the default. If it does, that is the instrument working, not a regression from this PR — treat a red here as information about the native path. One fix pushed: the changelog fragment was named |
What
tests/test_next_app_route_dylib.sh:176pinnedPERRY_LLVM_INPROCESS="${PERRY_LLVM_INPROCESS:-0}" \so the production App Route dylib gate compiled its fixture through the text transport, not the native in-process path that is the default. And
${VAR:-0}cannot express "unset" — passingPERRY_LLVM_INPROCESS=or any other value still sets the variable — so no invocation of this gate could exercise the shipped configuration. The nightlynext-app-routeworkflow has been green on a backend users do not get.This is the fourth shape from CLAUDE.md's "Four ways a gate can be unable to fail": the job runs, it is genuinely green, and its subject never ran.
Why it was there, and why it should go now
The pin was correct when it was written: #8228 made the native path unable to compile five of this fixture's modules (
insertelement <2 x i64>had no case in the dialect reader, so the biggest modules — the ones split across codegen units — failed withbad binary op). #8241 fixed that and is merged. The pin now only hides the backend under test.The variable is forwarded only when the caller sets it, so an explicit backend remains selectable for a bisection:
Evidence
Measured on
183d30c53a(bench mini, M1, Node 26.5.1, clang/opt 22.1.8) before writing this, as part of the #8040 native-path acceptance run:Wrote shared library: next-app.dylib(87,475,088 B — against 203 MB via the text path).TypeError: value is not a function, 0E180, 0generated handler bypassed routeModule.handle.freeze/LLVM pipeline started— emitted only bynative_emit::compile_module_units_native— appears 5× per native compile log (chunks/2.js3 units,chunks/430.js6,jsonwebtoken2,app-page.runtime.prod.js10,app-route.runtime.prod.js4) and 0× on the text path. Those are exactly the five modules [codegen] In-process LLVM backend fails the 5 biggest Next App Route modules on current main (silent per-module failure; regression in 3c95020f8..07c8040bf) #8228 could not compile.Full run: #8040 (comment)
Note for reviewers
This makes the nightly gate slower and stricter — the native path took 15–17 min per gate run here versus the text path's, and it will now go red if the native backend regresses on these five split modules. That is the intent: it is the only gate in the tree that compiles a real production Next bundle through the split-module native path.
No version bump. Refs #8040, #8228.
Summary by CodeRabbit
Bug Fixes
Documentation