Repository navigation
fix(poll): stop merged committed-bot PRs from sticking as open - #46
Conversation
The committed-PR bot query searched every PR a bot opened (for anyone) with the full field selection; at 100 nodes it timed out on most polls, so it only ever got the half-size retry through. That degraded page made the poller carry the bot's previous PRs forward indefinitely, including ones that had since merged, which an is:open search can never return to clear them. - searchCommittedPRs: light candidate search (id + commitAuthors), then nodes(ids:) with the full selection for only the viewer's PRs. - droppingFinished: vet carried-forward PRs with one cheap state lookup and drop the ones GitHub reports MERGED/CLOSED (unknown is kept). - mainline.poll.carried_forward_dropped counter.
✅ No issues foundDocs-only delta: CLAUDE.md now describes the paged committed-PR fetch and the page-cap degraded report, matching GitHubClient. Prior threads are resolved; nothing new found. Checked: 3 of 5 changed files read · no possible issues found Progress: open review threads 1 → 1 → 0 across the last 3 reviews Review details
Found Quality — produced 0 → posted inline 0 · cleared 0 · carried forward 0 · deferred 0 · below-bar 0 Run full · 4 lines in delta · tier deep · depth checkout Nothing to report — optimality (skipped), measurability (skipped), severity, 0 files skipped.
|
A busy org bot has more than one 100-node page of open PRs (130 for dash0-dev), and the viewer's PRs can sit past rank 100. Page through up to committedSearchMaxPages pages and report the result degraded when results are left unread, so the poller carries those PRs forward instead of dropping them and re-notifying them as new. Addresses review by @mthines: #46 (comment)
Hoist the five copies of the GraphQL FORBIDDEN check into one [GraphQLError].containsForbidden helper.
Addresses review by @mthines: #46 (comment)
|
Darkplane auto-approval is enabled for this repository (mode: Auto-approve). Trigger an evaluation for this pull request when it is ready: |
Why
Bot-opened PRs you committed to (e.g.
dash0-dev[bot]) stayed in the deck as open drafts long after they merged. The committed-PR search returns every PR the bot opened for anyone (130 right now), and with the full field selection a 100-node page hit GitHub's time budget (502/504) on most polls. The half-size retry made the poller treat the query as incomplete, so it carried the bot's previous PRs forward. Merged ones can never come back through anis:opensearch, so nothing ever removed them.What changed
searchCommittedPRsfetches in two steps: a light search (onlyid+ commit authors, about 2.3s per 100 nodes, paged up to 5 pages), thennodes(ids:)with the full fields for just your PRs. Results left unread at the page cap are reported as incomplete.fetchPRStates), anddroppingFinisheddrops the ones GitHub reports MERGED/CLOSED. A PR with an unknown state is kept, so it can't re-notify as new.mainline.poll.carried_forward_dropped; CLAUDE.md anddocs/telemetry.mdupdated.How to verify
PollCarryForwardCheckspass, and fail whendroppingFinishedis turned into a no-op. Debug build is green.