Repository navigation
Conversation
egm-triage-bot
left a comment
There was a problem hiding this comment.
Automated first-pass review found zero blocking or major issues. Routing to @google/egm-maintainers for maintainer review.
seanstappas
left a comment
There was a problem hiding this comment.
Looks good overall. The actor guards in .github/scripts/review_pr.py and .github/workflows/pr-triage-review.yml ignore non-bot SHA markers while keeping dedup working for egm-triage-bot and github-actions[bot]. I left three optional, non-blocking suggestions covering bot allowlist scope and two extra test branches. Ready to merge once the Tests workflow is approved and green.
| const state = createHarness({ | ||
| existingReviews: [{ body: '<!-- egm-triage-review:sha=abc12345 -->\nClean pass.' }], | ||
| existingReviews: [{ | ||
| user: { login: 'egm-triage-bot', type: 'User' }, |
There was a problem hiding this comment.
Non-blocking suggestion: updating this case to egm-triage-bot leaves the type === "Bot" arm untested. Adding cases for github-actions[bot] (type: 'Bot') and a deleted reviewer (user: null) would exercise the full isBot check.
There was a problem hiding this comment.
Added tests for github-actions[bot] (type[bot]) and a deleted reviewer (user: null) in the latest commit
| assert not same_sha.should_review | ||
| assert same_sha.reason == "SKIP_SHA_ALREADY_REVIEWED:deadbeef" | ||
|
|
||
| spoofed = { |
There was a problem hiding this comment.
Non-blocking suggestion: same_sha above only covers github-actions[bot] in reviews. Adding a SKIP_SHA_ALREADY_REVIEWED check for egm-triage-bot (type: "User", author_association: "MEMBER") and a bot-authored marker in issue_comments would pin the primary paths too.
There was a problem hiding this comment.
Added cases for an egm-triage-bot marker (type User, MEMBER) in both reviews and issue comments.
|
@seanstappas |
Summary of Key Changes
EECS 481 (University of Michigan) student contribution.
The triage bot skips a PR head when it finds its SHA marker
(
<!-- egm-triage-review:sha=<head> -->) in a review or comment, but it neverchecked who posted the marker. A PR author or any commenter could paste the
marker and suppress the automated review, the
triage: passedlabel, andmaintainer routing for that head. Copying a bot comment's raw Markdown had the same effect.
review_pr.py:evaluate_sweep_gateonly honors markers from bot actors(
_is_bot_actor, which already coversegm-triage-botand[bot]accounts).The trusted-human check is unchanged.
pr-triage-review.yml: the duplicate-post guard only honors markers inreviews from
Bot-type users oregm-triage-bot(the PAT and theGITHUB_TOKENfallback identities).the gate; a human review marker no longer suppresses posting. The existing
duplicate-post test now uses a bot-authored review.
Contribution Type
Track: Bug Fix / Minor Patch
Verification
pytest tests/unit(Windows 11, Python 3.13.2, Node 22.12.0): all pass exceptthe 16 symlink tests that need Developer Mode, which fail identically on
main.ruff check .: passed.git diff --check: passed.actionlint: not run locally.egm-triage-bot(typeUser),which is in
BOT_AUTHORS.Human Accountability Affirmation