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.
- I have thought about edge cases and made sure my fix handles them as well.
- I have run existing tests in the repository that might have been affected by the change I made and confirmed that they pass. I want you to list every bullet from this checklist and write your reasoning for why you think you did it or didn't need to.
Repository has been uploaded and your shell is currently at the repository root. Time to solve the issue!
(Current directory: /vize, current file: none) bash-$
- Assistant
I'll start by exploring the repository structure and understanding the existing differential-parity setup for Script Setup TypeScript cases.
- Assistant
Exploring the test structure and differential-parity fixtures for Script Setup TypeScript.
- Assistant
Let me search more specifically for differential parity related code.
- Assistant
Hmm, interesting - the search didn't find much. Let me try broader searches.
- Assistant
The rg might be failing or returning empty for some reason. Let me try differently.
- Assistant
Looking at the recent SFC parity work, coverage budget, and Script Setup fixtures next.
- Assistant
I'll check the recent parity commits and search for the differential oracle used for Vue SFC fixtures.
- Assistant
Inspecting the Script Setup fixtures, expected snapshots, and how the oracle regenerates them.
- Assistant
I'll look at how snapshots are regenerated and what the current defineOptions / generic expected outputs look like.
- Assistant
Let me look at how expected snaps are generated - looking at commit 9570b62e more carefully and dump_patches, and also look for vue compiler oracle scripts.
- Assistant
There's a generate-expected.ts tool. Let me read it fully and the lib.rs normalize section carefully.
- Assistant
The normalization output looked corrupted — I'll re-read that section carefully.
- Assistant
Checking the defineOptions expected output and related TypeScript snapshot cases in the repo.
- Assistant
I'll run the coverage report and compare Vize vs Vue output for defineOptions and generic cases.
- Assistant
Node might not be in path?
- Assistant
No node installed. Let me try to install node or use nvm. There's .node-version and flake.nix.
- Assistant
I'll install Node so we can regenerate Vue oracle snapshots.
- Assistant
Good. Now let me install dependencies and look at what more needs to be done. Let me also look at git diff for any wip related to this, and look at what test refer to TypeScript script setup specifica...
- Assistant
I'll inspect defineOptions codegen and run the SFC fixture coverage to see current failures.
- Assistant
Coverage is already 100%. I'll inspect the TypeScript SFC snapshots and how those cases are produced.
- Assistant
There's snapshot_tests.rs - let me look at that. Also note the Vize ts snapshot for generic omits
required:truewhile the expected from Vue has it - they rely on normalization for the toml fixtures.... - Assistant
Checking Vue cores tests and any scripts that generate differential fixtures.
- Assistant
I'll inspect generate_expected and Vue's related compileScript tests for defineOptions / generic cases.
- Assistant
pnpm install timed out. I'll try a lighter install focused on the packages needed for generate-expected.
- Assistant
Let me install in a temp directory instead.
- Assistant
Good. Now let me look at what cases are missing. Let me compare regenerating expected for script-setup and see if things differ. Also search vue package for defineOptions test content if any.
- Assistant
Let me use createRequire properly.
- Assistant
Important finding: TypeScript
defineOptionsuses object spread. Checking Vue vs Vize for JS and TS modes. - Assistant
I'll inspect how TypeScript mode is detected and how defineOptions is emitted in Vize.
- Assistant
Checking Vue's defineOptions codegen implementation next.
- Assistant
Found it. Let me extract the defineOptions region from vue source.
- Assistant
Let me look at how optionsRuntimeDecl is used around lines 15100-15220
- Assistant
I'll check closing-brace handling for defineOptions and whether generics affect the compiled output.
- Assistant
Checking how the test runner decides TypeScript mode and how forcible
is_tsinteracts with defineOptions. - Assistant
Oops, wrong directory.
- Assistant
Checking how defineComponent gets imported in the preamble for TypeScript.
- Assistant
I'll update TypeScript defineOptions codegen and check vapor closing-brace logic.
- Assistant
I'll update component definition emission for TypeScript defineOptions (object spread) and adjust closing.
- Assistant
Updating component_output.rs and body.rs next.
- Assistant
Now replace the whole opening emission logic and the return statement.
- Assistant
Removing the unused
has_optionsvariable and fixing the return path. - Assistant
I need to remove has_options, fix return, and add import for ToCompactString.
- Assistant
Some edits worked, some didn't. Let meRead the full file and fix remaining issues.
- Assistant
Need to fix the return and add the import.
- Assistant
There's a duplicate return line - I need to remove has_options one.
- Assistant
Adding TypeScript defineOptions fixture cases and regenerating expected ~snapshots.
- Assistant
I'll insert new cases between defineOptions and defineSlots.
- Assistant
Need to open the file first.
- Assistant
Regenerating expected snapshots with the Vue oracle next.
- Assistant
Running coverage to see what still diverges.
- Assistant
Full regeneration may have changed existing snapshots — checking the crack between old and new.
- Assistant
Also the issue says "regenerate the affected expected snapshots from the real Vue compilers" - insering new is correct. Now re-run coverage.
- Assistant
Coverage is green. Updating the min pass budget and refreshing insta TypeScript snapshots.
- Assistant
Checking which snapshots were updated and whether JS snapshots need changes.
- Assistant
Good. Run JS snapshots too and unit tests for normalize + coverage. Also check if vue-parity-matrix docs need ints.
- Assistant
Everything passes. Checking the parity matrix numbers and running related SFC unitests tests.
- Assistant
Updating the parity matrix docs and rustfmt-ing the modified Rust.
- Assistant
New snapshot files must be tracked so submit picks them up — adding them now.
- Assistant
Ensuring new files appear in
git difffor submit via intent-to-add. - Assistant
Final review of the component_output code, then submit.
- Assistant
All checks pass. Submitting the changes.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Identical first prompt
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-27BCompare side by side →
Qwen/Qwen3.6-27BCompare side by side →