elastic / elastic/ai-github-actions
[product-manager-impersonator] Fail-closed dedupe mode for Scheduled Audit
- Dominant language
- Python
- Stars
- 11
- Forks
- 16
- Avg merge
- 22h 9m
- Merged PRs (30d)
- 31
Description
## Feature Idea
**Summary:** Add an optional fail-closed mode for Scheduled Audit so duplicate-suppression failures default to `noop` instead of potentially creating duplicate issues.
## Why a Customer Would Want This
Teams running multiple scheduled detectors care more about signal quality than strict freshness when GitHub API calls are flaky. Today, if previous findings cannot be fetched, dedupe is silently skipped and the run can create duplicate reports. A caller-level fail-closed option would reduce noisy duplicate issues during transient API failures.
## Rough Implementation Sketch
- Add a new input on `.github/workflows/gh-aw-scheduled-audit.md` such as `dedupe-on-fetch-failure` with values like `continue` (current behavior) and `noop`.
- In the “List previous findings” step, write a failure sentinel (instead of `[]`) when `gh issue list` fails.
- In the scheduled-audit instructions block, explicitly branch on that sentinel: if mode is `noop`, require `safeoutputs.noop`; if mode is `continue`, keep current behavior.
- Document the new input and behavior in `gh-agent-workflows/scheduled-audit/README.md` and the example workflow.
## Why It Won't Be That Hard
This is a small, localized change in one base reusable workflow and its docs. The fetch-failure path and dedupe contract already exist; this feature only adds explicit control over that existing branch and a small docs update.
## Evidence
- `.github/workflows/gh-aw-scheduled-audit.md` currently falls back to an empty list on fetch failure, which effectively disables dedupe in that run (`L93-L100`).
- The same file instructs agents to dedupe based on `/tmp/previous-findings.json` when `close-older-issues` is false (`L111-L115`).
- `gh-agent-workflows/scheduled-audit/README.md` documents duplicate avoidance as a key behavior when `close-older-issues` is false (`L38`, `L45`).
- `gh-agent-workflows/README.md` encourages broad installation of many scheduled continuous-improvement detectors (`L67-L80`), increasing impact when dedupe fails.
- Scheduled detector examples are cron-based and recurrent (`gh-agent-workflows/bug-hunter/example.yml:L3-L4`, `gh-agent-workflows/code-duplication-detector/example.yml:L3-L4`, `gh-agent-workflows/test-coverage-detector/example.yml:L3-L4`).
> [!NOTE]
>
> 🔒 Integrity filter blocked 1 item
>
> The following item were blocked because they don't meet the GitHub integrity level.
>
> - [#704](https://github.com/elastic/ai-github-actions/issues/704) `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/24717442224)
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
Contributor guide
Assessment
This issue has not been assessed yet.