Define merge semantics for `results.errors`

Đang mở
#93 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
25/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
tooling

Hướng nghiên cứu

Start with the spec text that #88 adds for results.errors, then read src/merge.ts in ctrf-cli and in ctrf-js to see how the first shard's fields are kept. The issue first asks for a spec rule (concatenate every input's errors, in input order, with no de-duplication), which needs maintainer agreement before any code. Done means the spec wording is agreed and both merge functions keep every shard's errors, with tests for multi-shard input.

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

Mô tả

Follow-up to #65, from this comment. Builds on #88, which adds results.errors: [{message, trace, extra}].

Problem

Sharded runs are routinely merged into one CTRF document. Merging is where run-level errors get lost. #88 says nothing about merging. Current CTRF tooling would silently drop errors from every shard but the first:

  • ctrf merge in ctrf-cli keeps extra and environment from the first shard only.
  • ctrf-js merge() keeps the first value for each key and rebuilds the result without any results.errors handling.

So aAshard that failed in global teardown would produce a merged report with no error and, if all its tests passed, a green verdict.

Precedent

Tools that merge run-level errors concatenate them:

De-duplication is also risky: the same message from two shards (for example, "Database cleanup failed") might mean two separate failures.

Proposal

Add to the spec:

When merging CTRF documents (for example, shards of one run), results.errors SHOULD be the concatenation of every input document's results.errors, in input order, without de-duplication. A merging tool MAY record the source document or shard in each entry's extra.

Then update ctrf merge and ctrf-js merge() to follow it.

Related

If an optional run outcome is added (separate issue), its merge rule should follow Playwright's worst-first ordering.

Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
103
Fork
4
Merge trung bình
1 giờ 3 phút
Pull request đã merge (30 ngày)
2

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 ctrf-io/ctrf

Tất cả issue của ctrf-io/ctrf

Issue tương tự

Thêm issue về DevTools

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.