Skip to content

Collapse small candidate deltas into one standing PR - #125

Merged
p-linnane merged 1 commit into
mainfrom
standing-candidates-pr
Aug 13, 2026
Merged

Collapse small candidate deltas into one standing PR#125
p-linnane merged 1 commit into
mainfrom
standing-candidates-pr

Conversation

@p-linnane

Copy link
Copy Markdown
Contributor

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.

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>
Copilot AI lite review requested due to automatic review settings August 13, 2026 23:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-advisories PR; fall back to sharded publishing above that limit.
  • Use an optional machine token (with github.token fallback) 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.

@p-linnane
p-linnane merged commit 9feacba into main Aug 13, 2026
6 checks passed
@p-linnane
p-linnane deleted the standing-candidates-pr branch August 13, 2026 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants