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 and understanding the Vue differential-parity setup for Script Setup TypeScript cases.
- Assistant
Exploring the differential-parity tests and Script Setup TypeScript fixtures.
- Assistant
Let me look for differential parity tests and known-failure budget specifically.
- Assistant
Let me search more specifically for parity related stuff.
- Assistant
Strange that rg returned nothing for known failure/parity. Let me try differently.
- Assistant
Inspecting coverage tracking and script-setup fixtures next.
- Assistant
Looking at how the differential oracle works and the existing script-setup fixtures.
- Assistant
Reading normalize_code and how snapshots are generated from the Vue compiler.
- Assistant
Let me look at git history for related changes and the expected snapshots / how they're generated. Also the test about required: true - the issue says "Normalization must treat
required: trueas the... - Assistant
Inspecting the required:true change and current script-setup expected output.
- Assistant
Checking how snapshots are regenerated and inspecting the defineOptions/generic cases.
- Assistant
Searching for snapshot generation tooling and comparing script-setup cases.
- Assistant
Reading the expected-output generator and current defineOptions/generic fixtures.
- Assistant
Running the coverage report and comparing Vize against the expected fixtures.
- Assistant
Coverage is fully green; I'll look for unfinished work or intended fixture additions.
- Assistant
Checking the parity matrix doc and existing defineOptions coverage.
- Assistant
Checking whether HEAD diverges from main and surveying defineOptions-related compiler code.
- Assistant
Looking for incomplete parity work and higher known-failure budgets in history.
- Assistant
Checking recent ledger-related commits and any pending patches.
- Assistant
Regenerating expected snapshots with the Vue compiler to spot drift.
- Assistant
Let me try to install deps and regenerate.
- Assistant
pnpm not found - let me check what's available.
- Assistant
No node? That's interesting. Let me find node.
- Assistant
Node isn't installed; I'll get a Node runtime set up next.
- Assistant
Let me install node via nvm or nodesource or binary download.
- Assistant
Good, node is installed. Need to keep PATH.
- Assistant
Regenerating expected snapshots and comparing with the current ones.
- Assistant
Regenerated snapshots diverge from the current ones. Checking full coverage and whether more fixtures are needed.
- Assistant
Inspecting why generic and defineOptions cases diverge from Vue.
- Assistant
Checking Vue's defineOptions test suite for cases we should mirror.
- Assistant
Let me look at how previous similar tasks in the git history added fixtures for define-model和 props-destructure - that was the pattern: I need to understand the current state of the Script Setup TypeScript fixtures and the known failure budget before making any changes. Let me start by exploring the repository structure to find where the relevant fixtures and expected snapshots are located. This will help me determine what needs to be added or updated.
- Assistant
Restoring unrelated snapshots and keeping only the script-setup regeneration.
- Assistant
Interesting - basic and patches still show as modified even after checkout. Weird.
- Assistant
Comparing how Vize compiles SFCs versus Vue's hoistStatic defaults.
- Assistant
Let me check the template compiler options for SFC.
- Assistant
Let me look at default TemplateCompileOptions and how test runner compiles SFC.
- Assistant
Inspecting SFC test-runner defaults and TemplateCompileOptions.
- Assistant
Checking Vize SFC template compiler defaults versus Vue.
- Assistant
Inspecting script-setup template compilation options.
- Assistant
Updating the known-failure budget to match the 14 remaining divergences after regenerating snapshots from Vue.
- Assistant
Searching Vue for defineOptions test patterns we should include.
- Assistant
Investigating why static hoisting diverges from Vue despite hoist_static being enabled.
- Assistant
Confirming defineOptions is unchanged after regeneration, then updating the failure budget.
- Assistant
Updating coverage budgets and known-failure tracking.
- Assistant
Updating the unit test that tracks the known-failure budget.
- Assistant
Update the unit test.
- Assistant
There's an extra closing brace — fixing it.
- Assistant
Adding TypeScript defineOptions variants for inheritAttrs, name, and custom options.
- Assistant
I'll add three TypeScript defineOptions cases after the existing one.
- Assistant
Regenerating snapshots and re-running coverage.
- Assistant
New TypeScript defineOptions cases fail — inspecting the diffs so we can match Vue's output.
- Assistant
TypeScript defineOptions should use
_defineComponentwith object spread instead ofObject.assign. Locating where that's emitted. - Assistant
Inspecting defineOptions emission in component_output.rs.
- Assistant
Reading the rest of the file and how defineComponent imports are handled.
- Assistant
Let me look at preamble and body closing forObject.assign and defineComponent import.
- Assistant
Vue emits:
export default /*@__PURE__*/_defineComponent({ - Assistant
Updating defineOptions emission to use
_defineComponentwith spread in TypeScript mode. - Assistant
For closing: when has_options and is_ts, we use DefineComponent so we need
})which is already the case for has_options. - Assistant
There's also spacing in Vue output:
export default /*@__PURE__*/_defineComponent({ ...{ inheritAttrs: false }, __name: 'test', - Assistant
defineOptions cases all pass now. Updating the pass-count budgets.
- Assistant
Verifying coverage gate and unit tests pass.
- Assistant
Coverage gate is green. Checking related unit/snapshot tests for any regressions.
- Assistant
Checking for insta snapshots that might break from the defineOptions change.
- Assistant
Confirming coverage exits cleanly and reviewing the full diff.
- Assistant
Verifying
is_tssemantics for TypeScript defineOptions emission. - Assistant
Checking whether the non-inline path also needs the defineOptions TypeScript fix.
- Assistant
Confirming the defineOptions and generic cases we care about still pass.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.