fix(stack): preserve rebase-conflict recovery guidance and exit code#1616
Conversation
`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
|
This pull request is part of a Mergify stack:
|
Merge Protections🟢 All 6 merge protections satisfied — ready to merge. |
|
Queued — the merge queue status continues in this comment ↓. |
Merge Queue Status
|
Merge Queue Status
This pull request spent 6 minutes 28 seconds in the queue, including 5 minutes 55 seconds running CI. Waiting for
All conditions
ReasonPull request #1616 has been dequeued merge conditions no longer match. Blocked by:
HintYou 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. Requeued — the merge queue status continues in this comment ↓. |
The base branch was changed.
|
@Mergifyio queue |
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
|
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
A failed
git rebase -iin 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