ci(codex-review): log the model + CLI version each review actually used#124
Merged
Conversation
The reusable installs `@openai/codex@latest` on every run, so the default model floats silently — an upstream swap would change review behavior with no signal in the audit trail. Capture the CLI version (always, the reliable drift signal) and the model from Codex's startup banner (best-effort, pipefail-safe with an "(unreported)" fallback), and surface both in the job summary and as a footer on the posted PR review comment. No behavior change to the review itself; new code runs only on the existing should_run happy path and cannot trip pipefail (grep/sed guarded with `|| true`). Verified: actionlint clean; codex review --uncommitted clean over two consecutive rounds. Auto-Merge-Risk: standard Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Coverage Floor — mode:
|
topcoder1
marked this pull request as ready for review
July 21, 2026 23:21
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
No issues found. Small, well-guarded observability-only change (provenance logging); grep/sed pipelines are pipefail-safe and the model value is regex-sanitized before landing in the comment. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The
codex-review.ymlreusable installs@openai/codex@lateston every run, so the Codex default model floats. An upstream CLI release that changes the default would silently change review behavior across every repo on this reusable, with nothing in the audit trail to show it happened.This adds lightweight provenance logging so drift is visible:
codex --version(always — the reliable signal, since the model default is a function of the CLI version) and the model from Codex's startup banner (best-effort).<sub>footer on the posted PR review comment.Why not just pin the model
Pinning
-c model=<x>was considered and rejected: this is an advisory, non-required, cost-gated second-opinion layer that already degrades gracefully. A pinned model rots (OpenAI retires models →model not found→ red runs fleet-wide until re-pinned everywhere), and half-pinning the model while the CLI floats on@latestbuys little. Making drift visible captures the one real benefit of pinning — knowing when it changes — without the standing maintenance obligation.Safety
should_runhappy path.grep/sedguarded with|| true; missing banner →"(unreported — see logs)"fallback.actionlint: clean (includes shellcheck over therun:blocks).codex review --uncommitted: clean over two consecutive rounds (zero findings each). Codex rounds: 2.Merge
Auto-merge rationale: manual-merge — touches
.github/workflows/**(risk:blocked), and PRs toci-workflowsitself are always manual click-merge. Opened as draft intentionally; mark ready when you want it reviewed/merged.HUMAN_READABLE_SUMMARY: Makes CI Codex reviews record which model + codex CLI version they actually ran on, so if OpenAI silently changes the
@latestdefault model, the change shows up in the job summary and PR review-comment footer instead of drifting unnoticed. Pure observability — no change to how reviews run.