Replay line: a printed replay runs no test under a project config (vitest run, no --config)

Đang mở
#108 0 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ó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
58/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

Hướng nghiên cứu

Start with packages/oracles/src/oracle-property.ts and trace how the random unit builds its Replay: line, including rerunOf and the project configuration. Compare the printed command with the working pnpm exec vitest --run --config oracle-gaps/vitest.config.mjs gap-report-oracle command. Done means the printed replay command loads and reruns the failing counterexample; the maintainer still needs to choose how projects supply that command.

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

Mô tả

Summary

A failing oracle unit prints a replay line that does not rerun the unit when the oracle runs under a project config. In the gap report's package, the printed command is vitest run -t '...'. A bare vitest run uses the package's default config, which finds no file, so every test is skipped and the replay passes vacuously (0 tests run). The unit can be rerun only with the project's own command: pnpm exec vitest --run --config oracle-gaps/vitest.config.mjs gap-report-oracle -t '...'.

P4 (register): a printed replay must rerun the counterexample. This one does not.

Where

packages/oracles/src/oracle-property.ts, the Replay: line built in the random unit's failure (${oracleEnvName('SEED')}=... vitest run ${rerunOf(replayed)}). It always says vitest run, with no config, file, or project command.

Evidence

  • #102: random seed: generated, seed 333199054, path 1:1:1:1. The printed Replay line (CI run 43688703700): ORACLE_SEED=333199054 ORACLE_PATH=1:1:1:1 ORACLE_PROPERTY='oracle-gaps.report' ORACLE_UNIT='random seed: generated' vitest run -t '...'. Run as printed, it ran no test. With the project command it reproduces.
  • #107: the same defect with random seed: a declaration fault: brokenOwner.

Proposed fix

The oracle's configuration should accept the project's replay command (the command that loads the oracle file, such as the --config and file names), and the Replay: line should print it. Until then, the line should at least name the file. Decision for the maintainer on the configuration shape.

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.