Skip to content

fix(stack): preserve rebase-conflict recovery guidance and exit code#1616

Merged
mergify[bot] merged 3 commits into
mainfrom
devs/JulianMaurin/fix/stack-push-output/preserve-rebase-conflict-recovery-guidance-exit--5dff7d81
Jun 17, 2026
Merged

fix(stack): preserve rebase-conflict recovery guidance and exit code#1616
mergify[bot] merged 3 commits into
mainfrom
devs/JulianMaurin/fix/stack-push-output/preserve-rebase-conflict-recovery-guidance-exit--5dff7d81

Conversation

@JulianMaurin

Copy link
Copy Markdown
Contributor

A failed git rebase -i in spawn_rebase returned a generic "exited " error mapped to exit 1. Every rebase-driving command (drop, squash, fixup, reorder, reword, move, edit, sync) routes through this helper, so all of them lost the conflict recovery instructions and the dedicated Conflict exit code (4) that automation keys on. Return CliError::Conflict with the resolve/continue/abort guidance, matching the Python run_scripted_rebase contract.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

Depends-On: #1615

JulianMaurin and others added 3 commits June 16, 2026 20:23
`stack push` rendered only `log_lines` and discarded the planned/upserted data, so the "Stacked pull request plan" preview and per-PR `[created] … <url>` summary were missing. Port `get_log_from_local_change` / `get_log_from_orphan_change` as plain-text formatters and emit the plan, created, and orphan-deleted lines into `log_lines` in flow order (dry-run included).

`push_branches` ran `git push` with inherited stdio, leaking git's `remote:` ruleset-bypass and branch-creation narration. Capture it and surface stderr only on failure, matching `run_git_silent`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Change-Id: Ic1a22ea2f054a6a38df6ff5aff569ae9573fce22
The dry-run rebase narration and the revision-history change-type fetch warning carried literal `[orange]…[/]` Rich tags. Python rendered them through a markup-aware console (tags stripped off a TTY, styled on one); the Rust CLI prints log lines verbatim with no markup renderer, so users saw the literal bracket tags. Drop the tags so the lines read as plain text, consistent with the rest of the CLI's output.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Change-Id: I3b8c1ed7b55f6d806f871ad86878fc375d9eade1
A failed `git rebase -i` in spawn_rebase returned a generic "exited <status>" error mapped to exit 1. Every rebase-driving command (drop, squash, fixup, reorder, reword, move, edit, sync) routes through this helper, so all of them lost the conflict recovery instructions and the dedicated Conflict exit code (4) that automation keys on. Return CliError::Conflict with the resolve/continue/abort guidance, matching the Python run_scripted_rebase contract.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Change-Id: I5dff7d8117910398fcd0abc2cc39027744ff1cf7
@JulianMaurin

Copy link
Copy Markdown
Contributor Author

This pull request is part of a Mergify stack:

# Pull Request Link
1 fix(stack): restore push summary and capture git push output #1614
2 fix(stack): strip raw Rich markup from push rebase narration #1615
3 fix(stack): preserve rebase-conflict recovery guidance and exit code #1616 👈
4 fix(stack): restore full-stack action-plan previews #1617
5 fix(stack): restore prefix-match error detail and not-found exit codes #1618
6 fix(core): surface API error detail and the failing endpoint URL #1619
7 fix(ci,queue,stack): restore minor output details lost in the port #1620

@mergify

mergify Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Merge Protections

🟢 All 6 merge protections satisfied — ready to merge.

@mergify mergify Bot requested a review from a team June 16, 2026 22:02
jd
jd previously approved these changes Jun 17, 2026
@mergify mergify Bot requested a review from a team June 17, 2026 07:09
@JulianMaurin JulianMaurin marked this pull request as ready for review June 17, 2026 07:14
kozlek
kozlek previously approved these changes Jun 17, 2026
@mergify

mergify Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Queued — the merge queue status continues in this comment ↓.

@mergify

mergify Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • Entered queue2026-06-17 07:32 UTC · Rule: default
  • 🟠 Preparing checks
  • ⏳ Merge · ETA: 2026-06-17 07:48 UTC 🚀

@mergify

mergify Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 6 minutes 28 seconds in the queue, including 5 minutes 55 seconds running CI.

Waiting for
  • #approved-reviews-by>=2
  • check-success=ci-gate
All conditions

Reason

Pull request #1616 has been dequeued

merge conditions no longer match. Blocked by:

  • #approved-reviews-by>=2

  • author = dependabot[bot]

  • author = mergify-ci-bot

  • author = renovate[bot]

  • all of [🛡 Merge Protections rule 👀 Review Requirements]:

    • any of:
      • #approved-reviews-by>=2
      • author = dependabot[bot]
      • author = mergify-ci-bot
      • author = renovate[bot]
  • all of [🛡 Merge Protections rule 🤖 Continuous Integration]:

    • all of:
      • check-success=ci-gate

Hint

You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it.
If you do update this pull request, it will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio queue comment.

Requeued — the merge queue status continues in this comment ↓.

@mergify mergify Bot added the queued label Jun 17, 2026
mergify Bot added a commit that referenced this pull request Jun 17, 2026
mergify Bot added a commit that referenced this pull request Jun 17, 2026
Base automatically changed from devs/JulianMaurin/fix/stack-push-output/strip-raw-rich-markup-push-rebase-narration--3b8c1ed7 to main June 17, 2026 07:38
@mergify mergify Bot dismissed stale reviews from kozlek and jd June 17, 2026 07:38

The base branch was changed.

@mergify mergify Bot requested a review from a team June 17, 2026 07:38
@mergify mergify Bot requested a review from a team June 17, 2026 07:55
@JulianMaurin

Copy link
Copy Markdown
Contributor Author

@Mergifyio queue

@mergify

mergify Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 7 minutes 2 seconds in the queue, including 5 minutes 39 seconds running CI.

Required conditions to merge

@mergify mergify Bot added the queued label Jun 17, 2026
mergify Bot added a commit that referenced this pull request Jun 17, 2026
@mergify mergify Bot removed the dequeued label Jun 17, 2026
@mergify mergify Bot merged commit 654abe0 into main Jun 17, 2026
18 checks passed
@mergify mergify Bot removed the queued label Jun 17, 2026
mergify Bot pushed a commit that referenced this pull request Jun 17, 2026
drop/squash/fixup/reword/reorder/move printed only the affected commits, only on --dry-run, and dropped the Change-Id and per-commit action tags; real runs printed ad-hoc per-commit lines with no plan. Python printed the whole stack — numbered, with Change-Id and action tags — unconditionally on both dry-run and real runs.

Add a shared plan_display::render_plan mirroring Python's display_plan/display_action_plan, have each command's Outcome carry the full base..HEAD stack as PlanRow values (with Change-Id and the per-commit action), and render it on both paths followed by the existing success/dry-run footer.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Depends-On: #1616
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants