Malformed justification YAML exits 1 instead of the no-verdict code 2
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 78/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- python
- 领域
- cli, testing-qa
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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
- 主要语言
- Python
- 星标
- 0
- 派生
- 3
- 平均合并
- 18 小时 24 分钟
- 30 天内合并 PR
- 16
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
eclipse-score/coverage_tool 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
eclipse-score/coverage_tool#27 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 35/100
eclipse-score/coverage_tool#43 ·
维护者通常 1 天内回复
-
testing
难度 5/5 一周以上 新手友好度 22/100
eclipse-score/coverage_tool#42 ·
维护者通常 1 天内回复
-
testing
难度 3/5 半天 新手友好度 20/100
eclipse-score/coverage_tool#41 ·
维护者通常 1 天内回复
-
testing
难度 4/5 3-5 天 新手友好度 35/100
eclipse-score/coverage_tool#39 ·
维护者通常 1 天内回复
查看 eclipse-score/coverage_tool 的全部 Issue
相似的 Issue
-
Examples say cnx未关闭documentation embedded
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
Alishahryar1/free-claude-code#2111 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
namespace operations
难度 2/5 1-3 小时 新手友好度 72/100
EclipseFdn/open-vsx.org#14373 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复