Skip to content

Treat already-pruned finish reruns as complete#428

Merged
NagyVikt merged 1 commit intomainfrom
agent/codex/fix-finish-rerun-cleanup-idempotency-2026-04-25-15-27
Apr 25, 2026
Merged

Treat already-pruned finish reruns as complete#428
NagyVikt merged 1 commit intomainfrom
agent/codex/fix-finish-rerun-cleanup-idempotency-2026-04-25-15-27

Conversation

@NagyVikt
Copy link
Copy Markdown
Collaborator

Automated by gx branch finish (PR flow).

A finish rerun can happen after GitHub already merged the PR and branch cleanup already removed the local source branch. The old path failed before it could verify remote PR truth, which made successful manual closeouts look failed.

Constraint: GitHub PR state is the only durable proof after local branch/worktree cleanup.

Rejected: Ignore every missing local branch | would hide unmerged or mistyped branch names.

Confidence: high

Scope-risk: narrow

Directive: Keep missing-branch success gated on merged PR evidence; do not turn it into unconditional cleanup success.

Tested: bash -n scripts/agent-branch-finish.sh templates/scripts/agent-branch-finish.sh

Tested: node --test test/finish.test.js

Tested: node --test test/metadata.test.js

Tested: openspec validate --specs
@NagyVikt NagyVikt merged commit fe00fa4 into main Apr 25, 2026
@NagyVikt NagyVikt deleted the agent/codex/fix-finish-rerun-cleanup-idempotency-2026-04-25-15-27 branch April 25, 2026 13:40
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