elastic / elastic/ai-github-actions
[product-manager-impersonator] Auto-close recovered workflow failure issues
- Dominant language
- Python
- Stars
- 11
- Forks
- 16
- Avg merge
- 22h 9m
- Merged PRs (30d)
- 31
Description
## Feature Idea
**Summary:** Add a maintenance operation that automatically closes stale `[aw] ... failed` issues once the same workflow has a subsequent successful run.
## Why a Customer Would Want This
Teams running many scheduled workflows get a stream of failure issues, but there is no automatic signal when a workflow has recovered. That leaves stale failures open and forces maintainers to manually verify whether alerts are still active. Auto-closing recovered failures would keep the issue queue focused on current problems while preserving failure visibility when incidents are ongoing.
## Rough Implementation Sketch
- Add a new `agentics-maintenance` operation (for example, `resolve_failure_issues`) that scans open `[aw] ... failed` issues and checks for newer successful runs of the same workflow.
- When recovery is detected, post a short resolution comment with the successful run link, then close the issue.
- Keep behavior opt-in via `workflow_dispatch`/`workflow_call` operation first, then allow scheduled execution if maintainers want continuous cleanup.
- Document the operation alongside existing maintenance operations in workflow docs.
## Why It Won't Be That Hard
The maintenance workflow already has operation routing and scheduled execution, plus existing lifecycle automation for closing expired entities. This feature is mostly additive filtering + close-comment logic in an existing maintenance surface, without introducing a new workflow family.
## Evidence
- `agentics-maintenance` currently supports operations like `safe_outputs`, `create_labels`, and `validate`, but nothing for resolving recovered failure issues: `.github/workflows/agentics-maintenance.yml#L40-L54`, `.github/workflows/agentics-maintenance.yml#L143-L145`.
- The same workflow already performs automated issue lifecycle actions (closing expired issues), showing a direct implementation precedent: `.github/workflows/agentics-maintenance.yml#L83-L113`.
- Docs for required maintenance behavior mention only `safe_outputs` and `create_labels` manual operations today: `docs/workflows/gh-agent-workflows.md#L147-L163`.
- Recent activity shows recurring open failure issues (for example `#1057`, `#1056`, `#1058`), which indicates ongoing triage noise from failure alerts.
- Upgrade docs highlight failure issue labeling (`agentic-workflows`) but no recovery lifecycle behavior: `docs/upgrading.md#L11-L13`.
> [!NOTE]
>
> 🔒 Integrity filter blocked 10 items
>
> The following items were blocked because they don't meet the GitHub integrity level.
>
> - elastic/ai-github-actions#1067 `list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#359](https://github.com/elastic/ai-github-actions/issues/359) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#1067](https://github.com/elastic/ai-github-actions/issues/1067) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#354](https://github.com/elastic/ai-github-actions/issues/354) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#875](https://github.com/elastic/ai-github-actions/issues/875) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#684](https://github.com/elastic/ai-github-actions/issues/684) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#321](https://github.com/elastic/ai-github-actions/issues/321) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#140](https://github.com/elastic/ai-github-actions/issues/140) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#139](https://github.com/elastic/ai-github-actions/issues/139) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#1025](https://github.com/elastic/ai-github-actions/issues/1025) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
>
> 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: Trigger Product Manager Impersonator](https://github.com/elastic/ai-github-actions/actions/runs/25371237312)
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
Contributor guide
Assessment
This issue has not been assessed yet.