Skip to content

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

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

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 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
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.

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

2 participants