Add error/warning summary to logs command with pattern IDs#2212
Merged
Add error/warning summary to logs command with pattern IDs#2212
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update logs command to summarize errors and warnings
Add error/warning summary to logs command with pattern IDs
Oct 23, 2025
Contributor
|
Agentic Changeset Generator triggered by this pull request. |
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.
Overview
Adds error and warning summary tables to the
gh aw logscommand, sorted by frequency of occurrence. Each summary entry includes the error message, occurrence count, pattern ID, engine name, and a link to a sample run where the error occurred.Changes
Error Pattern ID System
Added a unique
IDfield to theErrorPatternstruct to identify each error pattern:All error patterns now have unique IDs:
common-gh-actions-error,common-generic-warning, etc.codex-rust-error,codex-rust-warningEnhanced Error Tracking
The
LogErrorstruct now includes aPatternIDfield to track which pattern matched each error, enabling aggregation and analysis by pattern type.Summary Tables
Added two new summary tables to the logs output:
Summaries are sorted by frequency (descending) to highlight the most common issues.
JSON Output
The summaries are also available in JSON format via the
--jsonflag:{ "errors_summary": [ { "message": "Authentication failed", "count": 15, "pattern_id": "common-generic-error", "engine": "copilot", "run_id": 12345, "run_url": "https://github.com/test/repo/actions/runs/12345" } ] }Schema Update
Updated the
error_patternsJSON schema to support the optionalidfield for custom error patterns defined in workflow frontmatter.Benefits
Testing
Added comprehensive test coverage:
All tests passing ✅
Fixes issue requesting error/warning summaries sorted by frequency with pattern IDs and run links.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.