Repository navigation
fix: let the Vue parity check accept pinned opaque HTML records - #390
Merged
Merged
Conversation
The parity check renders each recorded page with Vue's server renderer,
using a small copy of client.js's `citry-opaque-html` component. That
copy accepted only `{html, nodeCount}` records, while client.js also
accepts `pinned: true`, which Citry sends for every `#c-ignore`
block. So the check raised "invalid opaque HTML record" for
the pages of `test_ignored_contents_walk_deep_bodies_in_constant_frames`
and failed the fast gate with 4 Vue errors.
`render.mjs` now reads `checkOpaqueHtmlRecord` and the `plain` helper it
uses from client.js's source and runs them, so the check accepts exactly
the records the browser accepts. If client.js renames or duplicates
either definition, the script throws, so the parity check and the
browser cannot disagree about which records are valid without the check
failing.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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 fast gate's
vue render parityphase fails onmainwith 4 Vue errors, all "invalid opaque HTML record", on the pages oftest_ignored_contents_walk_deep_bodies_in_constant_frames(#364).What was wrong
citry-opaque-html, the block of HTML Citry hands to Vue,scripts/vue_render_parity/render.mjskept its own copy of the browser client's record check. That copy accepted only{html, nodeCount}.client.js(checkOpaqueHtmlRecord) also acceptspinned: true, which Citry sends for every#c-ignoreblock (_vue/direct_capture.py). The copy had fallen behind, and fix: walk render output with the same Python frames at any template depth #364's test is the first recorded page that reached it.The change
render.mjsreadscheckOpaqueHtmlRecord, and theplainhelper it calls, fromclient.js's source and runs them, so the check accepts exactly the records the browser accepts. It also refuses empty HTML with a nonzeronodeCount, as the browser does, which the old copy let through.client.jsrenames, removes or duplicates either definition, the script throws "client.js must define exactly one ...", so the two copies cannot drift apart without the check failing.Checks
test_deep_render_output_walkers.pyandtest_meta_attrs.pyreports 0 mismatches and 0 Vue errors; withmain'srender.mjsit reports the 4 errors.checkOpaqueHtmlRecordinclient.jsmakes the script fail with that message.No changelog entry: a repository check, not package behavior.
🤖 Generated with Claude Code