Conversation
Guardex was leaving duplicate temporary stashes behind when branch start failed after protecting local changes from a protected branch. This change restores those changes back to the source checkout on failure, drops the temp stash, and locks the memory-bank failure path with a regression. Constraint: Managed script and template copies must stay byte-for-byte aligned Rejected: Clean up leaked stashes manually only | the startup flow would keep recreating them Confidence: high Scope-risk: narrow Directive: Any future branch-start failure path after auto-transfer must either restore the root checkout or leave one explicit recovery instruction, never silent temp stashes Tested: node --test test/branch.test.js; node --test test/metadata.test.js; bash -n scripts/agent-branch-start.sh; bash -n templates/scripts/agent-branch-start.sh; git diff --check; openspec validate --specs Not-tested: Live gx branch start against this monorepo with concurrent external worktree churn
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Guardex was leaving duplicate temporary stashes behind when branch start failed after protecting local changes from a protected branch. This change restores those changes back to the source checkout on failure, drops the temp stash, and locks the memory-bank failure path with a regression.
Constraint: Managed script and template copies must stay byte-for-byte aligned
Rejected: Clean up leaked stashes manually only | the startup flow would keep recreating them
Confidence: high
Scope-risk: narrow
Directive: Any future branch-start failure path after auto-transfer must either restore the root checkout or leave one explicit recovery instruction, never silent temp stashes
Tested: node --test test/branch.test.js; node --test test/metadata.test.js; bash -n scripts/agent-branch-start.sh; bash -n templates/scripts/agent-branch-start.sh; git diff --check; openspec validate --specs
Not-tested: Live gx branch start against this monorepo with concurrent external worktree churn