Skip to content

fix(#6205): strip [bot] suffix from bot-login constants in nextwork.py - #6206

Open
fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/6205-fix-bot-login-suffix
Open

fix(#6205): strip [bot] suffix from bot-login constants in nextwork.py#6206
fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/6205-fix-bot-login-suffix

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

Summary

Strip the [bot] suffix from the five bot-login constants in nextwork.py so they match GraphQL-sourced author.login values. GitHub's GraphQL API returns bot logins without the [bot] suffix (e.g., fullsend-ai-review not fullsend-ai-review[bot]), causing all bot-identity comparisons to silently fail. This fix enables correct classification of PRs with bot-only review threads as waiting_fix/trigger_fix instead of needs_review_decision.

Related Issue

Fixes #6205

Changes

  • Remove [bot] suffix from REVIEW_BOT_LOGIN, CODER_BOT_LOGIN, TRIAGE_BOT_LOGIN, RETRO_BOT_LOGIN, and PRIORITIZE_BOT_LOGIN constants (L262-266)
  • Update pr_node_sample.json test fixture to use GraphQL-style logins (no [bot] suffix)
  • Update agent_comment() test helper and all test data to use un-suffixed logins consistently
  • Add TestBotLoginMatching test class with 11 targeted tests covering thread_is_bot_only(), _is_agent_bot_comment(), and _is_trusted_fs_commenter() with GraphQL-style logins

Testing

  • All 193 tests pass (python3 -m unittest nextwork_test -v)
  • New TestBotLoginMatching tests verify bot-login constants have no [bot] suffix and that all three affected functions correctly match GraphQL-style logins
  • Secret scan passes
  • Gitlint passes

Closes #6205

Post-script verification

  • Branch is not main/master (agent/6205-fix-bot-login-suffix)
  • Secret scan passed (gitleaks — 080b030688e176c83c6b53f3603942c9f908590c..HEAD)
  • PR body secret scan passed (gitleaks — no-git)

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
@fullsend-ai-coder
fullsend-ai-coder Bot requested a review from a team as a code owner August 13, 2026 19:55
@fullsend-ai-coder fullsend-ai-coder Bot added the ready-for-review Agent PR ready for human review label Aug 13, 2026
@fullsend-ai-review

fullsend-ai-review Bot commented Aug 13, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 7:57 PM UTC · Completed 8:10 PM UTC

Commit: b9cbd50 · View workflow run →

@codecov

codecov Bot commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@fullsend-ai-review

Copy link
Copy Markdown

Review

Findings

Medium

Low

  • [stale-identifier-reference] skills/nextwork/SKILL.md:87 — The SKILL.md status catalog references fullsend-ai-review[bot] with the [bot] suffix in the waiting_fix description. The PR changes the Python constants to GraphQL-format logins (without [bot]). SKILL.md uses the canonical REST/UI form per docs/contributing/bot-identities.md, so updating is optional but would improve consistency with the code.

Labels: PR modifies skill files under skills/nextwork/

@fullsend-ai-review fullsend-ai-review Bot added requires-manual-review Review requires human judgment component/skills labels Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/skills ready-for-review Agent PR ready for human review requires-manual-review Review requires human judgment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nextwork.py: bot-login constants use REST-style [bot] suffix, never match GraphQL-sourced logins

1 participant