Skip to content

Gracefully fall back to patch apply when bundle push transport fails#44081

Closed
pelikhan with Copilot wants to merge 1 commit into
mainfrom
copilot/deep-report-fix-changeset-generator-patch-format
Closed

Gracefully fall back to patch apply when bundle push transport fails#44081
pelikhan with Copilot wants to merge 1 commit into
mainfrom
copilot/deep-report-fix-changeset-generator-patch-format

Conversation

Copilot AI commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

The Changeset Generator was intermittently failing its safe_outputs push path on pull_request when patch_format: bundle hit a bundle-apply error, leaving the .changeset file unpushed and the run red. This change keeps bundle transport as the preferred path but avoids turning bundle-specific apply failures into a hard stop.

  • Bundle apply fallback

    • Reuses the existing patch apply flow when bundle fetch/apply fails at runtime.
    • Restores the branch to the pre-bundle tip before attempting the patch fallback.
    • Preserves current behavior when bundle transport succeeds.
  • Patch apply reuse

    • Extracts the existing patch-apply/base-commit preparation path into reusable helpers.
    • Keeps patch conflict recovery and failure diagnostics unchanged, now available to bundle fallback as well.
  • Regression coverage

    • Adds a focused test for the failure mode where bundle transport exists but cannot be applied, and patch transport succeeds.

Example of the new behavior:

try {
  // preferred path
  await applyBundleTransport();
} catch (bundleError) {
  await exec.exec("git", ["reset", "--hard", remoteHeadBeforePatch], baseGitOpts);
  const patchFallbackResult = await applyPatchTransport();
  if (patchFallbackResult) {
    return patchFallbackResult;
  }
}

Copilot AI linked an issue Jul 7, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Fix Changeset Generator patch-format:bundle push hard-fail Gracefully fall back to patch apply when bundle push transport fails Jul 7, 2026
Copilot AI requested a review from pelikhan July 7, 2026 16:59
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

🤖 Triage Assessment

Field Value
Category bug
Risk 🟡 Medium
Score 45/100 (Impact 20 + Urgency 12 + Quality 13)
Action defer (draft)

Summary: Draft with 0 lines changed — PR body exists but diff is empty. Likely needs rebase/push. CI: copilot check passed. Fallback from bundle to patch apply in Changeset Generator.

Next: Push commits to this draft branch before review.

Generated by 🔧 PR Triage Agent · 97.9 AIC · ⌖ 12.4 AIC · ⊞ 5.4K ·

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.

[deep-report] Fix Changeset Generator patch-format:bundle push hard-fail

2 participants