elastic / elastic/ai-github-actions
[product-manager-impersonator] Scheduled detector run outcome outputs
- Dominant language
- Python
- Stars
- 11
- Forks
- 16
- Avg merge
- 22h 9m
- Merged PRs (30d)
- 31
Description
## Feature Idea
**Summary:** Expose a normalized `run_outcome` plus existing safe-output telemetry as additional `workflow_call` outputs in scheduled detector/fixer workflows.
## Why a Customer Would Want This
Teams running scheduled detector workflows need to quickly tell whether a run created work, did nothing, or degraded. Right now callers mostly get only `created_issue_*` / `created_pr_*`, so maintainers often have to open logs to understand no-op vs. partial-error outcomes. Extra outputs would let downstream workflows, dashboards, and notifications branch on run outcome without log scraping.
## Rough Implementation Sketch
- Add new `on.workflow_call.outputs` fields in `.github/workflows/gh-aw-scheduled-audit.md` and `.github/workflows/gh-aw-scheduled-fix.md` for `run_outcome` and selected telemetry (for example `process_safe_outputs_processed_count` and error counts).
- Derive `run_outcome` in the safe-outputs job from already-available safe-output results (e.g., created artifact present vs. no-op vs. degraded).
- Keep existing `created_issue_*` / `created_pr_*` outputs unchanged for backward compatibility.
- Document the new outputs in `docs/workflows/detector-fixer-chaining.md` and `docs/upgrading.md`, with a minimal chaining example.
## Why It Won't Be That Hard
The required data is already produced inside the safe-outputs job; this is mostly output wiring and docs. The change surface is small (two scheduled workflow sources plus docs), follows existing output propagation patterns, and can be additive with no breaking behavior.
## Evidence
- `.github/workflows/gh-aw-scheduled-audit.lock.yml#L111-L117` exposes only `created_issue_number` and `created_issue_url` as workflow-call outputs.
- `.github/workflows/gh-aw-scheduled-audit.lock.yml#L1455-L1463` already has richer safe-output telemetry (`process_safe_outputs_processed_count`, error counts, temp-id map) in job outputs.
- `.github/workflows/gh-aw-scheduled-fix.lock.yml#L111-L116` exposes only `created_pr_number` and `created_pr_url` as workflow-call outputs.
- `.github/workflows/gh-aw-scheduled-fix.lock.yml#L1451-L1459` already has richer safe-output telemetry in job outputs.
- `docs/workflows/detector-fixer-chaining.md#L11-L17` documents only created-issue outputs today.
- `docs/upgrading.md#L11-L12` highlights only created issue/PR workflow outputs.
- Related open issues were reviewed and are adjacent but different in scope: `#852` (comment workflow outputs), `#935` (noop issue noise switch), `#1169` (cooldown window), `#893` (safe-output replay preflight).
> [!NOTE]
>
> 🔒 Integrity filter blocked 15 items
>
> The following items were blocked because they don't meet the GitHub integrity level.
>
> - [#1175](https://github.com/elastic/ai-github-actions/pull/1175) `list_pull_requests`: 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".
> - [#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".
> - [#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".
> - [#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".
> - [#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".
> - [#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".
> - [#248](https://github.com/elastic/ai-github-actions/issues/248) `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".
> - [#235](https://github.com/elastic/ai-github-actions/issues/235) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#225](https://github.com/elastic/ai-github-actions/issues/225) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#224](https://github.com/elastic/ai-github-actions/issues/224) `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/26882117864)
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
Contributor guide
Assessment
This issue has not been assessed yet.