oracle-gaps: mutant copies resolve bare imports from --package, not from the original file (288 setup-errors)

Đang mở
#68 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
40/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript
Lĩnh vực
testing-qa, tooling

Hướng nghiên cứu

Start at check.mjs near line 1007, where mutant copies are said to resolve imports like the original file, and at the wrapper plugin's resolveId and load hooks that serve those copies. Reproduce by running oracle-gaps against the tests/realtime-oracles oracle file, which should fail with 'Cannot find package fast-check'. Done means copies resolve bare imports from the original file's directory or baseline refuses early, and setup errors are excluded from the gap count and get their own directive.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Reported from an adopter's first session, at c58b0c2. Not yet reproduced here.

Problem. 288 of 388 mutants were setup-error: "Cannot find package 'fast-check' imported from tests/realtime-oracles/src/.oracle-gaps-5482-10-ordered-live-results.oracle.test.ts". The baseline loads the same import from tests/realtime-oracles/node_modules/fast-check. The comment at check.mjs:1007 says copies are placed beside the file "so that its imports resolve as the file's do". But the copy is virtual: the wrapper plugin serves it through resolveId and load. So its bare imports seem to resolve from --package, the repo root, which has no fast-check.

Two more problems follow from that:

  • setup errors count toward the headline gap count, which came out as 307 gaps;
  • they get the directive "Run an owner test that loads this module", which doesn't apply.

Proposal.

  • Resolve a copy's imports from the original file's directory. Alternatively, refuse at baseline when the oracle file's imports don't resolve from --package.
  • Either way, keep setup errors out of the gap count. A harness failure stops the run and is never charged to a mutant (decision LA-v20-1, cleanup plan Phase 2 A2). Give them their own directive.

This issue was written by Isaac.

Ngôn ngữ chính
JavaScript
Star
5
Fork
1
Merge trung bình
8 giờ 31 phút
Pull request đã merge (30 ngày)
60

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của TanStack/oracles

Tất cả issue của TanStack/oracles

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.