elastic / elastic/beats

[agent-suggestions] Agent suggestions - 2026-06-08

Open
#51,149 1 comment 0 reactions 0 assignees View on GitHub
needs_team
Dominant language
Go
Stars
12.7k
Forks
5k
Avg merge
2d 2h
Merged PRs (30d)
364

Description

## Agent Suggestions
**Date:** 2026-06-08

### 1. `trigger-backport-branch-health-guard`
**Trigger:** `workflow_run` (on completed CI workflows) scoped to active backport branches, with optional `pull_request_target` hook when backport PRs are merged.

**Purpose:** Detect and deduplicate cases where a backport PR is merged while non-required checks fail (for example, failures hidden under allowed checks), leaving the target branch in a broken state and blocking subsequent backports.

**Proposed safe outputs:** `create-issue` (canonical branch-health tracker), `add-comment` (linking the tracker on the merged backport PR), `noop` (no actionable branch breakage).

**Evidence:**
- Open bug describing the exact gap: [#51084](https://github.com/elastic/beats/issues/51084) (`[CI] Merged backported PRs with allowed failures can leave branches in a broken state`).
- Concrete example cited in that issue: merged backport PR [#51021](https://github.com/elastic/beats/pull/51021) despite failing checks.
- Current backport automation only handles label-driven backport creation, not post-merge branch health triage: [`.github/workflows/backport-active.yml:3-7`](https://github.com/elastic/beats/blob/main/.github/workflows/backport-active.yml#L3-L7), [`.github/workflows/backport-active.yml:15-22`](https://github.com/elastic/beats/blob/main/.github/workflows/backport-active.yml#L15-L22).
- Existing detective workflows react to failing runs/statuses but are not branch-health-oriented for merged backports:
- [`.github/workflows/trigger-pr-actions-detective.yml:3-5`](https://github.com/elastic/beats/blob/main/.github/workflows/trigger-pr-actions-detective.yml#L3-L5), [`.github/workflows/trigger-pr-actions-detective.yml:16-18`](https://github.com/elastic/beats/blob/main/.github/workflows/trigger-pr-actions-detective.yml#L16-L18)
- [`.github/workflows/trigger-pr-buildkite-detective.yml:3`](https://github.com/elastic/beats/blob/main/.github/workflows/trigger-pr-buildkite-detective.yml#L3), [`.github/workflows/trigger-pr-buildkite-detective.yml:14-16`](https://github.com/elastic/beats/blob/main/.github/workflows/trigger-pr-buildkite-detective.yml#L14-L16)

**Why not covered already:** Prior agent-suggestion issues currently open focus on other scopes (workflow-failure meta triage and downstream compatibility checks), not merged-backport branch-health guardrails.

## Duplicate Checks
- Open issues reviewed: https://github.com/elastic/beats/issues?q=is:open+is:issue+repo:elastic%2Fbeats+%28agent+OR+workflow+OR+automation%29
- Open PRs reviewed: https://github.com/elastic/beats/pulls?q=is:open+is:pr+repo:elastic%2Fbeats+%28agent+OR+workflow%29
- Prior suggestion reports reviewed:
- https://github.com/elastic/beats/issues/50211
- https://github.com/elastic/beats/issues/49774
- https://github.com/elastic/beats/issues/50089

## Downstream Signals
- Cross-repo AI-workflow adoption and CI-failure automation activity remains active, reinforcing value of targeted branch-health automation:
- https://github.com/elastic/logstash/pull/19196
- https://github.com/elastic/package-registry/pull/1745

## Suggested Next Steps
- [ ] Prototype `trigger-backport-branch-health-guard.yml` with branch-level dedupe key (`branch + check signature + merge SHA`).
- [ ] Pilot on active maintenance branches first (for example, `8.19`, `9.3`, `9.4`) and tune noise thresholds.
- [ ] Escalate to a single canonical issue per branch breakage pattern instead of per-run reporting.

> [!NOTE]
>
> 🔒 Integrity filter blocked 194 items
>
> The following items were blocked because they don't meet the GitHub integrity level.
>
> - elastic/beats#51146 `list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - elastic/beats#51135 `list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - elastic/beats#51131 `list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - elastic/beats#51127 `list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - elastic/beats#51125 `list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - elastic/beats#51120 `list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - elastic/beats#51059 `list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#50900](https://github.com/elastic/beats/pull/50900) `list_pull_requests`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#51074](https://github.com/elastic/beats/pull/51074) `list_pull_requests`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#51136](https://github.com/elastic/beats/pull/51136) `list_pull_requests`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#51113](https://github.com/elastic/beats/pull/51113) `list_pull_requests`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#51132](https://github.com/elastic/beats/pull/51132) `list_pull_requests`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#50792](https://github.com/elastic/beats/pull/50792) `list_pull_requests`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#51108](https://github.com/elastic/beats/pull/51108) `list_pull_requests`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#50681](https://github.com/elastic/beats/pull/50681) `list_pull_requests`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#51091](https://github.com/elastic/beats/pull/51091) `list_pull_requests`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - ... and 178 more items
>
> To allow these resources, lower `min-integrity` in your GitHub frontmatter:
>
> ```yaml
> tools:
> github:
> min-integrity: approved # merged | approved | unapproved | none
> ```
>
>

---
[What is this?](https://ela.st/github-ai-tools) | [From workflow: Agent Suggestions](https://github.com/elastic/beats/actions/runs/27141763433)

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
> - [x] expires on Jun 15, 2026, 1:56 PM UTC

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.