Skip to content

Keep finish cleanup idempotent after remote branch races#313

Merged
NagyVikt merged 1 commit intomainfrom
agent/codex/fix-branch-finish-remote-delete-tail-2026-04-22-15-42
Apr 22, 2026
Merged

Keep finish cleanup idempotent after remote branch races#313
NagyVikt merged 1 commit intomainfrom
agent/codex/fix-branch-finish-remote-delete-tail-2026-04-22-15-42

Conversation

@NagyVikt
Copy link
Copy Markdown
Collaborator

Automated by gx branch finish (PR flow).

A successful PR merge was still leaving gx branch finish with a non-zero exit when the trailing remote branch delete raced with an already-removed ref. The cleanup step now treats that specific already-gone state as success while keeping other remote delete failures strict, and the finish suite now covers the race explicitly.

Constraint: branch-finish cleanup must stay strict for real remote delete failures while tolerating post-merge ref races
Rejected: ignore all remote delete failures with || true | would hide real cleanup regressions after merge
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: treat only the already-gone remote ref case as idempotent success; keep other push-delete errors fatal
Tested: bash -n scripts/agent-branch-finish.sh templates/scripts/agent-branch-finish.sh; node --test test/finish.test.js
Not-tested: full live branch finish against GitHub before this commit
@NagyVikt NagyVikt merged commit a5a00d8 into main Apr 22, 2026
@NagyVikt NagyVikt deleted the agent/codex/fix-branch-finish-remote-delete-tail-2026-04-22-15-42 branch April 22, 2026 13:45
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