Compiler parity: add the current Script Setup TypeScript differential cases and keep the…
- User
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.
- Assistant
Let me first establish the current baseline by running the coverage tool.
- Assistant
Baseline: 685/685 pass. Now let me put the freshly regenerated snapshot in place and see which cases diverge.
- Assistant
The wholesale regen with my setup diverges from the committed snap — likely a Vue version difference. Let me test which version reproduces the committed snapshot.
- Assistant
Let me check how the passing JS
defineOptionscase is represented vs. what Vue emits in TS mode: - Assistant
Let me check how Vue emits the TS script+script-setup co-usage case (
__default__), which currently passes: - Assistant
Now let me implement the fix. First, check how
$emitis special-cased in expression prefixing, to understand the$attrssituation: - Assistant
Now make the three production edits. First,
compile.rs— register$attrswhen the template references it: - Assistant
Now add the shared helper to
utils.rs: - Assistant
Now update
component_output.rs: - Assistant
Now the
attrs: $attrssetup arg. Let me update the setup args section: - Assistant
Now update the closing logic in
body.rs: - Assistant
All 3 new cases now pass. Let me examine the remaining 14 divergences in detail to see which are tractable fixes vs. genuine known failures:
- Assistant
Found it — a leading
|in the union alias produces an empty member that maps tonull. Fix: - Assistant
Good — union case fixed. Let me examine the hoisting divergence more closely:
- Assistant
Let me look at the cacheHandlers divergence — vize doesn't cache the synthesized empty handler for
@submit.prevent: - Assistant
Only the SFC case uses an expression-less modifier handler. Apply the caching fix:
- Assistant
Now update the known-failure budget in
coverage.rs: - Assistant
Coverage exits 0 with exactly 12 tracked known failures. Now regenerate the vize insta snapshots affected by the compiler changes and run the crate test suites:
- Assistant
Environmental — it needs
nodeon PATH. Re-run the full workspace with node available: - Assistant
Also environmental (
pklbinary missing). Clean up the stray.snap.newfiles insta wrote: - Assistant
Final verification of the complete change set:
- Assistant
Everything is verified. Let me do one final end-to-end confirmation:
- Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.