elastic / elastic/ai-github-actions

[product-manager-impersonator] Configurable previous-findings fetch depth

Open
#1,086 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 a `previous-findings-limit` input to scheduled workflows so maintainers can increase dedupe history depth beyond the current hardcoded 100 issues.

## Why a Customer Would Want This
Teams running many scheduled detectors over long periods want low-noise issue filing. With a fixed 100-item history window, older findings can fall out of dedupe scope and be re-filed, creating avoidable operational noise.

## Rough Implementation Sketch
- Add `previous-findings-limit` (default `100`) to `.github/workflows/gh-aw-scheduled-audit.md` and `.github/workflows/gh-aw-scheduled-fix.md` `workflow_call` inputs.
- Wire that input into the `gh issue list --limit ...` step that writes `/tmp/previous-findings.json`.
- Mirror the same input/usage in `.github/workflows/gh-aw-fragments/previous-findings.md` guidance.
- Document when to raise this value in `gh-agent-workflows/scheduled-audit/README.md` and `gh-agent-workflows/scheduled-fix/README.md`.

## Why It Won't Be That Hard
The change is small and localized: existing dedupe plumbing already exists in scheduled workflows and fragment guidance, and this only parameterizes a hardcoded limit plus docs.

## Evidence
- `.github/workflows/gh-aw-scheduled-audit.md` lines 86-99: previous findings query is hardcoded to `--limit 100`.
- `.github/workflows/gh-aw-scheduled-fix.md` lines 88-100: same hardcoded `--limit 100` pattern.
- `.github/workflows/gh-aw-fragments/previous-findings.md` lines 3-15: shared previous-findings fetch also hardcoded to `--limit 100`.
- `gh-agent-workflows/README.md` lines 67-80: many continuous-improvement scheduled workflows are commonly installed, increasing dedupe-history needs over time.
- Related (not duplicate): open issue `#987` proposes fail-closed behavior when previous-findings fetch fails; it does not address configurable history depth.

> [!NOTE]
>
> 🔒 Integrity filter blocked 37 items
>
> The following items were blocked because they don't meet the GitHub integrity level.
>
> - [#937](https://github.com/elastic/ai-github-actions/pull/937) `search_pull_requests`: 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".
> - [#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".
> - elastic/ai-github-actions#1067 `list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - elastic/ai-github-actions#1025 `list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#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".
> - [#694](https://github.com/elastic/ai-github-actions/issues/694) `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".
> - [#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".
> - [#676](https://github.com/elastic/ai-github-actions/issues/676) `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".
> - [#478](https://github.com/elastic/ai-github-actions/issues/478) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#444](https://github.com/elastic/ai-github-actions/issues/444) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#437](https://github.com/elastic/ai-github-actions/issues/437) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#245](https://github.com/elastic/ai-github-actions/issues/245) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#505](https://github.com/elastic/ai-github-actions/issues/505) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - ... and 21 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: Trigger Product Manager Impersonator](https://github.com/elastic/ai-github-actions/actions/runs/25550690447)

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

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.