Skip to content

Staging: survive a failed merge and load a PR's files before merging - #1350

Merged
LukasWallrich merged 1 commit into
mainfrom
staging-merge-failures
Dec 3, 2026
Merged

LukasWallrich merged 1 commit into
mainfrom
staging-merge-failures

Conversation

@LukasWallrich

@LukasWallrich LukasWallrich commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

When #943 was taken out of draft, the staging build failed. It would have failed for every other PR too, so #943 is a draft again until this is merged.

Two faults in the aggregate step:

  1. A merge can fail on a missing object. The clone has no file contents until Git needs them. While merging Move forrt.org to the Doors design #943, Git asked the server for a file the merge had just written itself ("upload-pack: not our ref"). Checking the PR out first loads its files, so the merge has nothing left to fetch.
  2. A failed merge leaves files behind. Such a merge stops after deleting some files and before recording that a merge is in progress, so nothing undid it and Hugo built a mix ("template for shortcode ga_map not found"). The step now resets the tree.

Tested with the same sequence of PRs on a GitHub runner, without pushing or deploying (run): without the checkout the merge of #943 fails as before, with it Git reports a normal conflict and aborts cleanly. After a failed merge, the reset leaves a clean tree.

Staging will then report #943 as conflicting, because it and #1226 both add .github/workflows/script-tests.yaml and edit the workflows README. The other PRs build as before.

🤖 Generated with Claude Code


Summary by cubic

Fixes the staging aggregate step so a PR that fails to merge cleanly no longer breaks the build, and merging a PR no longer fails when its files are not yet in the local clone.

  • Checks out each PR's files before merging so Git never asks the server for objects the merge just wrote.
  • Resets and cleans the work tree after a merge that fails before conflict resolution, so the build does not see half-applied changes.

Written for commit a6fa1d1. Summary will update on new commits.

View guided diff Turn on auto-fix

…iled merge

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

👍 All image files/references (if any) are in webp format, in line with our policy.

@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

✅ Spell Check Passed

No spelling issues found when checking 1 changed file(s)! 🎉

@cubic-dev-ai cubic-dev-ai Bot 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.

No issues found across 1 file

View guided diff | Turn on auto-fix | Re-trigger cubic

@LukasWallrich

Copy link
Copy Markdown
Contributor Author

✅ Staging Deployment Status

This PR has been successfully deployed to staging as part of an aggregated deployment.

Deployed at: 2026-12-03 10:20:43 UTC
Staging URL: https://staging.forrt.org

The staging site shows the combined state of all compatible open PRs.

@LukasWallrich
LukasWallrich merged commit ede3b7c into main Dec 3, 2026
5 checks passed
@LukasWallrich
LukasWallrich deleted the staging-merge-failures branch December 3, 2026 12:16
LukasWallrich added a commit that referenced this pull request Dec 3, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant