Collapse small candidate deltas into one standing PR - #125
Merged
Conversation
The 64-way sharding was transport for the 91k-file backfill; at steady state it multiplies a dozen-record delta into several PRs. Deltas of at most 500 files now publish as one standing matched-advisories PR, force-pushed in place until merged; larger drops keep the shards. After a fully successful publication, candidate PRs this run did not publish are closed as superseded, so a mode switch cannot strand stale candidates and a partial failure cannot delete the previous run's review branches. Pushes prefer the HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN machine token so candidate-PR checks run without manual approval. Merge gate: the ruleset must stop stale approvals surviving daily force-pushes (require last-push approval or dismiss stale reviews). Signed-off-by: Patrick Linnane <patrick@linnane.io>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the ingest publishing workflow to collapse small matched-advisory deltas into a single standing pull request, while retaining sharded publishing for larger drops and adding post-publication reconciliation to close superseded candidate PRs safely.
Changes:
- Publish deltas of ≤ 500 advisory paths as a single standing
matched-advisoriesPR; fall back to sharded publishing above that limit. - Use an optional machine token (with
github.tokenfallback) for pushing/opening PRs so CI can run without manual approval when available. - Reconcile after a fully successful publish by enumerating open candidate PRs via paginated API and closing/deleting branches that were superseded by the current run.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
spec/workflows_spec.rb |
Updates workflow expectations to cover standing-PR mode, SINGLE_PR_LIMIT env, token fallback, and reconciliation behavior. |
.github/workflows/ingest.yml |
Implements single-PR vs sharded publishing switch, token selection, and post-publish superseded-PR reconciliation. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
krehel
approved these changes
Aug 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.
Deltas of at most 500 files now publish as one standing matched-advisories PR, with sharding kept as a fallback for large drops and superseded candidate PRs closed only after fully successful publication. Details in the commit message.
Merge gate satisfied: a repo-level ruleset now requires last-push approval on main, so the standing PR's daily force-pushes cannot ride a stale review.