fix(#6205): strip [bot] suffix from bot-login constants in nextwork.py - #6206
Open
fullsend-ai-coder[bot] wants to merge 1 commit into
Open
fix(#6205): strip [bot] suffix from bot-login constants in nextwork.py#6206fullsend-ai-coder[bot] wants to merge 1 commit into
fullsend-ai-coder[bot] wants to merge 1 commit into
Conversation
The five bot-login constants (REVIEW_BOT_LOGIN, CODER_BOT_LOGIN, TRIAGE_BOT_LOGIN, RETRO_BOT_LOGIN, PRIORITIZE_BOT_LOGIN) used REST-style logins with a [bot] suffix, but nextwork.py fetches author logins via GraphQL which returns them without the suffix. This caused all bot-identity comparisons to silently fail: thread_is_bot_only() never matched review-bot threads, _is_agent_bot_comment() never recognized bot status comments, and _is_trusted_fs_commenter() never trusted bots directly. PRs with only bot-authored unresolved threads were misclassified as needs_review_decision instead of routing to the fix agent via waiting_fix/trigger_fix. Strip the [bot] suffix from all five constants so they match GraphQL-sourced logins. Update the test fixture and all test data to use un-suffixed logins consistently. Add targeted unit tests for thread_is_bot_only, _is_agent_bot_comment, and _is_trusted_fs_commenter with GraphQL-style logins. Note: pre-commit could not run (sandbox network policy blocked git fetch during hook initialization). The post-script runs pre-commit authoritatively on the runner. Closes #6205
|
🤖 Finished Review · ✅ Success · Started 7:57 PM UTC · Completed 8:10 PM UTC Commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
ReviewFindingsMedium
Low
Labels: PR modifies skill files under skills/nextwork/ |
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
Strip the
[bot]suffix from the five bot-login constants innextwork.pyso they match GraphQL-sourcedauthor.loginvalues. GitHub's GraphQL API returns bot logins without the[bot]suffix (e.g.,fullsend-ai-reviewnotfullsend-ai-review[bot]), causing all bot-identity comparisons to silently fail. This fix enables correct classification of PRs with bot-only review threads aswaiting_fix/trigger_fixinstead ofneeds_review_decision.Related Issue
Fixes #6205
Changes
[bot]suffix fromREVIEW_BOT_LOGIN,CODER_BOT_LOGIN,TRIAGE_BOT_LOGIN,RETRO_BOT_LOGIN, andPRIORITIZE_BOT_LOGINconstants (L262-266)pr_node_sample.jsontest fixture to use GraphQL-style logins (no[bot]suffix)agent_comment()test helper and all test data to use un-suffixed logins consistentlyTestBotLoginMatchingtest class with 11 targeted tests coveringthread_is_bot_only(),_is_agent_bot_comment(), and_is_trusted_fs_commenter()with GraphQL-style loginsTesting
python3 -m unittest nextwork_test -v)TestBotLoginMatchingtests verify bot-login constants have no[bot]suffix and that all three affected functions correctly match GraphQL-style loginsCloses #6205
Post-script verification
agent/6205-fix-bot-login-suffix)080b030688e176c83c6b53f3603942c9f908590c..HEAD)