Skip to content

fix(ship): preserve worktree on PR failure + explicit error handling#77

Merged
erishforG merged 1 commit intodevelopfrom
feature/63-66-ship-error-handling
Apr 16, 2026
Merged

fix(ship): preserve worktree on PR failure + explicit error handling#77
erishforG merged 1 commit intodevelopfrom
feature/63-66-ship-error-handling

Conversation

@erishforG
Copy link
Copy Markdown
Owner

Summary

  • Splits ship() into ship_push() and ship_cleanup() phases — worktree is only removed after successful PR creation
  • On PR failure: branch is pushed, worktree preserved, user gets a clear "partial ship" warning
  • Explicit anyhow::bail! on partial failure with actionable message

Closes #63, closes #66

Test plan

  • parsec ship with valid PR → worktree cleaned up as before
  • parsec ship with PR failure (e.g. no GitHub token) → worktree preserved, branch pushed
  • Verify yellow "partial" message in human output
  • --json output includes pr_failed flag

🤖 Generated with Claude Code

- Split ship into ship_push() and ship_cleanup() phases
- Only clean up worktree after successful PR creation
- Print "Shipped (partial)" in yellow when PR fails
- Return non-zero exit code on partial failure
- Preserve worktree with actionable retry message

Closes #63, closes #66

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@erishforG erishforG merged commit e852481 into develop Apr 16, 2026
8 checks passed
@erishforG erishforG deleted the feature/63-66-ship-error-handling branch April 16, 2026 05:22
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