fix: cut GitHub API spend on coverage, etags, feedback, CI, and releases - #179
Merged
Conversation
Issue coverage now reads persisted GitHub open counts from the issue sweep instead of hitting GET /search/issues on every UI poll.
Open PR lists survive restart via github_etags.payload so a 304 no longer re-paginates. Issue sweeps use the conditional page-1 body instead of fetching it twice.
Probe comment/review lists with If-None-Match and skip the nested GraphQL lookup on a 304. Shrink thread comment pages from 100 to 20.
Commit status and check-run results for a settled SHA are loaded once per Octokit client and shared across poll, snapshot, and failure helpers.
listMergedPullsSince now walks closed PRs page by page and stops when updated_at is older than the since bound or the merge-sha boundary hits.
Contributor
📄 Documentation Review ReminderThis PR changes source files but does not update any public documentation. Changed source files: Please check if documentation in
Available docs: getting-started.md, pr-babysitter.md, agent-dispatch.md, configuration.md, pr-questions.md |
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.
Summary
Stops PatchDeck from burning GitHub quota on repeated reads of data it already has.
GET /search/issueson every UI poll. The Issues page reads persistedgithubOpenCountfrom the issue sweep (GraphQLtotalCount, ~1 point).If-None-Match; an all-304 skips the nested review-thread GraphQL query. Nested comment pages drop from 100 to 20.listMergedPullsSincestops paging closed PRs onceupdated_atis older than the since bound.Commits
fix: stop Search API polling for issue coveragefix: persist PR list etags and reuse issue page 1fix: skip review-thread GraphQL when PR comments are unchangedfix: reuse settled CI status fetches for a commit SHAfix: stop paging closed PRs once the release since-bound is passedPlan:
docs/plans/github-rate-limit-cache.mdTest plan
npm test(715 passing)npx tsx --test client/src/lib/*.test.ts(90 passing)npm run checksynced N / GitHub Mstill renders after a sweep./api/issues/coverageshould not call Search.