Repository navigation
Conversation
Do not treat contributors' own label and draft-state events as maintainer engagement. Keep collaborator activity and closure signals unchanged so existing coverage and ready-label metrics retain their behavior. Cover the backlog counts, recommendations, closed-query shape, and written JSON sidecars with regression tests. Keep the generated magpie-security-tools dependency copy in sync. Generated-by: Codex (GPT-6)
Kaap10
left a comment
There was a problem hiding this comment.
LGTM! Thank you for the clean fix and thorough test coverage.
- Accurately addresses #2015 by ensuring contributor self-events (
ReadyForReviewEvent,ConvertToDraftEvent,LabeledEvent) do not falsely trigger maintainer engagement. - Safely handles casing discrepancies and deleted user accounts with
(author or "").lower(). - Preserves maintainer actions on contributor PRs and collaborator self-events.
- Full test suite passes cleanly with parity across both tool locations.
- reference.py (tool and plugin copy): name the open-PR timeline types AUTHOR_SELF_EVENT_TYPES next to OPEN_PRS_QUERY and use it in the engagement filter. - test_engagement.py: take EVENT_TYPES from reference instead of re-declaring it. Generated-by: Claude Opus 5
potiuk
left a comment
There was a problem hiding this comment.
Narrow, correct fix — a contributor's own ready-for-review, draft or label events no longer count as maintainer engagement, so their PRs stay in the untriaged backlog — with thorough regression tests and the plugin copy in sync. Rather than ask for another round over one small point, I pushed a fixup to your branch in ed03515:
tools/pr-management/src/pr_management/stats/reference.py(and the identical plugin copy): the event types the engagement filter excludes are now a named constant,AUTHOR_SELF_EVENT_TYPES, next toOPEN_PRS_QUERY, whoseitemTypeslist it mirrors — so a future change to the query and the filter are seen together.tools/pr-management/tests/stats/test_engagement.py:EVENT_TYPESnow comes from that constant instead of re-declaring the tuple.
Thanks for the careful fix!
This review was drafted by an AI-assisted tool and
confirmed by an Apache Magpie maintainer. The maintainer
approving this PR has read the findings and signed off. If
something feels off, please reply on the PR and a maintainer
will follow up.More on how Apache Magpie handles maintainer review:
Contributing guide.
Summary
LabeledEvent,ReadyForReviewEvent, andConvertToDraftEvent; preserve collaborator activity, closure actors, ready-label behavior, and label timestamps.Type of change
tools/pr-management/)Test plan
b6ccd434, six contributor regression cases fail and the other 30 targeted cases pass.prek run --all-files --skip workspace-pytestpasses, including lychee and the generated-plugin check.tools/pr-managementhas 795 passed and 15 subtests;pluginshas 114 passed and one container-permission probe skipped. Commit hooks were not bypassed.RFC-AI-0004 compliance
This corrects deterministic classification without adding fetched fields, configuration, dependencies, or service access.
Linked issues
Closes #2015.
Notes for reviewers
The PR is one commit based on upstream
main@b6ccd434.The four reviewed source/test blobs are unchanged; a fifth file is the generated magpie-security-tools copy of the classifier, byte-for-byte identical to the reviewed source.
A currently draft PR remains outside the untriaged non-draft counts.
The label case is defensive input coverage; ordinary external authors need repository triage permission to apply labels.
Closed-PR assertions deliberately retain legacy behavior within this repair's scope; they do not endorse contributor self-closure as maintainer engagement.
Strict actor authorization and comment/review engagement policy remain unchanged.
Suggested labels:
bug,family:pr-management,family:tools,capability:stats,capability:fix,substrate:analytics.Was generative AI tooling used to co-author this PR?
Generated-by: Codex (GPT-6).