Skip to content

refactor: promote abort into the pure engine as stack.Abort#81

Merged
andyrewlee merged 1 commit into
mainfrom
audit/34-abort-into-engine
Jun 15, 2026
Merged

refactor: promote abort into the pure engine as stack.Abort#81
andyrewlee merged 1 commit into
mainfrom
audit/34-abort-into-engine

Conversation

@andyrewlee

Copy link
Copy Markdown
Owner

The conflict-recovery pair was asymmetric: Continue is a pure engine op fuzzed
by the invariant model, while abort lived in cmd/abort.go calling the git
package directly (bypassing the stack.Git port) and clearing s.PendingReparent
in the cmd layer -- so the abort half of the recovery bookkeeping was unreachable
by the millisecond fake-git model. Add stack.Abort(env, s) beside Continue (with
the same empty-head-name+PendingReparent fallback); reduce cmd/abort.go to a thin
adapter that swallows ErrNotInitialized so abort still runs in an uninitialized
repo, and keeps the custom {aborted,summary} JSON + text verbatim. Add
TestModelConflictAbortInvariants. e2e abort journey + JSON contract preserved.


Part of a 38-PR stacked diff (audit/01audit/38), reviewed and merged bottom-up. This PR is based on audit/33-undo-drop-rename-label.

@andyrewlee andyrewlee force-pushed the audit/33-undo-drop-rename-label branch 2 times, most recently from b8a7eda to d0777ab Compare June 15, 2026 06:47
The conflict-recovery pair was asymmetric: Continue is a pure engine op fuzzed
by the invariant model, while abort lived in cmd/abort.go calling the git
package directly (bypassing the stack.Git port) and clearing s.PendingReparent
in the cmd layer -- so the abort half of the recovery bookkeeping was unreachable
by the millisecond fake-git model. Add stack.Abort(env, s) beside Continue (with
the same empty-head-name+PendingReparent fallback); reduce cmd/abort.go to a thin
adapter that swallows ErrNotInitialized so abort still runs in an uninitialized
repo, and keeps the custom {aborted,summary} JSON + text verbatim. Add
TestModelConflictAbortInvariants. e2e abort journey + JSON contract preserved.
@andyrewlee andyrewlee changed the base branch from audit/33-undo-drop-rename-label to main June 15, 2026 06:48
@andyrewlee andyrewlee force-pushed the audit/34-abort-into-engine branch from df2d219 to 9ef69db Compare June 15, 2026 06:49
@andyrewlee andyrewlee merged commit 3997b60 into main Jun 15, 2026
4 checks passed
@andyrewlee andyrewlee deleted the audit/34-abort-into-engine branch June 15, 2026 06:50
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