Skip to content

gha: raise AI-assisted backport max-turns to 80#30320

Open
andrewhsu wants to merge 1 commit intodevfrom
ahsu/backport-max-turns-80
Open

gha: raise AI-assisted backport max-turns to 80#30320
andrewhsu wants to merge 1 commit intodevfrom
ahsu/backport-max-turns-80

Conversation

@andrewhsu
Copy link
Copy Markdown
Member

@andrewhsu andrewhsu commented Apr 28, 2026

Run 25047762576 hit the 40-turn limit while backporting #30302 (1 commit, 43 LOC, single content conflict). Walking the turn log:

  • ~9 turns burned on sandbox friction (cd <dir> && git ... blocked, mkdir outside the action's session dir blocked).
  • ~17 turns on legitimate conflict investigation (git show/grep/sed of HEAD vs incoming).
  • ~5 turns on cherry-pick --continue and verification.
  • The cherry-pick succeeded, but the trailing git push --set-upstream from the prompt never ran — the model's final tool batch overran turn 40.

A second recent failure (25015920693, backport of #30169 — 19 commits) hit the same cap. That one needs more than 80 even after this bump; tracked separately as a skill optimization (skip empty cherry-picks without investigating parents).

Distribution of source PRs in the last 50 v26.1.x backports:

  • 1 commit: ~70% (always fits)
  • 2-4 commits: ~22% (80 fits comfortably)
  • 8-19 commits: ~8% (8 fits; 11 borderline; 19 still overruns)

80 is enough for ~95% of cases that reach the AI fallback path. The flag only caps; it doesn't cost anything when unused.

Tracked under DEVPROD-4165.

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v26.1.x
  • v25.3.x
  • v25.2.x
  • v25.1.x

UX Changes

Release Notes

  • none

Single-commit backports with one content conflict can use 25-35 turns
once preflight friction is accounted for, leaving little headroom under
the previous 40-turn cap. Multi-commit chains with empty/skipped
cherry-picks routinely exceed it. 80 covers ~95% of cases that reach
the AI fallback path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 28, 2026 15:26
@andrewhsu andrewhsu requested a review from a team as a code owner April 28, 2026 15:26
@andrewhsu andrewhsu requested review from PrzemekZglinicki and removed request for a team April 28, 2026 15:26
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Raises the Claude Code Action --max-turns limit for the AI-assisted backport fallback workflow to reduce failures caused by hitting the previous turn cap.

Changes:

  • Increased --max-turns from 40 to 80 for the Claude-driven AI fallback in the backport workflow.

@andrewhsu andrewhsu requested a review from nvartolomei April 28, 2026 15:34
@nvartolomei
Copy link
Copy Markdown
Contributor

~9 turns burned on sandbox friction (cd

&& git ... blocked, mkdir outside the action's session dir blocked).

Did you consider updating instructions so it doesn’t burn these turns?

@david-yu
Copy link
Copy Markdown
Contributor

Sorry about that I was trying to figure out why the go linter failed and could not figure out how to fix it for that PR, just ended up closing that manually backported PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants