[AI] Add skill to resolve failed backports#261080
[AI] Add skill to resolve failed backports#261080Ikuni17 wants to merge 10 commits intoelastic:mainfrom
Conversation
💚 Build Succeeded
cc @Ikuni17 |
| ```bash | ||
| SOURCE_SHA=$(gh api repos/elastic/kibana/pulls/<PR> --jq '.merge_commit_sha') | ||
|
|
||
| gh api --paginate --slurp repos/elastic/kibana/issues/<PR>/comments \ |
There was a problem hiding this comment.
testing this out, this command fails on my machine.
the `--slurp` option is not supported with `--jq` or `--template`
maybe it's a difference in the gh cli version? I'm running 2.79.0
| ``` | ||
|
|
||
| Parse the markdown table in the latest matching `kibanamachine` comment to | ||
| extract branches with status "failed because of merge conflicts". These are the |
There was a problem hiding this comment.
what about backports that fail because there are prerequisites that may need to be merged ("you might need to backport the following PRs")? for example: #259467 (comment)
feels like that would be worth a mention
|
|
||
| ### Step 2: Run the backport tool | ||
|
|
||
| Run the backport from the **Kibana repo root**: |
There was a problem hiding this comment.
should we have agents check for existing backports first, just in case one is already in flight? (I realize that's an edge case, might not be worth it)
| - If you want the backport tool to keep running while you resolve conflicts in | ||
| a separate shell, use any detached-session tool or second-terminal workflow | ||
| available on that machine. Do not assume `tmux` is installed. |
There was a problem hiding this comment.
this feels useful for humans but do agents need to know this? don't most agents already know how to run something in the background? (this is an honest question). is it better to just say that the backport tool is blocking and should be run in the background if you need to do other work in parallel?
Summary
Adds an agent skill for resolving failed backports caused by merge conflicts. When
kibanamachineposts a backport failure comment on a merged PR, this skill guides the agent through:node scripts/backportlocally with the failed branchesyarn kbn bootstrapinstead of manual editsIncludes guardrails to bail out on non-trivial conflicts and report tool errors rather than retrying blindly.
Built with both Cursor +
gpt-5.4-highand Claude.Testing
Generated backports for these PRs with Cursor +
gpt-5.4-high:#259017
#259009