Repository navigation
fix: give the Vue parity check's Node render enough stack for deep pages - #408
Merged
Merged
Conversation
The parity check renders each recorded page with Vue's server renderer in Node. Since #400, the hydration tests record pages at the nesting limits planned in #272, and for two of them, `c-for attributes` and the 512 KiB thread test, Vue's `renderToString` raised `RangeError: Maximum call stack size exceeded`. Vue's server renderer calls itself several times per nested element, and V8 stops at about 984 KB of stack by default. A browser mounts the same trees: in headless Chrome, Vue mounted 512 nested elements and 256 `v-for` levels around 256 elements, the same shapes built with render functions. So the server is right to write those pages whole, and only the check needs more stack. It now starts Node with `--stack-size=4000` (KB), which stays well inside the 8 MB main-thread stack of macOS and of GitHub's Linux runners; V8 crashes instead of raising when the flag asks for more than the thread has. The parity check over the deep hydration tests now reports 0 Vue errors, where it reported 2. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 25, 2026
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.
The Vue render parity check reported
RangeError: Maximum call stack size exceededfor two pages that #400's hydration tests record:test_deep_templates_are_written_whole_on_the_server[c-for attributes]andtest_a_deep_template_renders_on_a_thread_with_a_small_stack. Another lane hit it on a branch with no Vue changes.Why
The check renders each page with Vue's own
renderToStringin Node. Vue's server renderer calls itself several times per nested element, and V8 stops at about 984 KB of stack by default. A template at the nesting limits planned in #272 needs more.Is the browser affected?
No. In headless Chrome, Vue mounted the same trees, built with render functions as the compiled templates build them:
<template v-for>levels around 144 and 256 elements.All rendered the value. So the server is right to write those pages whole; only the check needed more stack.
The change
scripts/vue_render_parity/check.pystarts Node with--stack-size=4000(KB). That stays well inside the 8 MB main-thread stack of macOS and of GitHub's Linux runners; V8 crashes instead of raising when the flag asks for more than the thread has. A comment in the script says why.Checks
The parity check over the deep hydration tests now reports 0 mismatches and 0 Vue errors, where it reported 2 Vue errors.
🤖 Generated with Claude Code