patrick91 / patrick91/shortcake

Handle crash recovery for interrupted insert operations

Open
#5 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
4
Forks
0
Avg merge
4h 22m
Merged PRs (30d)
5

Description

Problem

The old temp-shortcake-* branch flow is no longer the main crash-recovery risk. Current create --before / create --after insert flows can still leave partial state if the process is killed after creating the new branch, writing the temporary insert commit, rebasing a branch, or updating trailers.

Current risk

Interrupted insert operations can leave the repository in one of these states:

  • a newly inserted branch exists but descendants were not fully rebased
  • the internal shortcake: temp commit for insert path was interrupted before cleanup
  • a child branch was rebased but its Shortcake-Parent trailer was not restored/updated
  • the user is left on an unexpected branch after a hard kill or terminal disconnect

Possible direction

  • Record an insert transaction before mutating refs.
  • Detect incomplete insert transactions on the next Shortcake command.
  • Offer to complete or roll back when the expected refs still exist.
  • Add tests that simulate interruption points in create --before and create --after.

Acceptance criteria

  • No stale transaction is ignored silently.
  • A hard interruption can be diagnosed on the next run.
  • Recovery guidance names the affected branches and refs.
  • Existing successful insert flows remain unchanged.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the create --before and create --after insert flows and trace branch, temporary-commit, rebase, and trailer updates. Add interruption tests at the listed mutation points, then verify the next Shortcake command diagnoses incomplete transactions and offers recovery guidance naming affected branches and refs without changing successful flows.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, python
Domain
cli, devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.