Skip to content

ci(codex-review): log the model + CLI version each review actually used#124

Merged
topcoder1 merged 1 commit into
mainfrom
ci/codex-review-model-provenance
Jul 21, 2026
Merged

ci(codex-review): log the model + CLI version each review actually used#124
topcoder1 merged 1 commit into
mainfrom
ci/codex-review-model-provenance

Conversation

@topcoder1

Copy link
Copy Markdown
Owner

What

The codex-review.yml reusable installs @openai/codex@latest on 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:

  • Captures 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).
  • Surfaces both in the job summary and as a <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 @latest buys little. Making drift visible captures the one real benefit of pinning — knowing when it changes — without the standing maintenance obligation.

Safety

  • No change to the review itself. New code runs only on the existing should_run happy path.
  • pipefail-safe: grep/sed guarded with || true; missing banner → "(unreported — see logs)" fallback.
  • actionlint: clean (includes shellcheck over the run: 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 to ci-workflows itself 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 @latest default 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.

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>
@github-actions

Copy link
Copy Markdown

Coverage Floor — mode: enforce

metric value
measured 100.0%
floor (current) 99.0%
target 100.0%
last bumped 2026-05-12

@topcoder1
topcoder1 marked this pull request as ready for review July 21, 2026 23:21
@cursor

cursor Bot commented Jul 21, 2026

Copy link
Copy Markdown

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.

@claude

claude Bot commented Jul 21, 2026

Copy link
Copy Markdown

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.

@topcoder1
topcoder1 merged commit 919e64f into main Jul 21, 2026
13 checks passed
@topcoder1
topcoder1 deleted the ci/codex-review-model-provenance branch July 21, 2026 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant