Skip to content
TheChatArchiveThe Chat Archive
fable-5· unknownHugging Face ibragim-bad/swe_rebench_07_2026_trajectories

Compiler parity: add the current Script Setup TypeScript differential cases and keep the…

  1. 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 defineOptions options such as inheritAttrs, component name/custom options, and <script setup generic> type parameters.

    Normalization must treat required: true as 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 defineOptions cases and script-setup generic type parameters. Normalize required: true as 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.

  2. Assistant

    Let me check whether the insta snapshot set matches the fixture cases, and whether the insta tests currently pass.

  3. Assistant

    Network is available but Node isn't installed. I'll install Node locally to run the Vue-compiler generator:

  4. Assistant

    The freshly generated output differs from the checked-in snap (hoisting/cache differences) — likely a Vue version mismatch. Let me check the lockfile:

  5. Assistant

    Now I'll add the new differential cases. First the defineOptions variants:

  6. Assistant

    Now a generic type-parameter case that exercises <script setup generic> beyond props:

  7. Assistant

    Now find where Vize emits the Object.assign merge for defineOptions:

  8. Assistant

    Let me check what upstream Vue emits for the original plain-JS defineOptions case in the regenerated snap:

  9. Assistant

    Now fix the TS-mode defineOptions output to match upstream (_defineComponent({ ...options, ... })). First check what other code/tests rely on the current pattern:

  10. Assistant

    Now update the coverage budget in coverage.rs:

  11. Assistant

    Normalization is exercised by many now-passing cases. Now check which crates depend on vize_atelier_sfc and run their tests:

  12. Assistant

    All green. Clean up the temporary symlink and review the final state:

  13. Assistant

    Final verification pass:

  14. Assistant

    All done. Summary of the changes:

    What was done

    1. New differential cases (tests/fixtures/sfc/script-setup.toml) — 4 Script Setup TypeScript cases added to the parity corpus:

    • defineOptions with inheritAttrs only
    • defineOptions with component name only
    • defineOptions with custom options (name + inheritAttrs + arbitrary custom option)
    • generic component with type parameter in emits (<script setup lang="ts" generic="T"> with T flowing into defineEmits)

    2. Compiler parity fix (crates/vize_atelier_sfc/src/compile_script/inline/compiler/component_output.rs:43) — in TypeScript mode, defineOptions output now matches upstream @vue/compiler-sfc: the options object is spread inside _defineComponent({ ...opts, __name, setup }). Previously Vize emitted the JS-mode Object.assign(opts, {...}) shape (upstream only uses Object.assign when it can't rely on spread, i.e. non-TS). JS and Vapor paths are unchanged. This makes all three new defineOptions cases (and the generic-emits case) match real Vue output.

    3. Expected snapshots regenerated from the real Vue compiler (tests/expected/sfc/script-setup.snap) — regenerated via the repo's own tests/tooling/support/generate-expected.ts against the repo-pinned @vue/compiler-sfc@3.6.0-beta.10 (catalog vue-beta), producing authentic upstream output for all 73 cases. The regenerated corpus now contains required: true in 17 cases' type-based runtime props; the oracle's existing normalize_default_required_true treats it as the default representation, and its unit test passes.

    4. Known-failure budget made accurate (tests/vize_test_runner/src/coverage.rs) — regeneration surfaced 14 real divergences (mostly Vue hoisting constant prop objects like const _hoisted_1 = { key: 0 } to module scope where Vize inlines them, plus cache-handler/patch-flag and union-type-resolution gaps). These are now tracked as exact (path, name) entries in KNOWN_FAILURES instead of being hidden; MIN_SFC_PASSED 159→149, MIN_TOTAL_PASSED 685→675; the tracks_the_current_known_failure_budget test asserts the count of 14 and membership (e.g. generic component with extends is now known-failing, the new cases are not).

    5. Insta snapshots — 4 new tests/snapshots/sfc/ts/script_setup__*.snap files added and script_setup__defineoptions.snap updated for the new TS output shape.

    Verification

    • cargo run -p vize_test_runner --bin coverage exits 0: 675/689 total, sfc/script-setup 59/73, "14 known failure(s) tracked", no unexpected failures or budget regressions
    • cargo test -p vize_atelier_sfc (405 tests), -p vize_test_runner, and all dependent crates (vize_canon, vize_croquis, vize_maestro, vize_patina, vize_glyph, vize_musea, vize_vitrine, vize) pass
    • clippy clean on changed crates; git diff --check clean; changes left uncommitted

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.