bug: PR_DIFF 路径解析不能正确处理 Git 转义和含空格的元数据路径
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 73/100
Línea de trabajo
Read .github/scripts/build_pr_diff.py, especially clean_path around line 143 and diff_git_new_path around line 159, then inspect test_build_pr_diff.py and test_prepare_local_review_inputs.py. Start by reproducing the issue with a non-ASCII path and a metadata-only path containing spaces; done means both tests cover the cases and generated FILE paths match the real paths.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
问题位置
.github/scripts/build_pr_diff.py:143
触发条件
变更文件路径包含非 ASCII 字符(默认 core.quotePath 下 git diff 输出 C 风格引号和八进制转义),或二进制、纯重命名、仅权限变更等元数据 diff 的文件名含空格。
实际影响
生成的 FILE 行会保留引号转义或被空格截断,review 无法按真实路径读取或评论文件,review.json 的 path 也会指向不存在的路径。
核实依据
prepare_local_review_inputs.write_local_diff 第 292 行直接调用 build_pr_diff.convert 处理 git diff;clean_path 第 143-148 行只去掉 a/、b/ 前缀,没有反转义 Git 的 C-quoted 路径;diff_git_new_path 第 159-163 行用 split(" ", 3) 提取 metadata-only 路径,遇到文件名空格会把 FILE 截成中间片段。现有 test_build_pr_diff.py 与 test_prepare_local_review_inputs.py 都只使用 ASCII、无空格路径。
扫描提交:e777f60106e401b086925270af317a4b36722be0;扫描日期:2026-11-19(北京时间);轮巡分片:49/90。
- Lenguaje dominante
- Python
- Estrellas
- 171
- Forks
- 24
- Merge medio
- 3 h 13 min
- PR fusionados (30 d)
- 13
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Terry-Mao/AICodingFlow
-
area:specs area:tests area:workflow bug repro:high triaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Terry-Mao/AICodingFlow#378 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug: 否定或疑问的维护者回复会被误判为 dismissAbiertoarea:tests area:workflow bug repro:high triaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Terry-Mao/AICodingFlow#377 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
area:tests area:workflow bug repro:high triaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Terry-Mao/AICodingFlow#372 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
area:tests area:workflow bug repro:high triaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Terry-Mao/AICodingFlow#371 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
area:tests area:workflow bug repro:high triaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Terry-Mao/AICodingFlow#369 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de Terry-Mao/AICodingFlow
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 69/100
anderspitman/awesome-tunneling#330 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
521xueweihan/HelloGitHub#4676 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
Los mantenedores suelen responder en 18 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
pandas-dev/pandas-stubs#2155 ·
Los mantenedores suelen responder en 1 día
-
essreduce
Dificultad 2/5 1-3 horas Aptitud para principiantes 69/100
Los mantenedores suelen responder en 1 día