Skip to content

fix: preserve empty stack bases when absorbing primary work - #176

Merged
Yehonal merged 2 commits into
mainfrom
fix/dirty-primary-remedy
Nov 16, 2026
Merged

Yehonal merged 2 commits into
mainfrom
fix/dirty-primary-remedy

Conversation

@Yehonal

@Yehonal Yehonal commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

A dirty-primary refusal could recommend capturing HEAD even when the work existed only as uncommitted file changes. Name a path-scoped stack absorb command with -N -m and the selected manifest instead. Keep capture-integration guidance for existing undeclared integration commits, and avoid assigning a patch to an arbitrary stack. Diagnostic Git reads preserve the primary index.

Refuse default amend on an empty stack before recovery or materialization. A first-commit absorb also refuses if an existing branch is symbolic or has moved away from the declared base, preserving undeclared history. If the local branch is absent, create it explicitly at the pinned base before applying the patch.

Validation: regression fixtures execute the printed remedy, prove that the first stack commit is a child of the original base, and check preservation on refusal. Existing absorb, guard, integration-diagnostic, module-boundary and documentation checks also pass. The concurrent manifest-writer fixture synchronizes on actual lock contention so that its competing commit cannot race the initial index preflight. Version 0.47.18; independent review and 20/20 CI are required before merge.

@Yehonal
Yehonal merged commit a227fd5 into main Nov 16, 2026
39 of 40 checks passed
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