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 locating the Vue differential-parity fixtures and known-failure tracking.
- Assistant
Let me explore the tests and tools related to differential parity.
- Assistant
Let me look at the differential parity tooling and known failures more closely.
- Assistant
Let me search more specifically for Vue differential parity
- Assistant
Interesting - rg didn't find defineOptions. Let me try broader searches.
- Assistant
Strange, nothing found. Maybe the path issues with rg? Let me try differently.
- Assistant
I'll inspect known-failure tracking, script-setup fixtures, and vue parity docs next.
- Assistant
Let me look at the script-setup fixtures and expected snaps, and how vue parity snapshots are generated.
- Assistant
Checking git history and how the Vue oracle snapshots are regenerated.
- Assistant
Let me look at the recent commit about script-setup compiler parity and how fixtures/snapshots work.
- Assistant
Found the oracle generator — I'll inspect it and the fixture setup next.
- Assistant
I'll inspect the current defineOptions/generic fixtures, normalization, and known-failure budget.
- Assistant
Checking prior known-failure budgets and current defineOptions/generic expected output.
- Assistant
I'll regenerate the script-setup expected snaps from the Vue oracle and run coverage to see remaining failures.
- Assistant
No node_modules. I need to install dependencies.
- Assistant
pnpm and npm might not be in path. Let me find them.
- Assistant
Node isn't available — checking how the environment provides it.
- Assistant
There's /tools and /artifacts and /workspace. Let me check those.
- Assistant
Let me look at what's available at /artifacts/tools - maybe node is there. Also check if fnm/nvm exists.
- Assistant
I'll install Node so we can run the Vue oracle generator.
- Assistant
Node is ready — next I'll enable pnpm and install the test dependencies.
- Assistant
Next I'll install root deps and regenerate the script-setup expected snapshots.
- Assistant
I'll inspect the regenerated snapshot diff and the full set of script-setup cases.
- Assistant
Checking the normalize test and how SFC snapshot parity is structured.
- Assistant
There are snapshot tests in crates/vize_atelier_sfc; I'll inspect those next.
- Assistant
Running the coverage suite next to measure current failures against the regenerated snaps.
- Assistant
I'll check Vue's upstream defineOptions tests and what additional cases we should cover.
- Assistant
Maybe vue package structure is different. Let me search packages.
- Assistant
I'll check recent changelogs and any work-in-progress notes related to this.
- Assistant
Checking what last set the MIN_PASSED thresholds.
- Assistant
Inspecting defineOptions implementation and tests, then adding the missing TS cases.
- Assistant
I'll check for rfelik documentation or related PR descriptions next.
- Assistant
I'll pull Vue's compileScript tests and compare defineOptions/generics coverage.
- Assistant
Let me read the defineOptions.spec.ts and also search for generic in vue tests.
- Assistant
Looking at vue's generic attribute test around line 869:
- Assistant
I'll regenerate all SFC expected snapshots, then update the known-failure budget from coverage.
- Assistant
I'll restore unrelated snaps and keep only the script-setup regeneration.
- Assistant
Hmm checkout didn't work properly? It still shows modified. Maybe file mode or something. Let me force checkout.
- Assistant
I'll add the Script Setup TypeScript
defineOptionscases to the fixtures. - Assistant
I'll expand the defineOptions section with TS cases.
- Assistant
I'll regenerate expected snapshots and inspect the coverage failures.
- Assistant
I'll compare Vue vs Vize output for the failing TypeScript defineOptions cases.
- Assistant
Vue TypeScript mode merges defineOptions via object spread inside
_defineComponent; I'll align Vize with that. - Assistant
I need to see how the closing of the component definition works with has_options.
- Assistant
I need to find where the closing of Object.assign happens - based on has_options.
- Assistant
Looking at body.rs for the closing:
- Assistant
I'll update component_output so TypeScript defineOptions uses object spread inside
_defineComponent. - Assistant
There's a duplicate
} else if has_default_export {- I need to fix that. - Assistant
I'll re-run coverage with the defineOptions fix, then update the known-failure budget.
- Assistant
Updating the known-failure budget and minimum pass counts.
- Assistant
Also need to update the test at the bottom.
- Assistant
Now update the unit test at the bottom.
- Assistant
Update the test to assert 14 and that the known failure is tracked.
- Assistant
I need to restore the
#[test]attribute I accidentally removed. - Assistant
I'll re-run coverage and the normalize/unit tests to confirm everything is clean.
- Assistant
Checking whether snapshot_tests honor
lang="ts"when forcing is_ts. - Assistant
I'll check how the test runner decides TypeScript mode so we don't break JS defineOptions coverage.
- Assistant
Checking how compile_script receives is_ts relative to SFC lang.
- Assistant
I should base defineOptions emission on source lang, not just the output
is_tsflag. - Assistant
I see body.rs passes is_ts and source_is_ts to emit_component_definition? Let me read how body passes args.
- Assistant
I'll switch defineOptions emission to follow source TypeScript lang for Vue parity.
- Assistant
The edit hit the wrong file — I'll restore coverage.rs and apply the change to component_output.rs.
- Assistant
I need to re-apply the coverage changes. And fix component_output - let me check its state.
- Assistant
Re-applying the coverage.rs known-failure budget update.
- Assistant
Now update the test at the bottom.
- Assistant
There's an extra closing brace at line 301. Need to remove it.
- Assistant
Verifying fixtures and re-running coverage and unit tests.
- Assistant
I'll update the SFC TypeScript insta snapshots for the new defineOptions cases.
- Assistant
I'll check which defineOptions snapshots changed and update the JS ones too.
- Assistant
I'll wire
source_is_tsinto defineOptions emission so JS sources keep Object.assign. - Assistant
I'll switch defineOptions to
source_is_tsand update the body.rs call site. - Assistant
I'll regenerate snapshots and re-run coverage.
- Assistant
I'll do a final diff review and confirm normalize_code still documents required:true.
- Assistant
Checking whether submit includes untracked files — new snapshots may need staging.
- Assistant
I'll intent-to-add the untracked snapshots so they appear in
git difffor submit. - Assistant
Final coverage check, then submit.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.