bug: branch_name 去空白后通过校验,但下游仍用原始值创建 PR
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
The validator .github/scripts/validate_implementation_output.py strips branch_name only for the target_branch comparison (lines 38-47) and returns raw metadata at line 58. Read it alongside .github/scripts/commit_implementation_branch.py:192 (which strips) and .github/scripts/finalize_implementation_pr.py:79 (which does not), then normalize once so all three agree. Add a whitespace-padded branch_name case to test_validate_implementation_output.py; done means the returned metadata carries the stripped name and the new test passes.
Written by the indexing model from the issue text.
Description
问题位置
.github/scripts/validate_implementation_output.py:38
触发条件
实现代理在 standalone 实现分支模式下,把 pr-metadata.json 的 branch_name 写成带前导或尾随空白的字符串,例如 " spec/implement-issue-18 "。
实际影响
校验器先 strip 再与 target_branch 比较,因此放行;commit_implementation_branch.py 也会 strip 后成功推送分支,但 finalize_implementation_pr.py 使用未清理的 branch_name 查询或创建 PR,找不到已推送分支,最终无法生成或更新 implementation PR。
核实依据
validate_implementation_output.py 第 38-47 行只把 strip 后的值用于比较,第 58 行返回原始 metadata,main 没有回写;commit_implementation_branch.py 第 192 行对 branch 做 strip,而 finalize_implementation_pr.py 第 79 行直接使用 metadata 中的 branch_name 调用 open_pr_for_branch 或 create_pr。现有 test_validate_implementation_output.py 只覆盖无空白 branch_name。
扫描提交:e777f60106e401b086925270af317a4b36722be0;扫描日期:2026-11-24(北京时间);轮巡分片:54/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 75/100
Terry-Mao/AICodingFlow#368 · 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