bug: suggestion 闭合校验只统计全部围栏,未闭合建议块仍被接受
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 75/100
Research direction
Start at .github/scripts/validate_review_json.py lines 107-116, where the suggestion opener is detected and closing is decided by a global body.count("```") < 2. Read test_validate_review_json.py to see how bodies are fed in, then add a case with a closed code block followed by an unclosed suggestion opener. Done means that body is rejected and the existing tests still pass.
Written by the indexing model from the issue text.
Description
问题位置
.github/scripts/validate_review_json.py:115
触发条件
评论正文先包含一个普通已闭合代码块,随后打开 ```suggestion 但忘记闭合;NIT 或 SUGGESTION 正文都可触发。
实际影响
前面的普通代码块已经贡献两个三反引号,body.count("```") 因而通过;发布后 GitHub 会把 suggestion 当作未闭合的普通围栏,用户看不到可应用的修复建议,依赖建议块的审查意见失效。
核实依据
第 107-116 行只检查正文中出现过一次 suggestion opener,再用全局 body.count("```") < 2 判断闭合,没有确认 opener 之后存在独立的闭合围栏。现有 test_validate_review_json.py 未覆盖“先有代码块再有无闭合 suggestion”的组合。
扫描提交:e777f60106e401b086925270af317a4b36722be0;扫描日期:2026-11-23(北京时间);轮巡分片:53/90。
- Dominant language
- Python
- Stars
- 171
- Forks
- 24
- Avg merge
- 3h 13m
- Merged PRs (30d)
- 13
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Terry-Mao/AICodingFlow
-
area:specs area:tests area:workflow bug repro:high triaged
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Terry-Mao/AICodingFlow#378 · 1 comment ·
Maintainers usually reply within 1 day
-
area:tests area:workflow bug repro:high triaged
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Terry-Mao/AICodingFlow#377 · 1 comment ·
Maintainers usually reply within 1 day
-
area:tests area:workflow bug repro:high triaged
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Terry-Mao/AICodingFlow#372 · 1 comment ·
Maintainers usually reply within 1 day
-
area:tests area:workflow bug repro:high triaged
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Terry-Mao/AICodingFlow#371 · 1 comment ·
Maintainers usually reply within 1 day
-
area:tests area:workflow bug repro:high triaged
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Terry-Mao/AICodingFlow#369 · 1 comment ·
Maintainers usually reply within 1 day
All issues in Terry-Mao/AICodingFlow
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 69/100
anderspitman/awesome-tunneling#330 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
521xueweihan/HelloGitHub#4676 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Maintainers usually reply within 18 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
pandas-dev/pandas-stubs#2155 ·
Maintainers usually reply within 1 day
-
essreduce
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
Maintainers usually reply within 1 day