Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
nhopeatall
approved these changes
Apr 23, 2026
Collaborator
nhopeatall
left a comment
There was a problem hiding this comment.
Summary
LGTM! The fix correctly widens the author check to include both the implementer and reviewer personas when authorMode is own, resolving the core bug. The tests are comprehensive and the log field renaming accurately reflects the new logic.
Nitpicks
- In
src/triggers/github/utils.ts, you could potentially reuseisCascadeBot(prAuthorLogin, personaIdentities)fromsrc/github/personas.tsinstead of manually checking the logins and[bot]suffixes. However, the current explicit implementation is perfectly fine and logically identical.
🕵️ opencode · google/gemini-3.1-pro-preview · run details
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
evaluateAuthorMode()only checked the implementer persona when deciding if a PR is "own" — PRs authored by the reviewer persona were wrongly treated as "external"evaluateAuthorMode()to acceptPersonaIdentities(bothimplementer+reviewer) and check both logins when computingisCascadePRsrc/triggers/github/utils.ts), 2 log-field renames in callers, 3 test files updatedCard: https://trello.com/c/DCCWFftf/622-lets-make-sure-trigger-review-when-ci-checks-pass-on-a-pr-on-ci-passed-when-set-to-author-filter-own-properly-includes-both-pers
Changes
src/triggers/github/utils.tspersonaIdentitiesparameter type from{ implementer: string }toPersonaIdentities(imports from../../github/personas.js)isReviewerPRcheck alongsideisImplementerPRisCascadePR = isImplementerPR || isReviewerPRAuthorModeResult.isImplementerPR→AuthorModeResult.isCascadePR(diagnostic field used only for logging)src/triggers/github/check-suite-success.ts+pr-opened.tsisImplementerPR→isCascadePRin bothhandle()methodsTests
tests/unit/triggers/github-utils.test.ts: Addeddescribe('evaluateAuthorMode')block with 12 test cases covering all persona × authorMode combinationstests/unit/triggers/check-suite-success.test.ts: Added 2 new tests for reviewer persona behaviortests/unit/triggers/pr-opened.test.ts: Fixed incorrect test that asserted reviewer-persona PRs should fire onauthorMode=external(wrong behavior); added new test forauthorMode=ownKey decisions
isImplementerPR→isCascadePRonAuthorModeResultto reflect that "own" now means "authored by any CASCADE persona", aligning with the existingisCascadeBot()functionTest plan
npm run lint— zero errorsnpm run typecheck— zero errorstests/unit/worker-entry.test.tshas a pre-existing failure onorigin/devunrelated to this PR (confirmed: same failure exists without these changes)🤖 Generated with Claude Code
🕵️ claude-code · claude-sonnet-4-6 · run details