Skip to content

ci: upgrade pr-reviewer-action to v1.2.0 (routing + escalation)#201

Merged
joryirving merged 5 commits into
mainfrom
chore/ai-review-v1.2.0
Jun 10, 2026
Merged

ci: upgrade pr-reviewer-action to v1.2.0 (routing + escalation)#201
joryirving merged 5 commits into
mainfrom
chore/ai-review-v1.2.0

Conversation

@joryirving

Copy link
Copy Markdown
Collaborator

Upgrades the AI PR review workflow to pr-reviewer-action v1.2.0 and adopts the new routing/reliability features.

Repo character: application code; the conservative tool_allowed_gh_api_repos restriction is kept as-is.

What changed and why

  • Pin bumped to the v1.2.0 release SHA (ff03870). Feature-heavy release: model routing + escalation, structured findings, required-check validation, incremental-review and CI-wait fixes, large context/perf work. All backward-compatible.
  • review_routing_mode: auto — PRs are classified deterministically; low-risk ones (e.g. routine dependency bumps) go to the fast model, risk-flagged ones (auth, secrets, migrations, public routes, linked security issues) go straight to the smart model. Fast stays your current PRIMARY_MODEL. Smart is wired as vars.SMART_MODEL || vars.FALLBACK_MODELno new vars are required; it uses your fallback model until you optionally add a SMART_MODEL (and SMART_FORMAT if it differs) repo variable pointing at a bigger model.
  • Escalation (on by default with routing) — if the fast review looks insufficient (request_changes, unaddressed required checks, suspiciously short/unsure review, blocker signals), the review automatically re-runs on the smart model and only that result is published.
  • on_model_failure: notice + retries 8 → 3 — when the homelab endpoint is down, instead of hammering it (~8 attempts with backoff) and leaving a red check with no explanation, the action now tries 3 times, then posts a visible "review could not run" notice as request_changes. Faster feedback, never silently approves.
  • inline_findings: "true" — findings that anchor to a diff line are posted as native line-anchored review comments (capped at 20) instead of only prose in the review body.
  • verdict_policy: findings_severity_gated — the approve/request-changes verdict is now derived deterministically from the structured findings (request_changes iff any blocker-severity finding) instead of trusting the model's mood, since this repo publishes native review verdicts. Falls back to the model verdict when no findings are returned.

Now-active defaults worth knowing (no config needed)

  • review_scope: auto — full review first, then incremental reviews of just the new commits on later pushes. Significant token savings on long-lived PRs.
  • validate_required_checks: auto (mode warn) — risky PRs get classifier-derived required checks; reviews that never address them get a visible "Unaddressed required checks" section.

Choices for you (left out on purpose — flag if you want any)

  1. SMART_MODEL repo variable — add it to route risky PRs/escalations to a stronger model than your current fallback. Without it, smart = FALLBACK_MODEL.
  2. model_context_tokens — if the models behind your LiteLLM endpoint have small context windows (8k–32k local models), set this to the real window and the action right-sizes the corpus instead of using the coarse context_limit_mode: normal (~55–70k tokens). I don't know your per-model windows, so I didn't guess.
  3. ai_response_format: json_object — helps small local models emit parseable JSON, but errors on backends that don't support it; only enable if you know the models behind LiteLLM accept it.
  4. ci_status_check: "true" — waits (up to 5 min) for CI before reviewing so the review can see CI state. Adds latency to every review; worth it only if you want the reviewer gating on test results.
  5. required_check_validation_mode: fail — make unaddressed required checks block instead of warn.

🤖 Generated with Claude Code

joryirving and others added 2 commits June 10, 2026 11:04
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@joryirving

Copy link
Copy Markdown
Collaborator Author

Follow-up grounded in the actual LiteLLM config (home-ops litellm-configmap):

  • Added ai_response_format: json_object in the latest commit. Safe because LiteLLM runs drop_params: true (backends that don't support it just don't see the param), and the review llama.cpp servers support grammar-constrained JSON — this directly reduces parse failures/retries.
  • model_context_tokens: intentionally still unset. The review alias has a 200k input window, so the default context_limit_mode: normal (~55–70k tokens) fits with lots of headroom. Setting it to 200000 would ~3x the corpus and slow llama.cpp prompt eval for little gain. (Only needed if a repo ever points at ryzen — 8k ctx.)
  • SMART_MODEL recommendation: smart currently resolves to FALLBACK_MODEL (MiniMax-M2.7, anthropic format) — already a reasonable smart tier. If you want a stronger escalation model, reasoning-coder (glm-5.1 with thinking, openai format) or opencode-go-deepseek-v4-pro are the best candidates in the proxy; set repo vars SMART_MODEL + SMART_FORMAT=openai. Note the chatgpt/* entries won't work for this action — they're mode: responses, not chat completions.

its-saffron[bot]

This comment was marked as outdated.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@its-saffron its-saffron Bot dismissed their stale review June 10, 2026 17:51

Superseded by a newer automated review for this pull request.

its-saffron[bot]

This comment was marked as outdated.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@its-saffron its-saffron Bot dismissed their stale review June 10, 2026 17:57

Superseded by a newer automated review for this pull request.

its-saffron[bot]

This comment was marked as outdated.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@its-saffron its-saffron Bot dismissed their stale review June 10, 2026 18:13

Superseded by a newer automated review for this pull request.

@its-saffron its-saffron Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI Automated Review

Incremental review: reviewed changes since the last managed review. This is not a full re-review of the entire PR.

Analysis engine: review@https://litellm.jory.dev/v1 (openai) (incremental delta review)

Recommendation

Approved. This is a routine dependency bump to upgrade the AI PR reviewer action to a newer version (v1.2.2).

Change-by-change findings

  • .github/workflows/ai-pr-review.yaml: Updated misospace/pr-reviewer-action from v1.2.1 (SHA 87d01c8...) to v1.2.2 (SHA e891235...). This aligns with the release notes provided in the PR description.

Standards Compliance

  • Dependency Management: The PR correctly pins the action to a specific commit SHA (e891235e8e3e75824b88fb696b1f7b4816122737), which is a best practice for CI stability.
  • Repository Conventions: No violations of AGENTS.md or other repository standards were found.

Linked Issue Fit

  • The PR description explicitly states the purpose is to upgrade the workflow to v1.2.0 (and the diff shows the subsequent v1.2.2 update), adopting new routing and reliability features. The implementation matches the intent.

Unknowns or Needs Verification

  • None. The change is a straightforward version bump of a GitHub Action.

@joryirving joryirving merged commit f14630c into main Jun 10, 2026
4 checks passed
@joryirving joryirving deleted the chore/ai-review-v1.2.0 branch June 10, 2026 18:16
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