Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Malformed justification YAML exits 1 instead of the no-verdict code 2

Đang mở
#16 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ó
3/5
Thời gian dự kiến
1-2 ngày
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ệ
python
Lĩnh vực
cli, testing-qa

Hướng nghiên cứu

Start in score_coverage/justify.py at load_yaml(), then trace exception handling through _call_tool() and main() in score_coverage/generate_coverage_html.py. Reproduce the CLI with a valid report archive and YAML containing version: [. Done means the malformed YAML produces a useful diagnostic, exits 2, and has CLI regression coverage.

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

Mô tả

bug

Found while reviewing the architecture documentation. Verified against upstream HEAD d99515b87bbe1dde89984403e9c330d640fc5d33 using synthetic report archives and the real generate_coverage_html CLI (no gate/justification mocks).

A YAML syntax error escapes the error handling in generate_coverage_html. Python terminates with exit 1 and a traceback, which is reserved for a successfully evaluated coverage result below the threshold.

Reproduction

Use an otherwise valid report zip and pass --yaml pointing to a file containing:

version: [

Invoke generate_coverage_html in a consumer workspace. The real CLI exits 1 with a PyYAML parser exception, rather than 2 with a controlled diagnostic. The report was successfully extracted before the failure.

Cause and expected behavior

justify.load_yaml() calls yaml.safe_load() before structural validation. _call_tool() translates only nonzero SystemExit; main() catches only GenerateError. The parser exception therefore escapes both boundaries.

Translate YAML parse errors into the no-verdict path, preserving a useful file/location diagnostic. Add CLI regression coverage asserting exit 2. Related input/output exceptions should be audited against the same contract, but only the YAML syntax case was reproduced here.

This violates tool_req__coverage_gate_exit_codes and tool_req__coverage_gate_no_verdict.

Relevant code
Ngôn ngữ chính
Python
Star
0
Fork
3
Merge trung bình
18 giờ 24 phút
Pull request đã merge (30 ngày)
16

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 eclipse-score/coverage_tool

Tất cả issue của eclipse-score/coverage_tool

Issue tương tự

Thêm issue về Python

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.