Skip to content

fix(needs-response): exempt bots from Needs: Response, add safe label triage#13119

Open
openlibrary-bot wants to merge 2 commits into
masterfrom
fix/needs-response-bot-exclusion
Open

fix(needs-response): exempt bots from Needs: Response, add safe label triage#13119
openlibrary-bot wants to merge 2 commits into
masterfrom
fix/needs-response-bot-exclusion

Conversation

@openlibrary-bot

Copy link
Copy Markdown
Collaborator

Summary

Two related fixes to Needs: Response handling.

1. issue_comment_bot.py: bots were triggering Needs: Response

filter_issues() only excluded configured leads from counting as "someone who already responded" — any bot's comment, including openlibrary-bot's own Richy enrichment comments, would be treated as "a human left a comment, needs a reply" and get Needs: Response applied on the next daily digest run.

Verified openlibrary-bot reports user.type: "User" (it's a PAT-authenticated account, not a registered GitHub App), so a bare user.type == 'Bot' check alone would not catch it. Added an explicit EXEMPT_COMMENTER_LOGINS set alongside the type check, covering both registered bot apps (github-actions[bot], etc.) and PAT-based bot accounts.

2. New needs_response_triage.yml/.md: safe, label-only agentic pass

Runs whenever an issue is labeled Needs: Response. This is a deliberately narrow subset of Fonzie's (pm/.claude/commands/ol-needs-response.md) taxonomy — specifically the two classes that are purely mechanical label swaps with no drafted text:

  • Assignment request → swap to Needs: Assignment Review
  • Missing triage, not actually a pending response → swap to Needs: Triage
  • Plus a backstop: if the last commenter is a bot despite fix Add a setup.py #1, remove the label directly

It never posts a comment, closes an issue, or assigns anyone. Fonzie's actual judgment calls (technical questions, design decisions, blocked contributors) remain an interactive session with Mek's review — unchanged.

All label names used (Needs: Assignment Review, Needs: Triage) verified against the real label list.

Testing

Pre-commit passed on all local-runnable hooks (ruff, mypy). generate-pot skipped — requires Docker/infogami, and this change contains no translatable strings.

Related

mekarpeles and others added 2 commits July 3, 2026 22:59
… triage

Two related fixes:

1. issue_comment_bot.py's filter_issues() only excluded configured
   leads from triggering 'Needs: Response' -- any bot's comment,
   including openlibrary-bot's own Richy enrichment comments, would be
   treated as 'a human left a comment, needs a reply' and get labeled
   accordingly. Verified openlibrary-bot reports as user.type 'User'
   (it's a PAT-authenticated account, not a registered GitHub App), so
   a bare user.type == 'Bot' check alone would not catch it -- added
   an explicit EXEMPT_COMMENTER_LOGINS set alongside the type check to
   cover both registered bot apps and PAT-based bot accounts.

2. New needs_response_triage.yml/.md: a narrow, label-only agentic pass
   that runs whenever an issue is labeled 'Needs: Response'. This is a
   safe subset of Fonzie's (pm/.claude/commands/ol-needs-response.md)
   taxonomy -- specifically the two classes that are purely mechanical
   label swaps with no drafted text (assignment_request, needs_triage),
   plus a backstop for any bot-comment false positive #1 didn't
   anticipate. It never posts a comment, closes an issue, or assigns
   anyone -- Fonzie's actual judgment calls (technical questions,
   design decisions, blocked contributors) remain an interactive
   session with Mek's review, unchanged.

Note: generate-pot pre-commit hook skipped -- it requires Docker/infogami
(not available locally) and this change contains no translatable strings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a setup.py

2 participants