fix: prevent AI PR Review agents from failing checks on large PRs#2258
Merged
imran-siddique merged 1 commit intoMay 14, 2026
Merged
Conversation
Three changes: - Reduce diff truncation from 24k to 12k chars to stay within model context windows (the old limit caused 413 errors on large PRs) - On 413 retry, halve the user prompt before retrying with fallback model so the retry has a chance of succeeding - Replace process.exitCode=1 with a warning annotation so informational AI agents don't produce red X check marks - Use gpt-4o as fallback instead of gpt-4o-mini (8k token limit was too small for PR review context) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
🤖 AI Agent: test-generator — `.github/actions/ai-agent-runner/action.yml`
|
🤖 AI Agent: security-scanner — View detailsNo security issues found. |
🤖 AI Agent: breaking-change-detector — API CompatibilityAPI CompatibilityNo breaking changes detected. |
🤖 AI Agent: code-reviewer — Action Items:TL;DR: 0 blockers, 1 warning. Fix improves robustness of AI PR review checks but requires further testing for edge cases.
Action Items:
Warnings:
|
🤖 AI Agent: docs-sync-checker — Docs SyncDocs SyncDocumentation is in sync. |
PR Review Summary
Verdict: |
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.
Description
Fixes AI PR Review workflow checks (Code Review, Security Scan, Breaking Changes, Docs Sync, Test Coverage) showing as red X failures on large PRs like #2236.
Root Cause
Changes
Type of Change
Package(s) Affected
Checklist
AI Assistance
GitHub Copilot assisted with drafting commit messages.