Skip to content

v3.0.1: keep the summary honest, read config from the base branch - #67

Merged
cirolini merged 3 commits into
mainfrom
fix/v3.0.1
Sep 21, 2026
Merged

cirolini merged 3 commits into
mainfrom
fix/v3.0.1

Conversation

@cirolini

Copy link
Copy Markdown
Owner

Fixes found reviewing v3.0.0 before announcing it. Meant to ship as v3.0.1, together with the max_tokens 8192 default that is on main but not in any tag (@v3 still runs 2048).

Fixed

  1. Unreviewed files dropped out of the summary on the next push. last_reviewed_sha advanced even when files were skipped, the diff was truncated, or the model output was unusable. It now advances only after a complete run whose comments were delivered, and the summary says the next push reviews that range again.
  2. Findings counted as posted when the review failed to post. They are now listed in the summary and retried on the next push.
  3. Incremental review after a merge from main or a rebase → 422. The compare is checked first (status != ahead, or a merge commit in the range, falls back to a full review with the reason in the summary). As a second guard, findings are placed against the PR's own diff and files outside it are not sent to the model.
  4. One-click suggestions on relocated findings. A finding snapped up to 3 lines, or with its range shortened, gets relocated=True and its suggestion is shown as a plain code block, not as ```suggestion.

Security

  1. .genai-review.yml is read from the base commit over the API, not from disk. Before, with a checkout the PR author controlled it (ignore_paths: ["**"], max_comments: 0, base_url pointing at their own server so it receives the key). Without a checkout, which the README recommends, the file was never read. base_url is now an action input only.

Docs

  • action.yml: "ChatGPT GitHub Actions" → "GenAI Code Review" (that Marketplace slug is free). The listing itself changes only when a release is published to the Marketplace.
  • The migration guide and release notes said @v2 was untouched. It points at v2.1; they now say so.

Tests

284 pass (was 267), lint clean. New regression tests for each item. The compare fields (status, total_commits, commits[].parents) were checked against this repository's real API: 4dafa5d...a3372f9 is ahead with three 2-parent commits, which is exactly case 3.

🤖 Generated with Claude Code

Rafael Cirolini and others added 3 commits September 21, 2026 09:27
Three ways the review lost or misplaced work between runs:

- The last reviewed SHA advanced even when files were skipped, the diff was
  truncated or the model output was unusable, so the next push diffed past
  them and they vanished from "Not reviewed". It now advances only after a
  complete, delivered run.
- Findings counted as posted when GitHub rejected the review. They are now
  listed in the summary and retried on the next push.
- After a merge from the base branch or a rebase, the incremental diff held
  changes outside the pull request and GitHub rejected the review with 422.
  The comparison is checked first and falls back to a full review, and
  findings are placed against the pull request's own diff.

Also: a finding moved to fit the diff no longer offers its suggestion as a
one-click change, since it was written for other lines.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
It was read from the working directory. With a checkout, the pull request
controlled it: ignore_paths "**" or max_comments 0 reviews a change out of
existence, and base_url sends the API key to another server. Without a
checkout, as the README recommends, it was never read at all.

It is now fetched over the API at the pull request's base commit, and
base_url is an action input only.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
action.yml still called it "ChatGPT GitHub Actions". The migration guide and
release notes said @v2 was untouched; it was moved once, to the fix-only
v2.1. Changelog entries for everything since v3.0.0.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Code review did not run

The openai provider failed and no review was produced: the API key was rejected (401). Check that the secret you pass to api_key is set and has not been revoked.

model: gpt-5.6-luna

@cirolini
cirolini merged commit 46fd81d into main Sep 21, 2026
3 of 4 checks passed
@cirolini
cirolini deleted the fix/v3.0.1 branch September 21, 2026 12:32
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