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
Let me start by exploring the repository structure to understand the codebase and then identify the issue related to Vue compiler parity and Script Setup TypeScript differential cases.
Assistant
Let me explore the repository structure more to understand what this project is about.
Assistant
This is a Vue.js toolchain in Rust. Let me explore the tests and crates directories to find the differential parity oracle and Script Setup TypeScript cases.
Assistant
Let me look for differential-parity related files and the known-failure budget.
Assistant
Let me look for the SFC differential parity oracle and known-failure tracking:
Assistant
Assistant
Let me look at the tools directory for the differential oracle and fixture generation:
Assistant
Assistant
Let me search for the "known-failure" or "budget" references more specifically:
Assistant
Found it! Let me look at the coverage.rs file:
Assistant
Now I have a clear picture. Let me explore the SFC fixtures and expected files to understand what test cases are involved:
Assistant
Let me continue reading the script-setup.toml file to find defineOptions and generic component cases:
Assistant
Now let me look at the specific defineOptions and generic component cases in the fixture:
Assistant
Now let me look at the expected snapshots for these SFC script-setup tests:
Assistant
Let me look at the expected snapshots for script-setup:
Assistant
So far I've found the test runner, fixture definitions, and expected snapshots. Now I need to understand:
- How the SFC tests work - what runner compiles the Vue SFC and compares to expected snapshots
- The vize_test_runner code structure to understand the test execution
- What
required: truenormalization means - The "known-failure budget" is in
KNOWN_FAILURESwhich is currently empty - The expected snapshots need to be regenerated from the real Vue compiler
Let me look at the vize_test_runner more closely to understand how tests are executed.
Assistant
Now let me understand the test runner structure:
Assistant
Now I have a clear understanding of the codebase. Let me look at the normalize_code function to understand the
required: truenormalization:Assistant
Now I understand the issue better. Let me now run the coverage tool to see which tests are currently failing:
Assistant
All tests are passing. Now I need to understand what the issue is asking for. The issue says:
- Add current Script Setup TypeScript differential cases for
defineOptionsoptions such asinheritAttrs, component name/custom options, and<script setup generic>type parameters - Normalize
required: trueas the default representation expected by the fixture comparison - Regenerate the affected expected snapshots from the real Vue compiler
- Update the tracked known-failure budget
The current
KNOWN_FAILURESarray is empty, and the tests all pass. But the issue is about "compiler parity" - meaning the expected snapshots should be generated from the real Vue compiler (@vue/compiler-sfc), not from Vize.Let me look at the tool that generates expected outputs:
- Add current Script Setup TypeScript differential cases for
Assistant
Now I understand the structure. Let me check if there's anything in the
directives.tomlfixture that should also be considered:Assistant
Now let me check whether the directives tests are included in the coverage runner:
Assistant
The
sfc/directivesfixture is NOT included in the coverage runner's test list! The issue says to add the Script Setup TypeScript differential cases includingdefineOptionsand<script setup generic>- but these are already in thesfc/script-setup.tomlfixture and they're already passing.Let me re-read the issue more carefully. The key points are:
- Add and match the upstream Vue output for Script Setup TypeScript cases covering
defineOptionsoptions - Normalize
required: trueas the default representation expected by the fixture comparison - Regenerate the affected expected snapshots from the real Vue compiler
- Update the tracked known-failure budget
Wait - the
sfc/directivesfixture exists but is not in the coverage runner. Also the issue mentions the "evaluation contract" specifically says "the current Script Setup TypeScript snapshot set, includingdefineOptionscases and script-setup generic type parameters."Let me check if the
sfc/directivestests have expected outputs:- Add and match the upstream Vue output for Script Setup TypeScript cases covering
Assistant
There's a
directives.tomlfixture but nodirectives.snapexpected output! Let me regenerate the expected snapshots from the real Vue compiler for the SFC fixtures, including the directives one:Assistant
Assistant
Assistant
Now let me try to run the generate-expected script:
Assistant
The project uses pnpm with catalog protocol. Let me check if pnpm is available:
Assistant
Assistant
I need a newer Node.js. Let me install it via nvm or similar:
Assistant
Now let me regenerate the expected snapshots for SFC script-setup:
Assistant
I need to analyze the changes made by the generate-expected.ts script to the script-setup.snap file and understand what differences exist between the old and new snapshots. Let me check the git diff to see what changed.
Assistant
The snapshot regeneration from the real Vue compiler has produced differences. These changes include:
- Reordered import statements (alphabetical sorting)
- Hoisted static properties (
_hoisted_1) - Different formatting/indentation
- Different handling of union types in props
- Cached handler functions
Let me check how many tests now fail after regenerating with the official Vue compiler output:
Assistant
Now I can see that after regenerating the expected snapshots from the real Vue compiler, there are 14 failing tests. These are the known divergences. I need to:
- Add these 14 failures to the
KNOWN_FAILURESlist incoverage.rs - Update the minimum pass counts to match the actual pass counts
- Also regenerate the
sfc/directives.snapexpected output and add it to the coverage runner - Let me also regenerate all other SFC snapshots to keep everything up to date
First, let me also regenerate the other SFC snapshot files to see if there are any other changes:
- Add these 14 failures to the
Assistant
Let me regenerate all SFC snapshots and check the current state of things:
Assistant
The user seems to just be waiting for me to continue. Let me continue working on the issue. I need to:
- Generate the
sfc/directives.snapfile (it doesn't exist yet) - Add
sfc/directivesto the coverage runner - Update the
KNOWN_FAILURESlist with the 14 failing tests - Update the minimum pass counts
- Regenerate all SFC expected snapshots from the real Vue compiler
Let me continue by generating the directives snapshot and then making all the necessary changes.
- Generate the
Assistant
Now let me check the generated directives snapshot:
Assistant
Now I need to run the coverage to see the current state and identify all the failing tests. Let me run the coverage tool and see the detailed output to understand what tests are failing.
Assistant
I see there are many failures after regenerating patches.snap. The issue specifically focuses on the "Script Setup TypeScript snapshot set" - which is the
sfc/script-setup.tomlfixture. Let me revert the patches.snap and basic.snap changes and focus only on the script-setup changes as specified in the issue.Assistant
The issue description is very specific:
- "Script Setup TypeScript differential 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"
- "The required differential corpus for this task is the current Script Setup TypeScript snapshot set, including
defineOptionscases and script-setup generic type parameters"
So the issue is specifically about the
sfc/script-setuptest set. The expected snapshots for script-setup need to be regenerated from the real Vue compiler, and then the known-failure budget needs to be updated.Let me run the coverage again to see the current state after reverting patches.snap and basic.snap:
- "Script Setup TypeScript differential cases covering
Assistant
Now I need to:
- Add these 14 known failures to the
KNOWN_FAILURESlist - Update the minimum pass counts to reflect the new reality
Let me also check if the
sfc/directivestest file needs to be added to the coverage runner. The issue mentions adding Script Setup TypeScript cases, and the directives fixture exists but isn't tracked. Let me first check what happens if I add it:- Add these 14 known failures to the
Assistant
Looking at the issue more carefully, I need to:
- Regenerate the
sfc/script-setup.snapexpected snapshots from the real Vue compiler (done) - Update the
KNOWN_FAILURESbudget to track the 14 remaining divergences - Update the minimum pass counts to reflect the new reality
Let me update the
coverage.rsfile:- Regenerate the
Assistant
Now I need to update the
coverage.rsfile with:- The 14 known failures for
sfc/script-setup - Updated minimum pass counts (SFC: 145, Total: 671)
- Updated test assertions
- The 14 known failures for
Assistant
OK so I was wrong about the KNOWN_FAILURES budget - it should be 14, not 0. And the test assertions need to be updated. Let me write the corrected file.
Assistant
The user hasn't sent any new message - this is just a continuation of my work. Let me verify that my changes to coverage.rs work correctly by running the coverage tool again.
Assistant
The coverage command now passes with 14 known failures tracked. Let me also run the unit tests to make sure the test assertions in coverage.rs pass:
Assistant
Now let me run all the tests in the vize_test_runner crate to make sure everything still works:
Assistant
Let me check the current state of my changes:
Assistant
Assistant
I need to check if the directives test is included in the coverage runner. Let me search for it.
Assistant
The
sfc/directivesis not included in the coverage runner. The directives.snap file I created is extra. Let me remove it and focus on what the issue asks for.Assistant
Let me verify my changes are complete and working correctly:
Assistant
The coverage command passes. Let me run the unit tests again and verify the final state:
Assistant
All tests pass. Let me review my changes and make sure everything is complete.
Let me check the git status and diff to see what I've changed.
Assistant
The tests pass and coverage is correct. Let me verify the
required: truenormalization is working properly by checking the test in lib.rs.Assistant
My changes to coverage.rs look correct. Now let me check the snapshot diff:
Assistant
Let me verify the final state of my changes and submit.
Assistant
Let me verify my changes are complete and submit.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.