Repository navigation
perf(server): a quiet repository skips the sweep - #289
Merged
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
count-patchula | 4ac2ea6 | Commit Preview URL Branch Preview URL |
Nov 13 2026, 02:19 AM |
A complete run now stores a quiet-run row per repository and credential scope: the head commit, a hash of the report row (timings, evaluation timestamps, catalog evidence and tooling excluded) and next_due — the earliest instant time alone can change the answer. On a batch the sweep alone enqueued, the server rebuilds each repository's lookup from its cached extraction and re-evaluates the report off the same catalogs; one whose report hashes the same, whose next_due has not passed and whose last full run is under six hours old finishes without a GitHub request of its own. Every forcing condition fails open toward a full run: missing state, a missing cached extraction, a passed due, a changed answer, the six-hour bound and any batch carrying a person's trigger, a delivered event, a check callback or a discovery row. A missed webhook is healed within six hours instead of one. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
The cold population run in the quiet-sweep benchmark seeded the credential-scoped actor hint under concurrency, so which repository sent the unfiltered inventory read was scheduling. Run the cold run sequentially so the recorded multiset is stable; the sweep itself keeps its zero-request assertion. A `prs.perHour` hold decays on wall-clock time, but `next_due` ignored it, so a quiet sweep could defer a now-affordable PR until the six-hour bound. The lifecycle now reports the oldest owned PR the hourly count covers; the write path turns it into `per_hour_due` (oldest + 1h, or the run's own hour when the count is the run's own) and `next_due` folds it in. Use checked arithmetic for the wait-hours additions, and note that a quiet repository still refreshes its hinted digests. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
sweepies
force-pushed
the
perf/quiet-sweep
branch
from
November 13, 2026 02:18
0c48c7f to
4ac2ea6
Compare
Merged
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 13 (the user chose N = 6 hours). A sweep exists to notice what no webhook reports: new upstream versions, and time passing. Until now it ran every repository in full each time, at a GitHub cost per repository even when nothing had changed.
What a quiet sweep does
quiet-runentry per repository (credential-scoped): the head commit and branch, a hash of the report row without timestamps, tooling or catalog evidence,next_dueandran_at.next_dueis the earliest instant at which time alone changes the answer: a held-back release becoming eligible, a release-age wait ending, the next cron instant of every update and maintenance window, a completed lockfile refresh's deferral, and aprs.perHourhold freeing (the oldest counted pull request's creation plus an hour). Wait arithmetic is checked; an overflow means always run. An input it cannot compute makesnext_duenow, so the repository always runs.next_duehas not passed, no event arrived since its stored run, and its last full run was under 6 hours ago. Anything else runs normally, and so does any error in the check (logged).Behaviour change: a missed webhook, or a change no subscribed event reports, is healed within 6 hours instead of at the next sweep.
guide/server.mdx("Quiet sweeps"),internals/engine.md.Proof
crates/engine/tests/sweep.rs: an unchanged repository is quiet with zero requests; an unseen repository runs; the 6-hour bound runs it; a held-back release runs exactly atnext_due; a changed catalog answer runs it.a_per_hour_hold_frees_as_the_counted_prs_age_out: withperHour2 and four pending updates, the sweep does not skip once the counted pull requests age out.a_sweep_over_quiet_repositories_makes_no_requests: 4 repositories, 12 requests per sweep before, 0 after. Its cold population run is sequential, so the credential-scoped actor hint is stored by the same repository every time; 50 consecutive runs pass.