Compare commits

..

4 Commits

Author SHA1 Message Date
Rodin 58c114aecb ci: use SAP AI Core model names and remove unavailable models
CI / test (pull_request) Successful in 15s
CI / review (/anthropic/v1, anthropic--claude-4.6-sonnet, sonnet, anthropic, SONNET_REVIEW_TOKEN) (pull_request) Successful in 21s
CI / review (/openai/v1, gpt-5, security, openai, SECURITY_REVIEW.md, SECURITY_REVIEW_TOKEN) (pull_request) Successful in 34s
CI / review (/openai/v1, gpt-5, gpt, openai, GPT_REVIEW_TOKEN) (pull_request) Successful in 55s
- Change claude-sonnet-4-6 to anthropic--claude-4.6-sonnet (SAP AI Core naming)
- Remove gpt-4.1, gpt-5-mini, gpt-4.1-mini (not deployed on SAP AI Core)
- Keep core reviewers: sonnet, gpt, security
2026-05-09 22:12:37 -07:00
Rodin 4842ac64cc chore: retrigger CI after LLM_BASE_URL fix
CI / test (pull_request) Successful in 13s
CI / review (/anthropic/v1, claude-sonnet-4-6, sonnet, anthropic, SONNET_REVIEW_TOKEN) (pull_request) Failing after 13s
CI / review (/openai/v1, gpt-4.1, gpt41, openai, GPT_REVIEW_TOKEN) (pull_request) Failing after 13s
CI / review (/openai/v1, gpt-4.1-mini, gpt41-mini, openai, GPT_REVIEW_TOKEN) (pull_request) Failing after 13s
CI / review (/openai/v1, gpt-5-mini, gpt5-mini, openai, GPT_REVIEW_TOKEN) (pull_request) Failing after 11s
CI / review (/openai/v1, gpt-5, security, openai, SECURITY_REVIEW.md, SECURITY_REVIEW_TOKEN) (pull_request) Successful in 38s
CI / review (/openai/v1, gpt-5, gpt, openai, GPT_REVIEW_TOKEN) (pull_request) Successful in 1m4s
2026-05-09 21:53:56 -07:00
Rodin a414509a94 fix: skip posting review when HEAD moves during evaluation
CI / test (pull_request) Successful in 15s
CI / review (/openai/v1, gpt-4.1-mini, gpt41-mini, openai, GPT_REVIEW_TOKEN) (pull_request) Failing after 14s
CI / review (/openai/v1, gpt-5, gpt, openai, GPT_REVIEW_TOKEN) (pull_request) Failing after 14s
CI / review (/anthropic/v1, claude-sonnet-4-6, sonnet, anthropic, SONNET_REVIEW_TOKEN) (pull_request) Failing after 15s
CI / review (/openai/v1, gpt-4.1, gpt41, openai, GPT_REVIEW_TOKEN) (pull_request) Failing after 14s
CI / review (/openai/v1, gpt-5, security, openai, SECURITY_REVIEW.md, SECURITY_REVIEW_TOKEN) (pull_request) Failing after 13s
CI / review (/openai/v1, gpt-5-mini, gpt5-mini, openai, GPT_REVIEW_TOKEN) (pull_request) Failing after 13s
When a new push arrives while review-bot is processing, the review
would be posted against a stale commit. This causes noise in the
PR timeline with findings that reference code that no longer exists.

Before posting, re-fetch PR metadata and compare HEAD SHA with the
commit we evaluated against. If they differ, log a warning and exit
successfully — a new workflow run should already be processing the
new HEAD.

