openlibrary
openlibrary copied to clipboard
`openlibrary-bot` comments trigger "Needs: Response" labeling
Problem
The new @openlibrary-bot account comments on issues and PRs in this repository. Whenever it makes a new comment, a Needs: Response label is added to the issue in error -- staff does not need to respond to such comments.
Reproducing the bug
- Go to ...
- Do ...
- Expected behavior:
- Actual behavior:
Context
- Browser (Chrome, Safari, Firefox, etc):
- OS (Windows, Mac, etc):
- Logged in (Y/N):
- Environment (prod, dev, local): prod
Breakdown
Implementation Details (for maintainers)
Requirements Checklist
- [ ]
Related files
Stakeholders
Instructions for Contributors
- Please run these commands to ensure your repository is up to date before creating a new branch to work on this issue and each time after pushing code to Github, because the pre-commit bot may add commits to your PRs upstream.
Status Overview
⚠️ Contributors, hold off picking this one up — it's already in the pipeline:
- [ ] Needs: Staff Decision — two open PRs independently fix this; a maintainer needs to pick one (or merge both) before either lands.
Context
- Root cause:
filter_issues()inscripts/gh_scripts/issue_comment_bot.pyonly excludes configured leads from counting as "someone who already responded" (last_commenter not in [lead["githubUsername"] for lead in leads]). It has never excluded bot accounts, so any@openlibrary-botcomment is treated as "needs a reply" by the nextnew_comment_digestcron run (.github/workflows/new_comment_digest.yml, daily 08:30). - This has happened before: #10487 reported the same root cause against Codecov's bot and was closed
NOT_PLANNEDbecause Codecov stopped commenting — the underlyingfilter_issues()gap was never patched, so it resurfaced withopenlibrary-bot. - Two independent fixes already exist, both touching
filter_issues():- #13139 (jimchamp, non-draft,
MERGEABLE,Closes #13138) — adds abotsarray to.github/workflows/config/new_comment_digest.json(config-driven allowlist) and ashould_label_issue()helper. - #13119 (
openlibrary-bot, opened 5 days before this issue, still draft, CI green) — broader: hardcodedEXEMPT_COMMENTER_LOGINS+user.typecheck, plus a newneeds_response_triage.ymlworkflow that reacts toNeeds: Responsebeing applied and strips it if the last commenter turns out to be a bot (backstop). - These overlap on the same function with different designs and will conflict if both are merged as written.
- #13139 (jimchamp, non-draft,
- Unrelated, spotted incidentally in the same file (pre-existing, not introduced by either PR):
except OSError, json.JSONDecodeError:instart_job()is Python 2 exception syntax — aSyntaxErrorunder Python 3.12+. Flagging for awareness; out of scope here.
Issue Assessment
Open questions
- Which PR should land — #13139 (narrower, ready now) or #13119 (broader, includes the
needs_response_triage.ymladdition, still draft)? - Is the
needs_response_triage.ymlworkflow in #13119 in scope for this issue, or should it be tracked separately from the bot-exclusion fix?
Action items
- [ ] Reconcile #13119 and #13139 — decide which lands, or merge the config-driven exemption approach with the triage-workflow backstop.
Full triage checklist (maintainers / Richy)
- [x] Triage — correct labels applied or removed
- [x] Problem / opportunity — problem is clear, audience identified, actionable
- [x] Scope — issue is well-scoped; does not try to do too many things
- [x] Justification — reasoning and impact stated; sufficient for leads to prioritize
- [x] Success & testing criteria — defines what "done" looks like, verifiable by a contributor
- [x] Proposal & breakdown — concrete plan present; checklist actionable for a contributor
- [ ] If bug: environment & repro steps — browser, version, local vs prod; steps to reproduce
- [x] Risks, concerns, open questions — identified and surfaced (any security or privacy implications?)
- [x] Richy context — relevant code, commits, PRs reviewed; no duplicate issue found
- [x] References — screenshots, designs, docs, and links present where needed
[!NOTE] This comment was automatically generated by Richy, via PAM, Open Library's Project AI Manager, on behalf of @mekarpeles. Richy is designed to provide status visibility, perform basic project management functions and relevant codebase research, and provide actionable feedback so contributors aren't left waiting.