ISSUE DESCRIPTION Compiler parity: add the current Script Setup TypeScript differential…
- User
ISSUE DESCRIPTION
Compiler parity: add the current Script Setup TypeScript differential cases and keep the known-failure budget accurate
Use the existing Vue differential-parity oracle for the current SFC fixture additions. Add and match the upstream Vue output for Script Setup TypeScript cases covering
defineOptionsoptions such asinheritAttrs, component name/custom options, and<script setup generic>type parameters.Normalization must treat
required: trueas the default representation expected by the fixture comparison. Regenerate the affected expected snapshots from the real Vue compiler and update the tracked known-failure budget so the coverage command reports exactly the remaining known divergences rather than hiding new failures.Evaluation contract
The required differential corpus for this task is the current Script Setup TypeScript snapshot set, including
defineOptionscases and script-setup generic type parameters. Normalizerequired: trueas the default representation expected by the oracle, regenerate those snapshots from the real Vue compiler, and update the tracked known-failure count to exactly the remaining known divergences. Passing a different parity-fixture subset does not satisfy this task.Interface
No new interfaces are introduced.
ADDITIONAL ADVICE
Since you are given a git repository, you can use git commands to simplify your work. For example, if you made a mistake and want to revert your changes, you can use
git checkout <file>to restore the file to its original state. You can also reset all changes in the repository usinggit reset --hardcommand. Additionally, you can usegit stashandgit stash popto temporarily save your changes and restore them later. Finally, you can see the changes that you've made (which will be submitted when you callsubmit) usinggit statusorgit diffcommands. However you don't need to usegit addorgit commitbefore submitting your changes. In fact,submitonly submits currently unstaged changes because it usesgit diffto get the changes that need to be submitted.CHECKLIST
Before submitting your solution, please go over the following checklist and make sure you've done everything:
- If an error was reported in the issue description, I have successfully reproduced it.
- If an error was reported in the issue description, I have confirmed that my fix resolves the error.
Assistant
I'll start by exploring the repository structure to understand the codebase and the differential parity oracle mentioned in the issue.
Assistant
Let me look at the differential parity oracle mentioned in the issue. Let me look at the SFC-related crates and the tools directory.
Assistant
I need to make single tool calls. Let me search for the parity-related files.
Assistant
Let me explore the fixtures directory and the parity/oracle tooling more deeply.
Assistant
Now let me look at the snapshot test infrastructure and how the parity oracle works.
Assistant
Now let me understand how the snapshot tests work and how the parity oracle compares with Vue.
Assistant
This is the snapshot test for the vize compiler itself. But the issue mentions a "differential-parity oracle" that compares vize's output against the real Vue compiler. Let me find that tooling.
Assistant
Let me look for the actual differential parity oracle that compares output against the Vue compiler.
Assistant
Let me look at the vize_test_runner coverage that mentioned known_failure.
Assistant
Now let me look at the test runner library and the expected snapshots directory.
Assistant
Let me see the full
normalize_codefunction which was truncated.Assistant
Now let me look at the expected snapshots directory and the generation script.
Assistant
Let me run the coverage command to see the current state of the parity tests.
Assistant
All currently passing. Let me look at the full script-setup.toml to understand what cases exist for defineOptions and generic components.
Assistant
Let me look at the existing defineOptions and generic component cases in detail.
Assistant
Let me look at the expected snapshot for defineOptions and generic cases.
Assistant
Let me check the Vue compiler source available in node_modules to find canonical test cases.
Assistant
No node_modules present. Let me check the tests package.json and how the Vue compiler gets installed.
Assistant
I need to install JS dependencies to use the Vue compiler. Let me check the package manager and catalog.
Assistant
No node, pnpm, or vp in PATH. Let me check what's available.
Assistant
No node available. The .node-version file says a specific version. Let me check the .node-version and the flake.nix to see if there's a way to get node. Let me check what's in /workspace/.cargo/bin and look for any node version manager.
Actually, let me check the setup more carefully. There might be a way to install node. Let me look at the .cargo dir and see if there's a way. Let me check apt or other package managers.
Assistant
Let me search for any node binary cached on the system.
Assistant
No node available. Let me check internet access and download a Node.js binary.
Assistant
Internet works. Let me extract Node and set up the environment.
Assistant
Node is ready. Now let me set up the Vue compiler packages at the repo root so the generate-expected.ts script can resolve them. Let me use corepack/npm.
Assistant
The root package.json has catalog references npm can't handle. Let me create a standalone install directory.
Assistant
Packages installed. Now let me run the generate-expected.ts script for the script-setup fixture, using NODE_PATH to resolve the modules.
Assistant
ESM needs node_modules resolvable from the script location. Let me check git status (npm init may have modified files) and set up a symlink.
Assistant
Good, restored. Now let me symlink node_modules so ESM can resolve the Vue packages from the script's location.
Assistant
The script works. Let me verify the regenerated output matches the existing snapshot (confirming environment fidelity).
Assistant
The regeneration shows the current Vue compiler produces different output (hoisting, import ordering) than the existing snapshots. This is significant. Let me first restore the original snapshot, then investigate carefully.
Assistant
Let me check the git history of the expected snapshot and the generate script to understand the version fidelity.
Assistant
Let me check what vize actually produces for the "generic component with extends" case (the vize snapshot).
Assistant
So vize does NOT hoist
["value"]into_hoisted_1. Vue 3.6.0-beta.10 DOES hoist it. So this is a genuine divergence between vize and the current Vue compiler.But the existing .snap (in tests/expected/sfc/script-setup.snap) does NOT have hoisting either, and it matches vize. So the existing .snap was generated with an older Vue compiler that did NOT hoist (or it was hand-edited to match vize).
Wait, let me check the existing .snap content for this case to confirm.
Assistant
Let me examine the commit that established the fixture coverage ledger to understand the intent.
Assistant
Now I understand the history. Let me check whether vize produces hoisting (
_hoisted_) at all in its snapshots.Assistant
Let me regenerate the script-setup snapshot with the current Vue compiler and run coverage to get ground truth on divergences.
Assistant
I now have ground truth. After regenerating with the real Vue compiler, 14 script-setup cases diverge (these were previously hidden by hand-matched snapshots). Let me examine the vize defineOptions implementation to understand what it supports.
Assistant
I now understand the situation. Let me look at the end of the script-setup.toml fixture to append new cases.
Assistant
Let me append the new defineOptions and generic type-parameter cases to the fixture. First let me view the exact ending to append cleanly.
Assistant
Now let me regenerate the snapshot with the real Vue compiler and run coverage to see how the new cases fare.
Assistant
All 6 new cases pass (script-setup went 55→61 passing). The 14 failures are the previously-hidden divergences. Let me capture the exact failure list and confirm the totals.
Assistant
The picture is clear now:
- After regenerating from the real Vue compiler and adding 6 new matching cases: VDOM 422, Vapor 104, SFC 151/165 (14 failures), Total 677/691.
- The 14 failures are the previously-hidden divergences that must now be tracked honestly.
Let me update the coverage.rs known-failure budget. First let me open it.
Assistant
Now let me update the MIN constants and the KNOWN_FAILURES list.
Assistant
Now let me update the test assertion at the bottom of the file.
Assistant
Let me use the edit command with line ranges for the test.
Assistant
There's leftover duplicate content. Let me view and fix the test module.
Assistant
I accidentally dropped the
vdom/elementassertion. Let me restore it.Assistant
There's an extra closing brace at line 313. Let me remove it.
Assistant
Now let me build and run the coverage command to verify it exits 0.
Assistant
Coverage exits 0 with the accurate budget (14 failed, 14 tracked). Now let me run the unit test and verify it passes.
Assistant
The coverage tests pass. Now I must handle the insta snapshot tests for the 6 new cases I added to script-setup.toml. Let me check whether they fail.
Assistant
The snapshot_tests is a module within the lib. Let me check how it's wired and run it by test name.
Assistant
I need to create insta snapshots for the 6 new cases (vize's own TS output). Let me generate them with INSTA_UPDATE=always.
Assistant
Insta snapshots created. Let me verify they look reasonable (vize's TS output) and run the full sfc snapshot test suite.
Assistant
These vize TS snapshots look correct. Now let me run the full sfc snapshot test suite to make sure nothing else broke.
Assistant
All snapshot tests pass. Let me verify the
required: truenormalization is properly committed (check git history) and confirm it handles the relevant forms.Assistant
The
required: truenormalization is already committed (commit #671). Let me verify it handles the forms in the regenerated snapshots for the new generic cases.Assistant
The
required: trueis properly normalized. Let me verify the defineOptions cases' Vue output matches vize (parity confirmed by coverage). Let me view the regenerated defineOptions custom options snapshot.Assistant
Let me check whether any test asserts the MIN count constants, to ensure my changes are safe.
Assistant
No other tests reference the MIN counts. Let me check the TS tooling tests that might verify coverage/parity numbers.
Assistant
There's a
vue-parity-matrix.mddoc and a coverage summary script. Let me check if they reference specific numbers I'd need to update.Assistant
The doc references a stale
625/625coverage number. Let me check whether any test asserts coverage numbers or the doc content.Assistant
Let me check what the language-engineering-practices test asserts about the parity matrix doc.
Assistant
Let me check the release-readiness test for any assertions about coverage numbers or the budget.
Assistant
Let me check the production-readiness.md context around the
625/625claim to decide if it needs updating.Assistant
The doc numbers are a dated historical audit snapshot (May 18, 2026), not the live budget, and aren't test-asserted — I'll leave them. The live accurate budget is in coverage.rs. Let me verify the git status and ensure node_modules won't be submitted.
Assistant
node_modules is gitignored. The 6 new insta snapshots are needed for the existing insta test (which now runs on the new cases). Let me run a comprehensive verification of all affected tests.
Assistant
All tests pass. Let me run clippy on the modified crate to ensure no lint regressions (CI gates on
-D warnings).Assistant
Clippy is clean. Let me do a final review of the source diffs (coverage.rs and the fixture additions).
Assistant
The diff is clean. Let me verify the regenerated snap has exactly 75 cases matching the fixture, and confirm no case is missing an expected output.
Assistant
75 cases in both fixture and snap, no missing expected outputs. Let me confirm the new insta snapshots aren't gitignored (so they'll be submitted) and do a final full status check.
Assistant
The new insta snapshots aren't ignored. Let me run the full vize_atelier_sfc lib test suite to ensure nothing else broke (including the compile/tests.rs insta tests).
Assistant
All 405 sfc lib tests pass. Let me do a final fidelity check: regenerate the snapshot once more and confirm it's byte-identical to what I have committed (proving no manual edits, pure Vue compiler output).
Assistant
The committed snapshot is byte-identical to fresh Vue compiler output. Let me check what plain
git diffcaptures (to understand new-file handling for submission).Assistant
Plain
git diffdoesn't capture untracked files. To ensure the new insta snapshots are submittable regardless of how the harness diffs, let me testgit add -N(intent-to-add) behavior on one file.Assistant
git add -N(intent-to-add) makes new files visible to plaingit diffwithout staging their content — a safe hedge that works whether the harness diffs staged or unstaged changes. Let me apply it to all 6 new insta snapshots.Assistant
All 9 files now appear in
git diff. Let me run the final verification to confirm everything is green before submitting.Assistant
All green. Let me verify the diff for a new insta snapshot is a proper new-file diff (so it applies cleanly).
Assistant
The diff is a proper new-file diff. Let me verify all 6 new cases produced valid (non-error) compiled output in the regenerated snapshot, confirming the official Vue compiler accepts them.
Assistant
All 6 new cases compile cleanly with the official Vue compiler. Everything is verified. Let me do a final status check before submitting.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.