Skip to content

fix: let the Vue parity check accept pinned opaque HTML records - #390

Merged
JuroOravec merged 1 commit into
mainfrom
fix/parity-pinned-record
Oct 25, 2026
Merged

JuroOravec merged 1 commit into
mainfrom
fix/parity-pinned-record

Conversation

@JuroOravec

Copy link
Copy Markdown
Member

The fast gate's vue render parity phase fails on main with 4 Vue errors, all "invalid opaque HTML record", on the pages of test_ignored_contents_walk_deep_bodies_in_constant_frames (#364).

What was wrong

  • What the check does: it renders each recorded page with Vue's own server renderer and compares the HTML with Citry's Rust renderer.
  • Its copy of the component: for citry-opaque-html, the block of HTML Citry hands to Vue, scripts/vue_render_parity/render.mjs kept its own copy of the browser client's record check. That copy accepted only {html, nodeCount}.
  • What the browser accepts: client.js (checkOpaqueHtmlRecord) also accepts pinned: true, which Citry sends for every #c-ignore block (_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

  • The check now runs the browser's own code: render.mjs reads checkOpaqueHtmlRecord, and the plain helper it calls, from client.js's source and runs them, so the check accepts exactly the records the browser accepts. It also refuses empty HTML with a nonzero nodeCount, as the browser does, which the old copy let through.
  • It fails loudly: if client.js renames, 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.
  • What stays copied: the rest of the component, the Fragment with one static vnode, stays as the script's adapted copy. A pinned record only changes later renders, and the check renders each page once.

Checks

  • The failing pages: the parity check over test_deep_render_output_walkers.py and test_meta_attrs.py reports 0 mismatches and 0 Vue errors; with main's render.mjs it reports the 4 errors.
  • A renamed definition: renaming checkOpaqueHtmlRecord in client.js makes the script fail with that message.

No changelog entry: a repository check, not package behavior.

🤖 Generated with Claude Code

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]>
@JuroOravec
JuroOravec merged commit edd7bee into main Oct 25, 2026
4 of 5 checks passed
@JuroOravec
JuroOravec deleted the fix/parity-pinned-record branch October 25, 2026 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant