Repository navigation
perf(update): the inventory asks for the Count's issues, and later pages only for what is left - #284
Merged
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
count-patchula | 1da5f04 | Commit Preview URL Branch Preview URL |
Nov 12 2026, 11:40 PM |
sweepies
force-pushed
the
perf/inventory-issues
branch
from
November 12, 2026 23:20
07aa677 to
7ee82fc
Compare
…ges only for what is left The first page asks everything once, with open issues filtered to the run's actor (createdBy) when a stored hint names it; continuation pages ask only the connections that still have pages, together, plus viewer and the default branch's head for the race check. A cold read that started unfiltered restarts its issue walk on the first page's viewer login. A wrong hint costs one request.
The split walk reads nodes(ids:$closed), the merge settings and the default branch's rules, history and update rule from its first page alone; the old single document re-asked them every page and the last answer won. A walk that pages now ends on one small re-read of exactly those fields, so a closed receipt that reopened mid-walk is acted on open again — the actor and head checks hold the closing page to the same bar as the continuations. The actor hint is stored as soon as the first page's viewer.login is known, even when the walk goes on to fail, so a cold repository never stays cold and the hundred-thousand-node budget is restored. A broken issue node authored by someone else is never received by the hinted read, and the inventory-actor state is documented. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
… the paged inventory
sweepies
force-pushed
the
perf/inventory-issues
branch
from
November 12, 2026 23:39
7ee82fc to
1da5f04
Compare
Merged
This was referenced Nov 13, 2026
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.
Consult 7, PR 4a. Every real run walked every branch and every open issue in one document per page, and each page repeated the issue bodies and the constants. On large repositories that was tens of pages at about 3.5 s each, on every run including a no-op.
issues(states: [OPEN], filterBy: {createdBy: $actor})when a stored hint names the run's actor (inventory-actorstate, per credential scope).createdBytakes the REST login of a bot (renovate[bot]), which isviewer.login. With no hint, or when the answer'sviewer.logindiffers, the read falls back to the unfiltered document and stores the login: a wrong hint costs one request.dashboard::issuestill scans the actor's open issues and still refuses two dashboards.viewer, the default branch's name and OID for the per-page race check, and only the connections that still have pages, together when both do (inventory-next.graphql), alone otherwise. A finished connection is never sent again.createdByset to that page'sviewer.login, alongside the remaining branch pages.No behaviour change.
Proof:
tests/inventory.rs: anInventorybuilt with the old single document and with the new ones over seeded fakes is equal, and so are the decisions taken from it. The fakes cover two dashboards by the actor plus one by another author, 101 issues, 250 branches, an unreadable node, a stale hint, and a cold read whose issues page and restart on the actor.dashboard.rspins the request sequence: coldfirst → next → issues → issues, warmfirst → next → issues.FakeGitHubmodelsissues(states:, filterBy: {createdBy}, first:, after:)and panics on anything it does not.fixtures/update/inventory.json(renovatebot/github-action, whose dashboardrenovate[bot]opened), replaying the unfiltered and then the filtered read through production code.Live inventory reads (requests):
Before, the same reads took about 100 s on mastodon and 79 s on grafana. The old code could not finish a cold sentry walk in 8 tries: each fat page widened the window for a branch race. What remains is branch pages; 4b reads only the Count's branches in steady state.