elastic / elastic/ai-github-actions
[product-manager-impersonator] Fail closed when previous findings fetch fails
- Dominant language
- Python
- Stars
- 11
- Forks
- 16
- Avg merge
- 22h 9m
- Merged PRs (30d)
- 31
Description
## Feature Idea
**Summary:** Make scheduled detector workflows stop with a noop or incomplete report when previous-finding history cannot be fetched, instead of continuing with an empty dedup list.
## Why a Customer Would Want This
Teams use these scheduled detectors to create actionable issues, but duplicate noise is costly: every duplicate issue has to be triaged, closed, or explained. If GitHub issue search, auth, or API availability briefly fails during the previous-findings step, the current behavior explicitly skips dedup and gives the agent an empty history, increasing the chance that a detector files a repeat report. A fail-closed default would preserve trust in scheduled automation during transient platform failures.
## Rough Implementation Sketch
- Update `.github/workflows/gh-aw-fragments/previous-findings.md` so the `gh issue list` failure path writes a sentinel JSON object or sidecar file instead of `[]`.
- Extend the fragment instructions to tell agents to call `noop` or `report_incomplete` when the sentinel is present, rather than treating the history as genuinely empty.
- Optionally add a workflow input such as `allow-dedup-skip` for teams that prefer availability over duplicate suppression, defaulting to the safer fail-closed behavior.
- Recompile affected workflows so detector sources that import `previous-findings.md` inherit the guard.
## Why It Won't Be That Hard
This is a small shared-fragment change: the existing previous-findings step is already centralized, already catches fetch failures, and scheduled detector prompts already require agents to check `/tmp/previous-findings.json` before filing. The main work is changing the failure marker and making the imported instruction unambiguous, then recompiling generated workflow locks.
## Evidence
- `.github/workflows/gh-aw-fragments/previous-findings.md:9-15` runs `gh issue list` and currently turns any fetch failure into `[]` while warning that dedup will be skipped.
- `.github/workflows/gh-aw-fragments/previous-findings.md:20-24` instructs agents to use `/tmp/previous-findings.json` as the source of already-filed reports, so an empty fallback looks the same as no prior findings.
- `.github/workflows/gh-aw-bug-hunter.md:13-16` shows scheduled detectors import `previous-findings.md`, `pick-three-keep-one.md`, and `scheduled-audit.md`, so a fragment fix would cover the detector family.
- Duplicate checks found prior product-manager ideas for cooldowns, health watches, output reporting, and safe-output replay preflight, but no existing request for fail-closed previous-findings/dedup behavior.
---
[What is this?](https://ela.st/github-ai-tools) | [From workflow: Trigger Product Manager Impersonator](https://github.com/elastic/ai-github-actions/actions/runs/29013403002)
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
Contributor guide
Research direction
Start with .github/workflows/gh-aw-fragments/previous-findings.md:9-15 and 20-24 to trace the fetch-failure fallback and the agent instructions. Check the imports in .github/workflows/gh-aw-bug-hunter.md:13-16, then recompile affected workflows. Done means fetch failures produce a distinguishable marker and scheduled detectors choose noop or report_incomplete instead of treating history as empty.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions
- Domain
- ci-cd, devops
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100