Import `project_doc_fallback_filenames` from the reviewed checkout

未关闭
#61 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
github-actions, typescript
领域
ci-cd

调研方向

Start with the setup step that handles $GITHUB_WORKSPACE/.codex/config.toml and $CODEX_HOME/config.toml, and see how codex-config is currently merged. Add a narrow import that copies only project_doc_fallback_filenames, validated as an array of filenames, and skips it when the key is already defined, including an explicit []. Done means fresh, resumed, and forked sessions read the fallback, and a checkout that defines mcp_servers still starts none of its servers. This touches the trust boundary, so get maintainer review before merging.

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

描述

Codex 0.169.0 treats the reviewed checkout as untrusted, so it skips the checkout's .codex/config.toml. That is the right default for mcp_servers, hooks, and other executable settings, but it also drops project_doc_fallback_filenames, which is just data. A repository that keeps its instructions in CLAUDE.md and selects it through that fallback now gets no project docs during review.

Reproduced on 0.169.0 in an untrusted directory whose .codex/config.toml sets project_doc_fallback_filenames = ["CLAUDE.md"]:

  • codex exec --dangerously-bypass-approvals-and-sandbox ... prints warning: Untrusted project-local configuration is disabled and does not read the fallback.
  • codex exec -c 'project_doc_fallback_filenames=["CLAUDE.md"]' ... does read it, while the checkout's MCP command and Stop hook stay disabled.

Proposed fix: during setup, parse $GITHUB_WORKSPACE/.codex/config.toml, accept only an array of valid filenames, and prepend that key to $CODEX_HOME/config.toml when codex-config does not already define it (an explicit [] counts as defined). Import only this key. Keep mcp_servers, hooks, model settings, and every other executable setting disabled.

Acceptance: fresh, resumed, and forked sessions all see the fallback; a checkout that defines an MCP server still does not start it.

主要语言
TypeScript
星标
0
派生
0
平均合并
1 小时 39 分钟
30 天内合并 PR
84

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

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

promplate/code-review 的其他 Issue

查看 promplate/code-review 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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