Skip to content

Fix upstream sync workflow failing on re-runs after manual merge#68

Merged
HelioPri merged 2 commits into
orca-latest-parity-bambufrom
claude/affectionate-mayer-IlnlO
Jun 5, 2026
Merged

Fix upstream sync workflow failing on re-runs after manual merge#68
HelioPri merged 2 commits into
orca-latest-parity-bambufrom
claude/affectionate-mayer-IlnlO

Conversation

@HelioPri

@HelioPri HelioPri commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes the recurring Helio Upstream Sync workflow failure (run 26750483377).

Root cause: After v2.3.2 was merged manually via PR #67, the helio-last-synced tracking tag was never updated. The scheduled workflow kept retrying the same sync, hitting merge conflicts (the code was already merged), and then failing to push because branch protection blocks --force-with-lease on the existing helio-release-candidate-v2.3.2 branch.

Fix (2 changes in helio-upstream-sync.yml):

  • Ancestor check: Before attempting a merge, check if the sync target is already an ancestor of HEAD. If so, the merge was done out-of-band — auto-update the tracking tag and skip.
  • Conflict branch push: Replace --force-with-lease with delete-then-push to avoid branch-protection rule violations when a conflict branch already exists from a previous run.

Also updates CLAUDE.md to document these workflow behaviors.

Test plan

  • Trigger the workflow manually (workflow_dispatch) — it should detect v2.3.2 is already merged, update the tracking tag, and exit cleanly
  • Verify the helio-last-synced tag points to the v2.3.2 commit after the run
  • Wait for next scheduled Monday run to confirm no more failures</mantml:parameter>
    ["copilot"]

Generated by Claude Code

Summary by CodeRabbit

  • New Features

    • Sync process now detects already-completed upstream updates and fast-skips redundant work while updating its tracking pointer.
    • Conflict-resolution push logic is safer: it skips unnecessary pushes, warns if remote work is ahead, and only replaces stale conflict branches to avoid clobbering others.
  • Documentation

    • Updated guidance describing the new detection and safer conflict-handling behaviors.

The Helio Upstream Sync workflow was failing because:
1. After v2.3.2 was merged manually via PR #67, the tracking tag was
   never updated, so the workflow kept retrying the same sync
2. The conflict-path push used --force-with-lease on a branch that
   already existed from a previous run, hitting branch-protection rules

Add an ancestor check that detects out-of-band merges and auto-updates
the tracking tag. Replace force-with-lease with delete+push for the
conflict branch.

Fixes run 26750483377.

https://claude.ai/code/session_01VoDwiKGeju8mfjQweQPrL2
Copilot AI review requested due to automatic review settings June 2, 2026 01:10

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: bc1eef33-ad59-4d2d-8883-d666874b93b0

📥 Commits

Reviewing files that changed from the base of the PR and between a07f52f and ba696c7.

📒 Files selected for processing (2)
  • .github/workflows/helio-upstream-sync.yml
  • CLAUDE.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • CLAUDE.md
  • .github/workflows/helio-upstream-sync.yml

📝 Walkthrough

Walkthrough

The PR enhances the helio-upstream-sync workflow to detect ancestor-merged upstream commits and update the tracking tag, and to perform divergence-aware handling of conflict-resolution branches (skip when remote matches or is ahead; otherwise delete and re-push).

Changes

Upstream Sync Workflow Improvements

Layer / File(s) Summary
Out-of-band merge detection with ancestor check
.github/workflows/helio-upstream-sync.yml
"Check if already synced" now tests whether the resolved sync SHA is an ancestor of HEAD; if so, the workflow force-updates the tracking tag to the sync SHA, pushes the tag to origin, and sets skip=true to exit early.
Divergence-aware conflict branch handling
.github/workflows/helio-upstream-sync.yml, CLAUDE.md
The "Push unmerged branch for conflict resolution" step computes local and remote branch tips, skips pushing if remote matches local, warns and skips if remote is ahead, and otherwise deletes the remote conflict branch before pushing the updated branch. Documentation updated to describe both behaviors.

Possibly Related PRs

  • Helio-Additive/OrcaSlicer#28: Both PRs change the .github/workflows/helio-upstream-sync.yml "Check if already synced" logic and tracking tag update behavior.

Suggested Labels

upstream-sync

Estimated Code Review Effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

A rabbit sniffs the sync and hops along,
Finds commits already merged, sings a little song,
Tags updated tidy, no needless repeat,
Stale conflict branches cleared, the flow is neat. 🐇✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main fix: addressing upstream sync workflow failures that occur after manual merges.
Description check ✅ Passed The description comprehensively covers the root cause, the two key fixes, test plan, and documentation updates, addressing all critical aspects of the change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/affectionate-mayer-IlnlO

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Improves the Helio Upstream Sync GitHub Actions workflow so reruns don’t repeatedly attempt to re-sync an upstream target that’s already been merged manually, and so conflict-handling reruns can recreate a pre-existing conflict branch without relying on force-push.

Changes:

  • Add an ancestor check to detect out-of-band/manual merges and automatically advance the helio-last-synced* tracking tag, then skip the run.
  • Change conflict-branch publishing from --force-with-lease to delete-then-push when a conflict branch name already exists.
  • Document these behaviors in CLAUDE.md.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
CLAUDE.md Documents new upstream-sync workflow behaviors (ancestor check + conflict branch handling).
.github/workflows/helio-upstream-sync.yml Adds out-of-band merge detection and updates conflict-branch push strategy on reruns.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/helio-upstream-sync.yml
Addresses Copilot review: the unconditional delete-then-push could
destroy conflict-resolution work pushed by someone between runs.
Now checks if the remote branch has advanced beyond our base commit
and skips the push if so, only replacing stale branches from
previous runs.

https://claude.ai/code/session_01NBUUwkh6FkmhB9GyJE8Lo9

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@HelioPri HelioPri added the ready-to-build label Jun 4, 2026 — with Claude

HelioPri commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator Author

Resolved Copilot's review thread — the divergence-aware conflict branch handling was already addressed in ba696c7.

Added ready-to-build label to trigger CI. Will monitor build status.


Generated by Claude Code sweep — 2026-06-04


Generated by Claude Code

HelioPri commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator Author

Note: The Build all workflow won't trigger for this PR — the changed files (.github/workflows/helio-upstream-sync.yml and CLAUDE.md) don't match the build paths filter. This is expected since no compiled code was changed.

This PR is ready to merge:

  • ✅ Copilot review comment addressed and resolved
  • ✅ CodeRabbit: "No actionable comments"
  • ✅ No source code changes requiring compilation
  • ✅ Can be verified by running the upstream sync workflow manually after merge

Generated by Claude Code sweep — 2026-06-04


Generated by Claude Code

@HelioPri HelioPri merged commit 52321dc into orca-latest-parity-bambu Jun 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants