openai / openai/codex-plugin-cc
`review --base <nonexistent-sha>` exits 0 and reviews a far wider diff
还没有人认领这个 Issue。
- 主要语言
- JavaScript
- 星标
- 33.3k
- 派生
- 2.3k
- PR 合并指标
- 30 天内没有已合并 PR
描述
Passing a base that does not exist in the repository does not fail the run. The companion proceeds, silently falls back to a much wider diff than the caller asked for, and exits 0 — so a CI step or a wrapper script reads it as a clean, scoped review.
Why it is expensive rather than merely wrong: the failure mode is a review that looks successful. In our use the base is a wave-start SHA passed by a script; a typo produced a run that swept months of history, returned findings about code nobody had touched in the change under review, and reported success. Nothing in the output said the base had not resolved.
Expected: exit non-zero with "base not found in this repository", before any model call.
Workaround we adopted: validate before every launch — git cat-file -e "<sha>^{commit}" || exit 1.
Environment: codex-plugin-cc companion via the app server; observed 2026-08-09.
Related but distinct: #611 §1 covers a run exiting 0 with no verdict on a valid base.
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 companion app server 对 review --base 的处理开始,然后跟踪在 diff 和模型调用路径运行之前,所提供的 SHA 是如何解析的。使用一个不存在的 base 进行复现,并验证它会以非零状态退出,同时显示 "base not found in this repository",且不会进行模型调用。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript
- 领域
- cli
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 冷清
- 描述清晰度
- 描述清楚
- 新手友好度
- 68/100