ci: add agent guide and benchmark comparison#137
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #137 +/- ##
==========================================
- Coverage 74.79% 69.67% -5.13%
==========================================
Files 21 27 +6
Lines 2436 3706 +1270
Branches 667 1189 +522
==========================================
+ Hits 1822 2582 +760
+ Misses 297 211 -86
- Partials 317 913 +596 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
58f2acd to
f95ba4a
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds contributor/agent guidance and introduces CI automation to run and compare Google Benchmark results between a PR’s base and head commits, then publish the comparison as a sticky PR comment.
Changes:
- Added a root-level
AGENTS.mddescribing project structure, workflows, and contributor/agent guidance. - Added a benchmark comparison workflow that runs Bazel benchmarks on base/head, generates a Markdown summary, and uploads it as an artifact.
- Added a follow-up workflow that downloads the benchmark artifact and posts/updates a sticky PR comment with the results.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
scripts/tools/compare-benchmark.py |
New Python tool to diff two Google Benchmark JSON outputs and generate a Markdown summary. |
AGENTS.md |
New repository-level guide for agents and contributors (project shape, commands, conventions). |
.github/workflows/test_coverage.yml |
Splits Codecov upload behavior between PR vs push events and enables OIDC for push uploads. |
.github/workflows/benchmark_compare.yml |
New workflow to run base/head benchmarks, compare outputs, and upload artifacts. |
.github/workflows/benchmark_comment.yml |
New workflow to post/update a sticky PR comment based on the benchmark artifact. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
liuq19
approved these changes
May 11, 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.
Summary
AGENTS.mdguide for coding agents and contributors.scripts/tools/compare-benchmark.pyto generate Markdown benchmark summaries and fail on regressions above the configured threshold.Notes
master, later PRs can consume it directly.Validation
python3 -m py_compile scripts/tools/compare-benchmark.pypython3 scripts/tools/compare-benchmark.py /tmp/sonic_master_bench.json /tmp/sonic_master_bench.json --warn-threshold=3 --fail-threshold=5 --output=/tmp/sonic_benchmark_comment_test.mdgit diff --cached --checkbefore commit