feat(integrity-analysis): add per-user analysis of filtered events#22298
Merged
feat(integrity-analysis): add per-user analysis of filtered events#22298
Conversation
…22253) Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/gh-aw/sessions/dfd8b94e-6f19-4c64-82aa-9b7c87469f82
Copilot
AI
changed the title
[WIP] Add per-user analysis of filtered events to daily integrity analysis
feat(integrity-analysis): add per-user analysis of filtered events
Mar 22, 2026
Copilot stopped work on behalf of
pelikhan due to an error
March 22, 2026 18:10
Contributor
There was a problem hiding this comment.
Pull request overview
Adds per-author_login bucketing to the daily DIFC integrity analysis workflow and extends the report with a new top-users chart and per-user reporting sections.
Changes:
- Extend the bucketization summary to include
by_usercounts keyed byauthor_login. - Add “Chart 4” generation instructions for a top-20 users horizontal bar chart and include it in the upload list.
- Update the discussion report template to include a per-user breakdown table and per-user analysis section embedding the new chart.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if not events: | ||
| print("No events to analyze.") | ||
| summary = {"total": 0, "by_tool": {}, "by_server": {}, "by_reason": {}, "by_hour": {}, "by_day": {}, "by_workflow": {}} | ||
| summary = {"total": 0, "by_tool": {}, "by_server": {}, "by_reason": {}, "by_hour": {}, "by_day": {}, "by_workflow": {}, "by_user": {}} |
There was a problem hiding this comment.
In the not events branch, summary.json is written with a different schema than the non-empty case (it omits integrity_tags and secrecy_tags). Since downstream steps/charts expect these keys to exist (even if empty), consider including them (and any other always-present keys) here as empty dicts to keep the summary schema consistent across runs.
Suggested change
| summary = {"total": 0, "by_tool": {}, "by_server": {}, "by_reason": {}, "by_hour": {}, "by_day": {}, "by_workflow": {}, "by_user": {}} | |
| summary = { | |
| "total": 0, | |
| "by_tool": {}, | |
| "by_server": {}, | |
| "by_reason": {}, | |
| "by_hour": {}, | |
| "by_day": {}, | |
| "by_workflow": {}, | |
| "by_user": {}, | |
| "integrity_tags": {}, | |
| "secrecy_tags": {}, | |
| } |
This was referenced Mar 22, 2026
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.
Adds
author_login-level bucketing and visualization to the daily DIFC integrity analysis workflow, complementing the existing per-tool and per-workflow breakdowns.Changes
bucketize.pyby_usercounter keyed byauthor_login, written intosummary.jsonChart 4 —
chart_users.pyBAR_COLOR = "#4CAF50") to visually distinguish from existing charts/tmp/gh-aw/integrity/charts/top_users.png, uploaded as a workflow assetDiscussion report template
👤 Per-User Breakdown— collapsible table of all users with event counts🔍 Per-User Analysis— embeds Chart 4 with guidance to distinguish automated actors (bots, Copilot agents) from human contributorsWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/graphql/usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw(http block)/usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw jPKw-s1_GrLj(http block)/usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw journal-or-kmsg(http block)https://api.github.com/repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b/usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha(http block)/usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha eference/cross-repository.md(http block)https://api.github.com/repos/github/gh-aw/usr/bin/gh gh api /repos/github/gh-aw --jq .visibility(http block)/usr/bin/gh gh api /repos/github/gh-aw --jq .visibility c/content/docs/rremote.origin.url config r: $owner, name: $name) { hasDiscussionsEnabled } } remote.origin.ur/usr/bin/gh(http block)https://api.github.com/repos/githubnext/agentics/git/ref/tags//usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/# --jq .object.sha(http block)/usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/# --jq .object.sha eference/glossary.md(http block)If you need me to access, download, or install something from one of these locations, you can either:
📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.