run --each reads every test as failed alone on Node 26: the test command's output is no longer TAP

Đang mở Phù hợp với người mới
#142 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

@Roshan931 đang làm issue này rồi.

Từ ngày 11/11/2026.

  • #180 của @Roshan931 — đang mở

Đá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
78/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
node.js, typescript
Lĩnh vực
testing

Hướng nghiên cứu

Bắt đầu với lệnh test trong coherence.config.json và so sánh đầu ra của lệnh với mẫu testMatch; src/enforcement/totality.ts cho thấy đầu ra được chấm như thế nào. Chạy lệnh kiểm thử được nêu trên Node 26.8.1, sau đó xác nhận rằng lệnh in ra phần tóm tắt TAP mà mẫu mong đợi. Công việc hoàn tất khi coherence run --each nhận diện các kiểm thử thành công là thành công; issue cũng đề xuất ghi lại việc cố định phiên bản reporter trong docs/config.md cho những người áp dụng.

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

Mô tả

What happens

On Node 26.8.1, coherence run --each in this repository reports every totality oracle as passed batched but fail alone, for tests that pass. The alone confirmation can never go green locally, so steps 1 and 5 of the "witness a refutation" practice cannot be met on that Node. CI runs Node 22.18 and is not affected.

The test command in coherence.config.json sets no reporter, and testMatch is # pass [1-9][0-9]*, which is the TAP summary. With stdout piped, Node 22.18 prints TAP and Node 26.8.1 prints the spec reporter:

$ node --test --test-name-pattern='hooks Coherence 0.x wrote through its launcher' src/lifecycle/install.test.ts | grep -E '^(# |ℹ )(pass|fail)'
v22.18.0:  # pass 1   # fail 0
v26.8.1:   ℹ pass 1   ℹ fail 0     (exit 0)

runTotalityOracle (src/enforcement/totality.ts L99) then grades the run as fail: "exited 0 but its output did not match /# pass [1-9][0-9]*/; no test ran under that name". The batched run and refute are not affected, because they go through testJson and its own reporter.

Fix

Add --test-reporter=tap to the test command. On Node 26.8.1 the same command then prints # pass 1. An adopter whose test command runs node --test with a TAP testMatch meets the same thing, so docs/config.md could say to pin the reporter.

Ngôn ngữ chính
TypeScript
Star
21
Fork
6
Merge trung bình
8 giờ 31 phút
Pull request đã merge (30 ngày)
55

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

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 PostHog/coherence

Tất cả issue của PostHog/coherence

Issue tương tự

Thêm issue về TypeScript

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.