Skip to content

Keep finish green after remote cleanup warnings#436

Merged
NagyVikt merged 1 commit intomainfrom
agent/codex/make-branch-finish-remote-cleanup-best-e-2026-04-27-11-57
Apr 27, 2026
Merged

Keep finish green after remote cleanup warnings#436
NagyVikt merged 1 commit intomainfrom
agent/codex/make-branch-finish-remote-cleanup-best-e-2026-04-27-11-57

Conversation

@NagyVikt
Copy link
Copy Markdown
Collaborator

Summary

  • Treat post-merge remote branch delete failures as warnings instead of failing an already-merged finish flow.
  • Tighten missing-remote detection so generic failed-to-push output no longer counts as a missing ref.
  • Add regression coverage for repository-moved remote delete output.

Verification

  • bash -n templates/scripts/agent-branch-finish.sh
  • git diff --check -- templates/scripts/agent-branch-finish.sh test/finish.test.js
  • node --test --test-name-pattern "remote delete" test/finish.test.js
  • node --test test/finish.test.js

Notes

  • Worktree still has a pre-existing AGENTS.md modification from branch-start dirty-state migration; it was not staged or included in this PR.

The PR merge and local cleanup can already be complete when the trailing remote branch deletion hits a redirected or moved origin. Treat that final delete as a warning instead of converting a finished merge into an error, while keeping real missing-ref cleanup idempotent.

Constraint: GitHub can report repository move/redirect warnings during post-merge remote branch deletion.

Rejected: Keep failing on any remote delete error | this reports a successful PR merge as failed after the important state is already landed.

Confidence: high

Scope-risk: narrow

Directive: Do not classify generic failed-to-push output as a missing remote ref without the missing-ref text.

Tested: bash -n templates/scripts/agent-branch-finish.sh; git diff --check -- templates/scripts/agent-branch-finish.sh test/finish.test.js; node --test --test-name-pattern "remote delete" test/finish.test.js; node --test test/finish.test.js

Not-tested: live GitHub moved-repository remote deletion

Co-authored-by: OmX <omx@oh-my-codex.dev>
@NagyVikt NagyVikt merged commit f3efe01 into main Apr 27, 2026
2 of 5 checks passed
@NagyVikt NagyVikt deleted the agent/codex/make-branch-finish-remote-cleanup-best-e-2026-04-27-11-57 branch April 27, 2026 10:08
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