fix(ci): properly skip ai-review steps when diff exceeds 3000 lines#75
Merged
Conversation
The generate-notes API endpoint requires contents:write but the job had no permissions block, causing a 403 from GITHUB_TOKEN. https://claude.ai/code/session_01Fnd5PyQgSH8pBiohz7xepD
The previous `exit 0` in the oversized-diff guard only ended the shell process for that step; GitHub Actions still ran all subsequent steps, causing `run_agent_with_fallback` to receive an empty prompt file and ultimately fail with `Argument list too long` on large PRs. Replace `exit 0` with a step output (`skip=true`) and gate every downstream step on `steps.size-check.outputs.skip != 'true'`. https://claude.ai/code/session_01Fnd5PyQgSH8pBiohz7xepD
|
🔄 Cycle 1, attempt 1/3 |
jay9297
marked this pull request as ready for review
June 12, 2026 22:22
|
🔄 Cycle 1, attempt 1/3 |
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.
Summary
Guard against oversized diffstep previously usedexit 0, which only exits that step's shell process — GitHub Actions still runs all subsequent steps with a missing/empty prompt file.run_agent_with_fallbackto eventually callai-agent.shwith the full diff as a command argument, hitting the kernelARG_MAXlimit (Argument list too long) on large PRs (e.g. PR Improve PoE2 Build Export #60).id: size-checkto the guard step, emitsskip=trueas a step output instead ofexit 0, and gates every downstream step onsteps.size-check.outputs.skip != 'true'.Test plan
Guard against oversized diffstep should emit the warning and all subsequent steps should be skipped (shown as skipped in the Actions UI, not failed).https://claude.ai/code/session_01Fnd5PyQgSH8pBiohz7xepD
Generated by Claude Code