Skip to content

Base candidate branches on main at publication time - #143

Open
p-linnane wants to merge 1 commit into
mainfrom
candidate-publication-base
Open

Base candidate branches on main at publication time#143
p-linnane wants to merge 1 commit into
mainfrom
candidate-publication-base

Conversation

@p-linnane

Copy link
Copy Markdown
Contributor

Each candidate branch is now based on main as of publication time instead of the checkout SHA, with the snapshot three-way merged onto it so advisory edits landing mid-sweep survive and genuine overlaps fail with the conflicting paths listed. Details in the commit message.

This clears the push rejection that hits whenever a workflow file lands on main during the hour-plus matcher run.

The matcher sweep runs for over an hour, so a branch built on the
checkout SHA reverts whatever landed on main meanwhile; when that
includes .github/workflows, the push is rejected. Publication now
three-way merges the snapshot onto current main, carrying concurrent
advisory edits through and failing with the conflicting paths on a
real overlap. Shards already landed on main are skipped rather than
failing on an empty commit.

Signed-off-by: Patrick Linnane <patrick@linnane.io>
Copilot AI lite review requested due to automatic review settings August 22, 2026 00:29

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

Updates the ingest workflow so matched-advisory candidate branches are created from main as it exists at publication time (rather than the original checkout SHA), while preserving mid-run main changes via a three-way merge of the snapshot onto that publish-time base.

Changes:

  • Rename the snapshot output from base/BASE_SHA to diff_base/DIFF_BASE_SHA and update diffing logic accordingly.
  • In the publish step, fetch origin/main, compute PUBLISH_BASE_SHA, and derive a merged snapshot tree via git merge-tree to apply onto publish-time main.
  • Skip publishing shards that are already present on main, while still counting them as “published” for reconciliation logic.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
spec/workflows_spec.rb Extends workflow assertions to cover the new DIFF_BASE_SHA plumbing, publish-time main fetch/base selection, merge-tree usage, and the “already on main” guard.
.github/workflows/ingest.yml Implements publish-time main basing and merge-tree snapshot application; updates env/output naming from BASE_SHA to DIFF_BASE_SHA; adds no-op publish guard for shards already on main.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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.

2 participants