npm test fails on main because publication subtests share leaked state
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- git, github-actions, node.js, typescript
Hướng nghiên cứu
Start with the failing subtests in scripts/publication.test.ts and inspect how the store, counters, and PR labels are reset between them. Run npm test to reproduce the four failures, then verify cleanup prevents one subtest from affecting the next. The issue also proposes a read-only workflow for pull requests and pushes to main; done means npm test passes and the workflow runs it on both events.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
npm test fails on main, and has since #34. 4 of the 30 tests fail (Node 24.22):
✖ label changes prevent archival and promotion
✖ merge with no archive reports failure and requires manual archival
✖ promotion failure after merge still retains the valid archive remotely
✖ CI archival and promotion with simulated GitHub and Git
The publication code is fine. This is shared state leaking between subtests of CI archival and promotion with simulated GitHub and Git in scripts/publication.test.ts:
- #34 added
incomplete artifacts and untrusted runner SKUs cannot archive. It ends withdownloads === 2and doesn't reset the counters. Before that change, the preceding test ended withclearStore(). label changes prevent archival and promotiondoesn't callclearStore(), soassert.equal(downloads, 0)sees2and throws.- The throw skips the
pr.labels = []on the last line, so the PR keeps thebenchmarks: skiplabel. The next two tests then take the approved-skip path instead of the failure they expect, and fail with "Missing expected rejection".
Bisecting confirms it. 02d7c6f passes 29/29, and bdbca55 (#34) is the first commit that fails.
No workflow runs npm test, so CI didn't catch it. #34 notes "Tests were not run."
Proposed fix:
- Reset the store and counters at the start of the label test, and restore the mutated fixtures in
finallyblocks so one failing subtest can't cascade into later ones. - Add a read-only workflow that runs
npm teston PRs and pushes tomain.
- Ngôn ngữ chính
- TypeScript
- Star
- 2
- Fork
- 1
- Merge trung bình
- 6 giờ 19 phút
- Pull request đã merge (30 ngày)
- 4
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
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của hyperlight-dev/hyperlight-bench
-
Dashboard cannot show runs older than the last 14Có thể đã có người làm @NopeCharon đã nhận 4 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
hyperlight-dev/hyperlight-bench#54 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
add arm64Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 20/100
hyperlight-dev/hyperlight-bench#53 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
add macosĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
hyperlight-dev/hyperlight-bench#52 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
add windowsĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 20/100
hyperlight-dev/hyperlight-bench#51 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Make sure runs don't switch CPUĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 30/100
hyperlight-dev/hyperlight-bench#50 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của hyperlight-dev/hyperlight-bench
Issue tương tự
-
bug
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 62/100
garethgeorge/backrest#1451 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
fix(core): \.pluck() returns values in key insertion order instead of requested argument orderCó thể đã có người làm @ManyaS-Git đã nhận 1 ngày trước. Đang mởstatus:in-linear
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
n8n-io/n8n#45027 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 13 ngày
-
bug
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 68/100
navikt/skjemabygging-formio#2399 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
lidofinance/validator-ejector#233 ·
Maintainer thường phản hồi trong vòng 1 ngày