Idle: a test that waits on the runner's RPC (a dynamic import, vi.importActual) past 500 ms is killed by no progress

Đang mở
#148 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
Lĩnh vực
devtools, testing

Hướng nghiên cứu

Read packages/oracles/oracle-gaps/capture-setup.mjs, focusing on the testsIo and testsTimerDue sampler, then trace how worker RPC calls are started from a test frame. Build the proposed witness history with the driver holding a module fetch reply past the idle window by a count rather than elapsed time. Done means the pending test-started RPC prevents the no progress kill, with the e2e oracle recording the case in its Limits.

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

Mô tả

What happens

Under #99 (deterministic cuts), a mutant copy is idle when no timer that the test started is due inside its horizon and no I/O handle or request that the test started is open (v21.2 R51; M entries "Idle is decided by state only" and "Idle counts only the test's I/O"). Idle for 500 ms (IDLE_MS) is a kill by the built-in law no progress (M-24).

A test can wait on a reply over the runner's own channel. Examples: a dynamic import(), vi.importActual, or a mocked module's importOriginal. Each one fetches and transforms a module over Vitest's worker RPC. While the test waits, no test-owned timer or I/O is pending: the request goes out on the runner's channel, which is the runner's resource, and the pending reply is a promise, which the async_hooks hook does not record.

So a copy whose reply takes more than 500 ms is killed by no progress. On a loaded CLI main thread (16 contexts that transform instrumented copies), a reply can take that long. The kill then depends on load, against I15.

The law

M "Idle counts only the test's I/O": "a copy is idle when its test can't make progress without a timer firing". A test that waits for a reply that will come is not idle under that rule.

Where

  • packages/oracles/oracle-gaps/capture-setup.mjs: the sampler (testsIo, testsTimerDue).
  • The e2e oracle records the case in its Limits; no history reaches it.

What would close it

  • Count a pending runner RPC that the test's code started as the test's own pending work. One way: count the worker RPC calls in flight that a test frame started.
  • A witness: a constructed history whose test awaits a module fetch that the driver holds past the idle window by a count, not by time.

Found in the merge-gate review of #99 (M3). Recorded in #99's Limits with this issue as its owner.

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.