fix: make *[bot] actor filter match GraphQL bot authors#1516
Open
wwhsaber wants to merge 3 commits into
Open
Conversation
GraphQL author.login for bots omits the REST/UI [bot] suffix (e.g. "github-actions" with __typename Bot), so exclude_comments_by_actor: "*[bot]" was a silent no-op. Request __typename, normalize Bot logins for matching, and add GraphQL-shaped fixture tests. Closes anthropics#1514
wwhsaber
force-pushed
the
fix/bot-actor-wildcard-graphql
branch
from
July 20, 2026 03:14
70afaa6 to
da6b88f
Compare
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.
What
Make
exclude_comments_by_actor/include_comments_by_actor*[bot]wildcard actually match bot comments fetched via GraphQL.Why
GraphQL
author.loginfor bots has no[bot]suffix (e.g."github-actions","claude"with__typename: "Bot"). The matcher only checkedactor.endsWith("[bot]"), which is a REST/UI convention the GraphQL path never produces — so*[bot]was a silent no-op and bot comments (including the action's own tracking comments) still entered the prompt context.Closes #1514
Changes
author { __typename login }inPR_QUERY/ISSUE_QUERY__typenameonGitHubAuthornormalizeActorLogin(): when__typename === "Bot"and login lacks[bot], append[bot]for matching (REST convention)filterCommentsByActorbefore include/exclude checks (does not mutate stored login for display)normalizeActorLogin+ GraphQL-shaped matchingfilterCommentsByActortests (github-actions/claude/dependabotwith__typename: "Bot")*[bot]fixtures still passVerification
bun install bun test test/actor-filter.test.ts test/data-fetcher.test.tsAll 110 tests pass (including new GraphQL-shaped cases).