openai / openai/codex-plugin-cc

`review --base <nonexistent-sha>` exits 0 and reviews a far wider diff

Open
#653 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
33.3k
Forks
2.3k
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the companion app server's handling of review --base, then trace how the supplied SHA is resolved before the diff and model-call paths run. Reproduce with a nonexistent base and verify that it exits non-zero with "base not found in this repository", without making a model call.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.