Skip to content

fix(ci): properly skip ai-review steps when diff exceeds 3000 lines#75

Merged
jay9297 merged 3 commits into
devfrom
claude/github-actions-failure-6firsu
Jun 13, 2026
Merged

fix(ci): properly skip ai-review steps when diff exceeds 3000 lines#75
jay9297 merged 3 commits into
devfrom
claude/github-actions-failure-6firsu

Conversation

@jay9297

@jay9297 jay9297 commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • The Guard against oversized diff step previously used exit 0, which only exits that step's shell process — GitHub Actions still runs all subsequent steps with a missing/empty prompt file.
  • This caused run_agent_with_fallback to eventually call ai-agent.sh with the full diff as a command argument, hitting the kernel ARG_MAX limit (Argument list too long) on large PRs (e.g. PR Improve PoE2 Build Export #60).
  • Fix: adds id: size-check to the guard step, emits skip=true as a step output instead of exit 0, and gates every downstream step on steps.size-check.outputs.skip != 'true'.

Test plan

  • Push a PR with a diff > 3000 lines — the Guard against oversized diff step should emit the warning and all subsequent steps should be skipped (shown as skipped in the Actions UI, not failed).
  • Push a normal PR (diff ≤ 3000 lines) — all steps should run as before.

https://claude.ai/code/session_01Fnd5PyQgSH8pBiohz7xepD


Generated by Claude Code

claude added 2 commits June 12, 2026 01:28
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
@github-actions

Copy link
Copy Markdown

🔄 Cycle 1, attempt 1/3
✅ Agent succeeded (cycle 1, attempt 1)

@jay9297
jay9297 marked this pull request as ready for review June 12, 2026 22:22
@github-actions

Copy link
Copy Markdown

🔄 Cycle 1, attempt 1/3
✅ Agent succeeded (cycle 1, attempt 1)

@jay9297
jay9297 merged commit ad9d91b into dev Jun 13, 2026
11 checks passed
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.

2 participants