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 what we're working with.
Assistant
Let me look at the test tooling directory to find the differential parity oracle.
Assistant
Let me look at the snapshot tests structure to understand how they are run.
Assistant
Let me look at how the snapshots are generated and the differential oracle.
Assistant
Now let me look at how the snapshot tests are run. Let me find the SFC test runner.
Assistant
Now let me look at the current script-setup.toml and existing snapshots to understand what is needed.
Assistant
Now let me look at the expected outputs file for script-setup to see if these cases exist.
Assistant
Now let me check what the issue mentions about - more cases related to defineOptions.
Assistant
Let me look at the current normalize_code function in the test runner.
Assistant
Let me look at the current state of the test cases and known failures.
Assistant
Now let me look at the upstream Vue compiler-sfc tests to find the new cases.
Assistant
Let me look at the upstream Vue compiler-sfc tests for
defineOptions.Assistant
Let me check the upstream Vue compiler-sfc tests by looking at any documentation or existing references.
Assistant
Let me look at the current state of the script-setup tests and the expected outputs:
Assistant
Let me look at the upstream Vue compiler-sfc tests to understand what cases are available.
Assistant
Let me look at which cases are TypeScript in the fixtures.
Assistant
Let me look for any references to upstream Vue tests in the repo.
Assistant
Let me look at the tests/snapshots/sfc/ts/ directory to see what Script Setup TypeScript snapshots are there.
Assistant
Let me look at the upstream Vue tests in any GitHub submodules or references.
Assistant
Let me look for any cached Vue compiler source in the project.
Assistant
Let me look at the current state of the code that handles
defineOptionsand generic.Assistant
Let me check git logs for any related work or tests:
Assistant
Let me look at the specific upstream Vue test cases that should be added. Let me look at the existing test infrastructure to understand the format:
Assistant
Let me look at the normalize function in detail.
Assistant
Let me see if Node.js can be installed.
Assistant
Let me try to install Node.js from NodeSource.
Assistant
Now let me install pnpm and the dependencies.
Assistant
Now I have @vue/compiler-sfc available. Let me see the version and use it.
Assistant
Let me now run the script that generates expected outputs to see the current behavior.
Assistant
Let me revert the changes and check the current state.
Assistant
Let me look at the current
script-setup.snapfor the cases I care about.Assistant
Let me write a small script to generate the expected output for the current cases.
Assistant
Let me look at the upstream Vue tests for these features in the @vue/compiler-sfc package.
Assistant
Let me look at the specific cases that are important.
Assistant
Let me first run the current tests to confirm everything passes.
Assistant
Let me look at the current vize implementation for
defineOptionsandgeneric.Assistant
Now let me add new test cases for defineOptions and generic. First, let me understand the exact location to add them.
Assistant
Now let me add the new test cases. First, let me add the defineOptions cases.
Assistant
Let me find the right place to insert the new defineOptions cases.
Assistant
Let me add the new test cases. First, let me add defineOptions cases.
Assistant
Now let me also add the generic cases. Let me find the location of the existing generic cases.
Assistant
Now let me generate the expected output for the new cases.
Assistant
Now I see the new cases for defineOptions with TypeScript props. The output uses
...{ name: 'MyApp' }(spread) instead ofObject.assign. Let me look at the generic case with default and constraint.Assistant
Let me first check what vize produces for the new cases. Let me run the test runner to see.
Assistant
Now I can see the 3 new cases are failing. Let me check the verbose output to see the differences.
Assistant
I need to add the expected output to the snap file. Let me do that now.
Assistant
Now let me add the new cases to the expected snap file. I'll use a script to insert them in the right place.
Assistant
Let me debug the insertion issue.
Assistant
I see I added the generic case twice. Let me revert and re-do.
Assistant
Now let me run the test to see what the failures look like.
Assistant
Let me see the third failure.
Assistant
Let me look at the component output code to update it.
Assistant
Let me update the code to use spread for TypeScript with defineOptions.
Assistant
Now let me run the test to see if the fix works.
Assistant
Let me add one more case for defineOptions with custom options to fully cover the issue requirements.
Assistant
Now let me regenerate the expected output and add it to the snap file.
Assistant
Let me add the new case to the snap file.
Assistant
Let me update the known-failure budget.
Assistant
Now let me also update the test for KNOWN_FAILURES budget since the current test asserts it's 0:
Assistant
Let me run the tests to verify everything passes.
Assistant
Let me verify everything is working correctly.
Assistant
Let me check if there are any snapshot tests that need updating.
Assistant
The snapshot test needs updating. Let me look at it.
Assistant
Let me update the snapshot.
Assistant
Let me check the actual output and make sure the snapshot matches.
Assistant
The diff is showing that the snapshot has one extra empty line that doesn't match. Let me look at the actual new snapshot.
Assistant
Let me accept the new snapshot.
Assistant
The snapshot has an extra
assertion_line: 152that the original didn't have. Let me remove that.Assistant
Let me look at the new case snapshot.
Assistant
The snapshot looks correct. Let me accept it.
Assistant
Now let me run all the snapshot tests.
Assistant
All snapshot tests pass. Let me run the coverage report.
Assistant
Let me clean up temporary files and verify everything is in order.
Assistant
Let me look at the full diff to verify everything is correct.
Assistant
Let me also look at the snapshot diffs.
Assistant
Let me run all tests to make sure everything passes.
Assistant
Let me check if there's a special test for the normalize function.
Assistant
Let me check if regex is available.
Assistant
Let me look at the actual output format to understand the structure.
Assistant
Let me run all tests one more time to verify everything is correct.
Assistant
Let me check if there are any other tests that might be affected.
Assistant
Let me run the JS tests too.
Assistant
This failure is unrelated to my changes. Let me check if it was failing before.
Assistant
I see the stash removed snapshot files. Let me restore them.
Assistant
Let me verify all tests still pass.
Assistant
Let me verify the final state once more.
Assistant
Let me verify the JS tests work.
Assistant
This failure is unrelated to my changes - it's about linting, not the SFC compiler. Let me check if thiswas failing before my changes.
Assistant
Let me run the coverage test one more time to confirm everything works.
Assistant
The task is complete. Let me do a final review of all my changes.
Assistant
All changes are in place. Let me do a final summary verification.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.