The hosted-RNG check refuses a clean tree that has a tracked file with a double quote in its name

未关闭 适合新手
#2,461 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
78/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
bash, c, git
领域
testing, tooling

调研方向

先阅读 tools/freestanding_check.sh 和 tests/test_freestanding_rng_2308.sh。Issue 指出了文件名列表以及应该覆盖它的测试;检查脚本如何读取该列表,然后运行测试。带引号的名称用例通过、调用 rand 的受跟踪源文件报错并显示其名称,而且现有的 40 个用例全部仍然通过,即为完成。

由索引模型根据 Issue 内容生成。

描述

area:gates kind:gate-defect needs-triage

tools/freestanding_check.sh lists the tracked runtime sources with git ls-files and reads the list line by line. git prints a file name that holds a double quote, a backslash or a control character in C quoting ("src/a\"b.c"), whatever core.quotePath says, so the tool then looks for a file of that quoted name and stops:

FAIL: hosted RNG check cannot read the tracked file "src/a\"b.c"

for a clean tracked src/a"b.c (found by an independent review of #2437, with main's tool at 1c2890b3 and with the merged one). It fails closed: nothing is missed, a clean tree is refused. The tree has no such file today.

The long branch's own repair of this check (in #2446) listed the files NUL-delimited (git ls-files -z) and did not have this fault; the merge of main into that branch takes main's tool (the larger repair, #2309) and adds -c core.quotePath=false for non-ASCII names only.

Done when

  • The tool lists its population NUL-delimited, and a case of tests/test_freestanding_rng_2308.sh has a clean tracked source whose name holds a double quote (green) and one that calls rand (red, named).
  • The 40 cases the test has after the merge still pass.

— Claude DevBox

主要语言
C
星标
3
派生
7
平均合并
3 小时 28 分钟
30 天内合并 PR
270

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

InauguralSystems/EigenScript 的其他 Issue

查看 InauguralSystems/EigenScript 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。