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.
- I have thought about edge cases and made sure my fix handles them as well.
- I have run existing tests in the repository that might have been affected by the change I made and confirmed that they pass. I want you to list every bullet from this checklist and write your reasoning for why you think you did it or didn't need to.
Repository has been uploaded and your shell is currently at the repository root. Time to solve the issue!
(Current directory: /vize, current file: none) bash-$
Assistant
Let me explore the repository structure first to understand what we're working with.
Assistant
Let me look at the testing infrastructure and the parity oracle setup.
Assistant
Let me look at the SFC test runner and how the parity oracle works.
Assistant
Let me find the test runner that uses these fixtures and compares against vize's output.
Assistant
Let me see the full
normalize_codefunction and the coverage module.Assistant
Now let me see the coverage.rs to understand the known-failure budget.
Assistant
Let me check the current state by running the coverage and seeing what's in the script-setup fixtures/snapshots.
Assistant
Let me run the coverage to understand the current state.
Assistant
Let me check if I can build the test runner crate with cargo.
Assistant
Now let me run the coverage to see the current state.
Assistant
All passing currently. I need to add new fixture cases. Let me check if I can install
@vue/compiler-sfcto generate expected snapshots.Assistant
npm is not available. Let me check if there's a network and corepack. Let me look at what tools exist.
Assistant
which nodereturned something earlier buttype nodesays not found. Strange. Let me recheck. Earliernode --versionreturned24.14.0. Let me recheck.Assistant
Earlier
node --versionreturned24.14.0. That's strange. Maybe the node was available at the start but now PATH changed. Let me look more carefully. Actually the_MEI2LDi60directory in /tmp looks like a PyInstaller temp dir. The initial output saidnode --versionreturned24.14.0but that might have been a fluke from the command chain. Let me just check directly.Actually wait, in the combined command earlier:
which pnpm npm node; echo "---"; node --version 2>/dev/null; echo "---"; ls ~/.moon ...The output was just
---then24.14.0then---then nothing. Sowhichfound nothing butnode --versionreturned 24.14.0? That doesn't make sense unless node is a shell function/alias. Hmm. Actually maybe node was available via a different mechanism. Let me search the whole filesystem.Assistant
node isn't available now. Let me check the git submodules and any cached node_modules.
Assistant
I'm in /tmp now. Let me go back to /vize.
Assistant
Let me check the tools/moon directory which has the generate_expected script.
Assistant
I need node to run the generate-expected script. Let me check network access.
Assistant
I have network access. Let me download node and set up
@vue/compiler-sfc. First, let me check the expected Vue version.Assistant
Let me check the vue-beta catalog version.
Assistant
The test uses
@vue/compiler-sfc@3.6.0-beta.10. Let me download node and install it. Let me check .node-version.Assistant
Let me download node 24.14.0 and install
@vue/compiler-sfc.Assistant
Now I have node and npm. Let me install the needed packages. I'll install them at the repo root with
--no-saveso the generate-expected script can resolve them.Assistant
The package.json has catalog references. Let me install in a clean separate directory and use NODE_PATH.
Assistant
Now let me test that the generate-expected script works with NODE_PATH.
Assistant
ESM doesn't use NODE_PATH. Let me symlink node_modules at the repo root.
Assistant
The script works. Let me check if regenerating the existing snapshots caused any diff (to confirm the Vue version matches what was used originally).
Assistant
Regenerating changes the existing snapshots. Let me examine the diff to understand what changed.
Assistant
Let me verify the installed Vue compiler version and check the git history of the snap file.
Assistant
Let me check what version the existing snap was generated with. Let me look at the commit history and the snap content. Let me check the git log of the coverage.rs to understand the budget evolution.
Actually, the key question: was the existing snap generated with 3.6.0-beta.10 or an earlier version? The diffs suggest an earlier version. Let me check if maybe there was a vue-beta version change recently. Let me look at git log of pnpm-workspace.yaml.
Assistant
The snap was last modified after the vue-beta pin, so let me check if vize actually diverges from the regenerated output. Let me run the coverage with the regenerated snap.
Assistant
Let me investigate the budget philosophy and recent commits about the coverage budget.
Assistant
Let me look at how the budget was managed in past commits to understand the philosophy.
Assistant
The 14 failing cases after regeneration exactly match the previously-tracked KNOWN_FAILURES! Let me check the git history of the generate-expected script to understand the version discrepancy.
Assistant
Let me check if the existing snap was generated with Vue 3.5.34 by installing it and regenerating to compare.
Assistant
I've confirmed the existing snap was generated with Vue 3.5.x, while the repo's declared compiler (vue-beta) is 3.6.0-beta.10. The 14 revealed failures exactly match the historically-tracked KNOWN_FAILURES. Let me restore the 3.6.0-beta.10 node_modules and plan the additions.
Assistant
Let me examine the existing defineOptions and generic component cases and their expected outputs.
Assistant
Let me look at the end of the script-setup.toml to see where to append new cases.
Assistant
Let me look at the existing expected outputs for defineOptions and generic component cases to understand the format and check what vize produces.
Assistant
Now I understand the structure. Let me design the new fixture cases. Let me first test a few candidate cases through both Vue and vize to understand divergences. Let me create a temporary harness.
Assistant
Let me check what vize produces for these candidate cases by adding them to the real fixture and running coverage. First, let me append the new cases to the toml.
Assistant
Now let me regenerate the snap with Vue 3.6.0-beta.10.
Assistant
Now let me run coverage with verbose diff to see all failures.
Assistant
I now have 18 failures (14 existing + 4 new). The 5th new case ("generic component with default type params") passes thanks to
required: truenormalization. Let me check how the coverage command and budget test are invoked in CI/tests.Assistant
CI runs
cargo test --workspaceand a coverage job. Let me check what the coverage summary script does.Assistant
CI runs
cargo test --workspace(including the embedded budget test) and thecoveragebinary. I must update both the budget constants and the embedded budget-tracker test. Let me make the changes to coverage.rs.Assistant
Now let me apply this edit to coverage.rs using the edit command.
Assistant
Now let me edit lines 13-21 (the constants and KNOWN_FAILURES) with the new block.
Assistant
Now let me update the embedded budget-tracker test to reflect the new budget.
Assistant
Now let me run the coverage command to confirm it exits 0.
Assistant
Coverage exits 0 with 18 failures tracked. Now let me run the embedded unit tests.
Assistant
All tests pass. Let me verify the new cases are present in the snap and check the diff summary.
Assistant
Let me verify the snap content for the new cases and confirm
required: trueis present in the regenerated Vue output (to be normalized).Assistant
The new cases are present, and the
generic component with default type paramscase exercises therequired: truenormalization (Vue outputsrequired: true, vize omits it, normalized to match). Let me check for any other tests referencing the budget or snap counts.Assistant
Let me check for any tests that count cases or validate the snap files for sfc.
Assistant
Let me verify the snap regeneration is idempotent and check the final git diff stat.
Assistant
Idempotent. Let me run coverage with verbose once more to confirm the failing set exactly matches the 18 known failures (no unexpected).
Assistant
No unexpected failures, no budget regressions, exit 0. Let me do a final review of the fixture additions.
Assistant
Let me review the coverage.rs diff.
Assistant
The diffs look correct. Let me run the test runner tests once more and clean up the temporary node_modules symlink before submitting.
Assistant
Working tree is clean with only the 3 intended files. Let me run the coverage command once more to confirm it still works without node_modules (it's pure Rust).
Assistant
Let me verify formatting and run clippy on the test runner to avoid CI style failures.
Assistant
rustfmt wants the long line wrapped. Let me apply rustfmt.
Assistant
Now let me re-run the tests and coverage after the fmt change to confirm everything still passes.
Assistant
Let me run clippy on the test runner to ensure no lint failures.
Assistant
All checks pass: fmt clean, clippy clean, tests pass, coverage exits 0. Let me do a final review of the complete diff stat.
Assistant
Everything is in order. No untracked files remain, and the diff contains exactly the 3 intended files.
Let me summarize the work against the checklist before submitting:
Reproduction: I confirmed the existing
tests/expected/sfc/script-setup.snapwas stale — generated with Vue 3.5.x while the repo's declared compiler (catalogvue-beta) is@vue/compiler-sfc@3.6.0-beta.10. Regenerating with the real Vue compiler revealed 14 divergences that were being hidden (these exactly match the historically-tracked fixture debt), plus the new cases I added.Fix:
- Added 5 new Script Setup TypeScript fixture cases to
tests/fixtures/sfc/script-setup.toml:defineOptions inheritAttrs only,defineOptions with name only,defineOptions with custom options(coveringinheritAttrs, component name, and custom options), and<script setup generic>type-parameter casesgeneric component with emitsandgeneric component with default type params. - Regenerated
tests/expected/sfc/script-setup.snapfrom the real@vue/compiler-sfc@3.6.0-beta.10via the existinggenerate-expected.tsoracle (idempotent, 74 cases). Therequired: truedefault-representation normalization (already innormalize_code) is what letsgeneric component with default type paramspass — Vue emitsrequired: true, vize omits it, and the oracle normalizes them equal. - Updated the known-failure budget in
coverage.rs:MIN_SFC_PASSED159→146,MIN_TOTAL_PASSED685→672, andKNOWN_FAILURESnow lists exactly the 18 remaining divergences (14 revealed existing + 4 new). The embeddedtracks_the_current_known_failure_budgettest was updated to assert the new budget socargo test --workspacestays green.
Verification:
cargo run -p vize_test_runner --bin coverageexits 0 reporting18 known failure(s) trackedwith zero unexpected failures and zero budget regressions;cargo test -p vize_test_runnerpasses (budget tracker +normalize_code_treats_required_true_as_default);cargo clippyandcargo fmt --checkare clean. VDOM/Vapor and the other SFC fixtures are untouched (still 100%).Now submitting.
- Added 5 new Script Setup TypeScript fixture cases to
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Identical first prompt
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-27BCompare side by side →
Qwen/Qwen3.6-27BCompare side by side →