-
Notifications
You must be signed in to change notification settings - Fork 2k
Restrict /review rerun eligibility to author activity #35874
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
129b09d
Restrict review rerun eligibility to author activity
Copilot 7aa823e
Fix rerun scanner candidate prompt handoff
Copilot ace4373
Checkout scripts before rerun scanner pre-activation
Copilot 6579016
Handle stale rerun scanner PR decisions cleanly
Copilot 3939e24
Address rerun scanner review feedback
Copilot f264273
Address rerun scanner safe-output review feedback
Copilot 0e519c1
Fix rerun scanner PR fetch stderr handling
Copilot df5f314
Scope rerun candidate-query failure handling to gh pr list
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Test Quality — this test name overclaims; the "no bot evidence" assertions are satisfied by the pre-existing
user.type -eq 'Bot'filter, not by the new normalizationFlagged by: 2/3 reviewers explicitly + 1 supporting non-finding (provenance: round-2 introduced)
The round-2 fix added
Normalize-GitHubActorLoginand applies it insideTest-CommentIsEvidence(check #4 — author equality, now normalized). But check #6 in the same function still unconditionally rejectsComment.user.type -eq 'Bot'— that line survived round-2 unchanged. So for a bot-authored PR, the bot's own comments are rejected at #6 regardless of whether #4 matches.Empirically verified by dot-sourcing the function:
Test-CommentIsEvidence(botComment, PRAuthorLogin='app/dependabot')→False(rejected at [Spec] Transitions #6, even though Aloha System.Maui! #4 now passes)Normalize-GitHubActorLoginfrom insideTest-CommentIsEvidenceand running this test: still passes — becauseNew non-command author comments: 0is satisfied by [Spec] Transitions #6, andShould -Not -Match 'Dependabot follow-up'is satisfied by the rendering loop which filters via the sameTest-CommentIsEvidence.Should -Match 'PR author: dependabot[bot]'(rendering the normalized author).Implication: the fix is decision-neutral for bot evidence — its only functional effect is the displayed
PR author:line in the context markdown (an advisory input to the AI scanner; the deterministic evidence counts are unaffected). Constructing a non-bot comment whoseuser.loginneedsapp/→[bot]normalization to match the author is not a realistic scenario — REST issue/PR comments always emit bot logins in theX[bot]form, neverapp/X.Fix: either (a) rename this test to focus solely on display normalization (
renders normalized app-style bot author in context markdown) and remove the misleading "without counting bot comments as evidence" claim, or (b) split into two tests: one for the display (passes with the fix), one for bot-comment-rejection (passes regardless, documenting the #6 filter as the actual gate). Also worth removing theNormalize-GitHubActorLogincall insideTest-CommentIsEvidenceitself — it's dead code given check #6 — though leaving it as defensive symmetry is also defensible.