feat: v0.11 Sweep - #1
Merged
Merged
Conversation
Remembering page sizes doubled whole-org search requests and made the electron whole-org sweep slower (172 s median vs 109 s). The 403 waits follow the number of search requests, not timeouts, so smaller pages only add to them.
…ry for mergeability and reviews
hazeliscoding
marked this pull request as ready for review
September 28, 2026 14:02
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.
The v0.11 milestone from ROADMAP.md: every PR that needs a human shows up once, with the reason and the next step. This stays a draft until the milestone's "Done when" holds. Steps 1–9 are done: the performance groundwork, the data, the attention engine, the Sweep section, snooze and the tray line. Step 10 is the release.
It also carries
66008e9(build each roadmap release on its own branch), which was committed onmainlocally but never pushed.Done so far
Sweep timing. With
PRSWEEP_DEBUGset, every sweep logs one[sweep]line: mode, duration, requests and retries. Every retry logs its reason and wait.desktop/e2e/bench-sweep.mjstimes sweeps against the live API with the app's own code.Snapshot schema. Cached sweeps carry
SWEEP_SCHEMA(now 3). A snapshot from another schema is never painted or patched, so the first refresh after an update is a full one.Merged PRs in parallel weekly windows, at most 4 in flight, instead of paging through the whole range one request at a time.
Page-size fallback. A search page that times out (502/504, or a 200 with a cut-off body) is re-sent at 50, then 25, before the normal retries. Whole-org views of big orgs used to fail outright.
Remembering shrunken page sizes across searches was tried and reverted (
dcc7e8a): it doubled requests and made whole-org sweeps slower.The data (
e1fc4e8):org/team.mergeableand the latest reviews come from a follow-upnodes(ids:)query, only for approved, changes-requested and unrequested needs-review PRs. It runs while the merged search is still in flight. If that query fails, the sweep still succeeds without those fields.Attention engine (
desktop/src/main/core/attention.ts): a pure function that gives every open PR its reasons (CI failing, merge conflict, changes not addressed, needs re-review, approved but not merged, no reviewers, waiting for review, stale, old draft), each with how long it has held and a next step. It runs inprs:fetchafter every sweep, cached rows included, and also returns the sprint-end risk. Schema 4.Sweep section at the top of the board: reason, age, chips for other reasons, and a next-step button that opens the PR, its checks or its files. The sprint-end line appears in the range's last two days.
Quiet rows keep the Sweep short. A flagged row goes quiet when its worst reason is a slow one (waiting, stale, old draft) or nobody has touched the PR in 30+ days. Quiet rows sit behind "Show quiet", muted, and stay out of the tray count. On the electron team profile the Sweep went from 25 rows to 13. Schema 5.
Snooze per row, until the PR changes on GitHub, gets a worse reason, or the day ends. Stored in
localStorage, per machine. "Show snoozed" reveals the hidden rows.Tray: a "N need attention (team)" menu line, and a tooltip fallback when your queue is empty. The badge still counts only your queue. The Settings hint explains that the stale threshold also drives the Sweep.
Measurements
Electron org, last 30 days, median of 5 runs,
e2e/bench-sweep.mjs:A live team sweep filled details on exactly the 27 rows that need them, and found 6 merge conflicts. Whole-org time is mostly 60 s waits on GitHub's secondary rate limit (403 with Retry-After). Those track the number of search requests, and carried-over PRs added more. Pacing searches under the limit is listed under Later.
Remaining
mergeable,latestReviews), newPrRowfields (schema 3)chore(release): v0.11.0, and an update from an installed v0.10.4 through the auto-updaterTesting
Use a classic personal access token with the
repoandread:orgscopes. These orgs don't use SAML SSO, so the token needs no "Configure SSO" step.The dev build shares its data folder with the installed app (
%APPDATA%\pr-sweep): same config, token and snapshot. Replacing the token in the dev build replaces it for the installed app too.Before release
Everything in the milestone is built. What's left is your pass through the testing steps above, then
chore(release): v0.11.0as the last commit, marking this ready, merging, and taggingv0.11.0onmain. The tag publishes a signed release that auto-updates installed copies. After that, check that an installed v0.10.4 updates through the auto-updater and that its first refresh fills in the Sweep.