elastic / elastic/ai-github-actions

[product-manager-impersonator] Scheduled audit stale-window suppression

Open
#1,952 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
11
Forks
16
Avg merge
22h 9m
Merged PRs (30d)
31

Description

## Feature Idea

**Summary:** Add an optional stale-window input to `gh-aw-scheduled-audit` so it skips creating a new report issue when a prior matching issue is still open and recently updated.

## Why a Customer Would Want This
Teams running scheduled detector workflows want actionable signal, not repeated issue churn for findings they are already actively tracking. Today, a daily/weekday schedule can keep re-opening the same conversation before maintainers have had time to act, which adds notification fatigue and triage overhead. A small stale-window gives maintainers control over report cadence without disabling audits.

## Rough Implementation Sketch
- Add a new optional input (for example `min-days-between-reports`, default `0`) in `.github/workflows/gh-aw-scheduled-audit.md` under `workflow_call.inputs`.
- In the existing “List previous findings” path, include `updatedAt` in the GitHub issue query and compute whether the latest matching issue is within the configured window.
- If the newest matching open issue is inside the window, short-circuit to a safe `noop` outcome with a clear reason; otherwise continue with normal detector execution.
- Document the input and behavior in `gh-agent-workflows/scheduled-audit/README.md` and add an example override in `gh-agent-workflows/scheduled-audit/example.yml`.

## Why It Won't Be That Hard
The scheduled-audit workflow already fetches prior findings and already contains duplicate-handling behavior, so this is an incremental extension rather than a new subsystem. The change surface is small (one reusable workflow plus docs/example), and it reuses existing issue-list data flow and safe-output behavior. This should fit in a 1–2 day implementation and validation cycle.

## Evidence
- `.github/workflows/gh-aw-scheduled-audit.md` already has a “List previous findings” step and writes `/tmp/previous-findings.json`, showing prior-report awareness is already built in.
- `.github/workflows/gh-aw-scheduled-audit.md` prompt instructions already reference behavior based on previous findings and replacement mode, so cooldown logic is conceptually adjacent.
- `gh-agent-workflows/scheduled-audit/README.md` documents duplicate-avoidance/close-older behavior, indicating user-facing report-churn control is already part of this workflow’s value proposition.
- Recent repository activity is heavily focused on reliability and operational polish (for example PRs `#1945`, `#1948`, `#1944`), aligning this with current maintenance direction.

---
[What is this?](https://ela.st/github-ai-tools) | [From workflow: Trigger Product Manager Impersonator](https://github.com/elastic/ai-github-actions/actions/runs/33177994241)

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

Contributor guide

Open the contributing guide

Research direction

Start with the “List previous findings” path in .github/workflows/gh-aw-scheduled-audit.md and inspect how /tmp/previous-findings.json and safe-output handling work. Then read gh-agent-workflows/scheduled-audit/README.md and example.yml for the documented interface. Done means the optional window suppresses matching recent open reports with a clear noop reason, while older or absent reports follow the existing path and the documentation includes an override example.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions
Domain
ci-cd
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.