Fixes #52
2026-05-09 18:08:06 -07:00
aweiker 2089ca0f2d Merge pull request 'fix: retry on transient LLM response body truncation' (#48) from fix/response-body-truncation into main
CI / test (push) Successful in 12s
CI / review (/anthropic/v1, claude-sonnet-4-6, sonnet, anthropic, SONNET_REVIEW_TOKEN) (push) Has been skipped
CI / review (/openai/v1, gpt-4.1, gpt41, openai, GPT_REVIEW_TOKEN) (push) Has been skipped
CI / review (/openai/v1, gpt-4.1-mini, gpt41-mini, openai, GPT_REVIEW_TOKEN) (push) Has been skipped
CI / review (/openai/v1, gpt-5, gpt, openai, GPT_REVIEW_TOKEN) (push) Has been skipped
CI / review (/openai/v1, gpt-5-mini, gpt5-mini, openai, GPT_REVIEW_TOKEN) (push) Has been skipped
CI / review (/openai/v1, gpt-5, security, openai, SECURITY_REVIEW.md, SECURITY_REVIEW_TOKEN) (push) Has been skipped
Reviewed-on: #48
Reviewed-by: Aaron Weiker <aaron@weiker.org>
2026-05-08 02:32:37 +00:00
2 changed files with 19 additions and 16 deletions
+2 -16
View File
@@ -19,6 +19,7 @@ jobs:
- run: go build -o review-bot ./cmd/review-bot - run: go build -o review-bot ./cmd/review-bot
# Self-review: builds from source since we're pre-release # Self-review: builds from source since we're pre-release
# Models must match SAP AI Core deployments (use 'anthropic--' prefix for Claude)
review: review:
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
if: github.event_name == 'pull_request' if: github.event_name == 'pull_request'
@@ -30,27 +31,12 @@ jobs:
token_secret: SONNET_REVIEW_TOKEN token_secret: SONNET_REVIEW_TOKEN
provider: anthropic provider: anthropic
llm_path: /anthropic/v1 llm_path: /anthropic/v1
model: claude-sonnet-4-6 model: anthropic--claude-4.6-sonnet
- name: gpt - name: gpt
token_secret: GPT_REVIEW_TOKEN token_secret: GPT_REVIEW_TOKEN
provider: openai provider: openai
llm_path: /openai/v1 llm_path: /openai/v1
model: gpt-5 model: gpt-5
- name: gpt41
token_secret: GPT_REVIEW_TOKEN
provider: openai
llm_path: /openai/v1
model: gpt-4.1
- name: gpt5-mini
token_secret: GPT_REVIEW_TOKEN
provider: openai
llm_path: /openai/v1
model: gpt-5-mini
- name: gpt41-mini
token_secret: GPT_REVIEW_TOKEN
provider: openai
llm_path: /openai/v1
model: gpt-4.1-mini
- name: security - name: security
token_secret: SECURITY_REVIEW_TOKEN token_secret: SECURITY_REVIEW_TOKEN
provider: openai provider: openai
+17
View File
@@ -315,6 +315,23 @@ func main() {
sentinel := fmt.Sprintf("<!-- review-bot:%s -->", *reviewerName) sentinel := fmt.Sprintf("<!-- review-bot:%s -->", *reviewerName)
// Stale check: verify HEAD hasn't moved since we started
// Re-fetch PR metadata to get the current HEAD SHA
evaluatedSHA := pr.Head.Sha
currentPR, err := giteaClient.GetPullRequest(ctx, owner, repoName, prNumber)
if err != nil {
slog.Warn("could not re-fetch PR for stale check", "pr", prNumber, "error", err)
// Continue anyway — better to post a potentially stale review than fail
} else if currentPR.Head.Sha != evaluatedSHA {
slog.Warn("HEAD moved during review — skipping stale review",
"evaluated", evaluatedSHA,
"current", currentPR.Head.Sha,
"pr", prNumber)
// Exit successfully — this isn't an error, just outdated work
// A new workflow run should already be in progress for the new HEAD
return
}
// Map findings to inline comments for lines present in the diff // Map findings to inline comments for lines present in the diff
diffRanges := gitea.ParseDiffNewLines(diff) diffRanges := gitea.ParseDiffNewLines(diff)
var inlineComments []gitea.ReviewComment var inlineComments []gitea.ReviewComment