Gap CLI: a partial or daemon run can draw other drawn bases than a cold run without --seed

Đang mở
#155 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ó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/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, node.js
Lĩnh vực
testing

Hướng nghiên cứu

Start with src/oracle-config.ts and oracle-gaps/capture-setup.mjs, then find the gap CLI paths for cold, partial, and daemon checks. First reproduce the mismatch with a property whose history has drawnBases and no --seed; the issue says the repository’s current gap e2e and self-oracles do not provide a suitable witness. Done means a gap report establishes whether the drawn bases differ and, if they do, the CLI produces order independent bases.

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

Mô tả

In the gap CLI, a property's drawn bases (#122, histories.drawnBases) can differ between a cold whole-file run and a partial or daemon run, when the CLI runs with no --seed. Found by reading (review of #122, round 2, G6). It is not reproduced yet.

  • Where R comes from: a fixed-seed constructed unit draws its drawn bases from R + k. R is the run's random seed: the first unit that uses it draws it from Math.random, through oracleCampaignSeed (src/oracle-config.ts).
  • The capture: it seeds Math.random per test, by the test's key (oracle-gaps/capture-setup.mjs, installRandom). So R is a function of which test is the first to call runSeed in that process.
  • The failure: in a cold whole-file run, that is the property's first drawing fixed-seed unit. If a partial run, a daemon check, or a batch copy runs a set of tests whose first drawing unit is a different one, it draws another R. A later unit's drawn bases then differ from the baseline's. Then:
    • unchanged code can read as changed (a false kill, or not-judged);
    • a verdict on a drawn base can be credited on the fixed seed route (a reproducible route, P3, G2, I8) when a cold run doesn't repeat it.
  • Not affected: with --seed, ${envPrefix}_SEED fixes R in every run, and the drawn bases are the same.
  • In this repository today: the gap e2e oracle and the self-oracle draw bases (1 each, and the e2e oracle draws none on win32). No oracle that the gap CLI judges in CI draws bases.

Ask, oracle-first:

  1. A gap-report witness: a property with drawnBases, judged cold and through the daemon (or partially) with no --seed. It should show whether the classes match.
  2. If they differ, a fix that makes R independent of test order inside the CLI. For example, the CLI could always set ${envPrefix}_SEED for a check, choosing and printing one when --seed is absent. Or it could seed oracleCampaignSeed's draw from the property id rather than from the first test's key.

This issue was written by Isaac.

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

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.