Add log-searching-agent workflow with inline preflight search#548
Add log-searching-agent workflow with inline preflight search#548
Conversation
New workflow that downloads GitHub Actions logs for a specified workflow, searches them for caller-supplied terms (comma-separated exact matches), and hands the search results to an AI agent for pattern analysis and triage issue creation. All preflight logic is inline in the workflow frontmatter steps to support workflow_call without external script references. Co-authored-by: strawgate <6384545+strawgate@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThis pull request introduces a Log Searching Agent workflow system for GitHub Actions that downloads and searches workflow logs for specified terms within a configurable time window, then analyzes results using an AI agent to identify patterns and file triage issues. The implementation comprises a reusable workflow definition with multi-stage execution (pre-activation, activation, agent, safe outputs, conclusion), a Markdown specification, documentation, an example workflow file, and updates to the dogfood exclusion script. Possibly related PRs
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment |
|
|
||
| ## Safe Outputs | ||
|
|
||
| - `create-issue` — file a log search investigation report (max 1, auto-closes older reports) |
There was a problem hiding this comment.
[LOW] Safe output behavior description does not match workflow config
This README says create-issue will "auto-close older reports", but the workflow config sets close-older-issues: false (in .github/workflows/gh-aw-log-searching-agent.md). That mismatch can mislead users about issue lifecycle behavior.
| - `create-issue` — file a log search investigation report (max 1, auto-closes older reports) | |
| - `create-issue` — file a log search investigation report (max 1) |
|
@copilot Will be feasible to execute this log-searching-agent over all the defined workflows in the repository? |
…rom main) Co-authored-by: fr4nc1sc0-r4m0n <215478872+fr4nc1sc0-r4m0n@users.noreply.github.com>
Yes — the caller's trigger workflow can use a GitHub Actions matrix strategy to fan out over all (or a subset of) workflows. For example: jobs:
discover:
runs-on: ubuntu-latest
outputs:
workflows: ${{ steps.list.outputs.workflows }}
steps:
- id: list
run: |
workflows=$(gh api repos/${{ github.repository }}/actions/workflows \
--jq '[.workflows[].path | split("/")[-1]] | tojson')
echo "workflows=$workflows" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ github.token }}
search:
needs: discover
strategy:
matrix:
workflow: ${{ fromJSON(needs.discover.outputs.workflows) }}
uses: elastic/ai-github-actions/.github/workflows/gh-aw-log-searching-agent.lock.yml@v0
with:
workflow: ${{ matrix.workflow }}
search-terms: "OutOfMemoryError, DEADLINE_EXCEEDED"
secrets:
COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}Each matrix leg runs the preflight search + agent independently, so you get a separate triage issue per workflow when actionable findings exist. The |
|
@strawgate Do you think we can merge this? |
.github/workflows/gh-aw-log-searching-agent.md— workflow definition with inline preflight scriptgh-agent-workflows/log-searching-agent/example.yml— trigger file withworkflow_dispatchinputsgh-agent-workflows/log-searching-agent/README.md— documentationscripts/dogfood.sh.lock.ymlgenerated✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.