Conversation
The "Pull requests waiting on a reply" check only read
/issues/{n}/comments, so a formal pull request review was invisible to
it. PR #146 carries a substantive maintainer review submitted after the
last commit and nothing else but a changeset bot comment, so the
watchdog reported it every morning as "open 13d, no reply". A watchdog
that cries wolf trains its reader to ignore it, which is how the last
silent failure went unnoticed for weeks.
A PR now counts as replied to when a non-bot, non-author response exists
that is newer than the PR's latest commit, counting both issue comments
and reviews (via each review's submitted_at). The head commit date comes
from /commits/{sha} and is shape-checked like every other call; the new
/pulls/{n}/reviews call gets the same expect_array guard, so a
non-array payload fails the job loudly instead of reading as "no
replies". Bot exclusion keeps the existing user.type != "Bot" test.
Anchoring to the last commit also fixes the opposite error: #125 had
been answered once, but the author pushed again afterwards, so the ball
is back with the maintainer and the old check stayed silent.
Both API calls use per_page=100 without pagination, matching the
existing comments call — a PR with more than 100 comments or reviews has
had attention by any definition.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NBQQpA86yYzwJUiVz8ph2R
|
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 was wrong
The "Pull requests waiting on a reply" check in
.github/workflows/maintenance-watch.ymlonly read/issues/{n}/comments. A formal pull request review was invisible to it.PR #146 is the live proof. Verified against the API:
f176ded2026-09-09T08:39:17Zmoshest(stateCOMMENTED, on that head)2026-09-19T11:53:57Zchangeset-bot[bot]The author has pushed nothing since the review, yet the watchdog reported
#146 … — open 13d, no replyevery morning. A watchdog that cries wolf trains its reader to ignore it, which is exactly how the last silent failure went unnoticed for weeks.What changed
A PR now counts as replied to when a non-bot, non-author response exists that is newer than the PR's latest commit, counting both sources:
/issues/{n}/comments,created_at)/pulls/{n}/reviews,submitted_at) — newThe last-push timestamp comes from
/commits/{head.sha}. Notes on staying in the file's existing style:/pulls/{n}/reviewscall gets the sameexpect_arrayguard;/commits/{sha}getsexpect_objectplus an explicit check that a commit date was actually present, so a404body (which is a valid object) fails the job loudly instead of quietly reading as "no replies"..user.type != "Bot"test rather than inventing a login-matching convention; GitHub setstype: "Bot"for[bot]logins andgithub-actions, which the fixtures below confirm. Author exclusion (.user.login != $author) is new, as the "non-author" rule requires.per_page=100with no pagination, exactly like the existing comments call. Noted in a comment: a PR with more than 100 comments or reviews has had attention by any definition.Anchoring to the last commit also fixes the opposite error. #125 had been answered once (review
2026-09-21), but the author pushed again on2026-09-22— the ball is back with the maintainer, and the old check stayed silent about it because an old human comment existed.How it was tested
No
actionlintoryamllintis available in this environment, so validation was done by hand:yaml.safe_load), and bothrun:scripts extracted from the parsed workflow passbash -n.github-actions[bot])submitted_at: null)APPROVEDreview after the push#146(false positive), misses#125#146clears,#125flagged asno reply since the last push(true positive)No changeset: this is CI tooling, not a published package.
🤖 Generated with Claude Code
https://claude.ai/code/session_01NBQQpA86yYzwJUiVz8ph2R
Generated by Claude Code