Add daily detection analysis report workflow#41802
Merged
Merged
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…count definition, and mkdir for cache-memory dir Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
pelikhan
June 26, 2026 21:17
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new scheduled agentic workflow (detection-analysis-report) intended to analyze recent workflow runs, detect gh-aw-detection misconfigurations, and publish a daily Discussion with comparison/trend charts.
Changes:
- Added the
detection-analysis-reportworkflow source (.md) with a prompt describing run classification, misconfiguration rules, and chart/report outputs. - Added the compiled workflow lockfile (
detection-analysis-report.lock.yml) to run the agent + safe-outputs publication path on a daily schedule. - Regenerated metadata for
pr-triage-agent.lock.yml(hash update).
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/pr-triage-agent.lock.yml | Regenerated lock metadata (hash update). |
| .github/workflows/detection-analysis-report.md | New workflow prompt/spec for detection adoption + misconfiguration analysis and charted reporting. |
| .github/workflows/detection-analysis-report.lock.yml | Compiled GitHub Actions workflow implementing the new daily report. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/3 changed files
- Comments generated: 3
- Review effort level: Low
Comment on lines
+64
to
+70
| Use the `agentic-workflows` MCP `logs` tool to download workflow runs from the last 24 hours: | ||
|
|
||
| ``` | ||
| Use the agentic-workflows MCP tool `logs` with parameters: | ||
| - start_date: "-1d" | ||
| Output is saved to: /tmp/gh-aw/aw-mcp/logs | ||
| ``` |
Comment on lines
+72
to
+73
| Each run directory contains `aw_info.json` with fields including `engine_id`, `workflow`, `status`, `tokens`, and feature flags. The `gh-aw-detection` feature flag is stored under the `features` key in `aw_info.json` (e.g., `features.gh-aw-detection: true`). Use this field directly — do not infer detection status by scanning `.lock.yml` files. | ||
|
|
Comment on lines
+76
to
+85
| For each run, classify it as: | ||
| - **Detection-enabled**: `features.gh-aw-detection` is `true` in the run metadata | ||
| - **Regular**: `features.gh-aw-detection` is `false`, absent, or unset | ||
|
|
||
| Collect per-run: | ||
| - `workflow_name` | ||
| - `status` (success / failure / cancelled / timed_out) | ||
| - `total_tokens` (from `aw_info.json`) | ||
| - `engine_id` | ||
| - `detection_enabled` (boolean) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduces a daily agentic workflow that audits
gh-aw-detectionfeature usage across all workflow runs, surfaces misconfigured workflows, and publishes a comparison chart of regular vs. detection-enabled runs.New workflow:
detection-analysis-reportschedule: daily+workflow_dispatchagentic-workflowsMCPlogstool — readsfeatures.gh-aw-detectionfrom each run'saw_info.jsonfeatures.gh-aw-detection: true) vs. regular (absent/false)Misconfiguration detection
Flags four patterns:
Charts
cache-memory/trending/detection-metrics/history.jsonlOutput
Publishes a GitHub Discussion via
shared/daily-audit-charts.mdwith 3-day expiry and automatic cleanup of older reports.