Skip to content

Fix genesis-merge: retry merge state check for API propagation#44

Merged
github-actions[bot] merged 1 commit intomasterfrom
fix-merge-state-race
Mar 22, 2026
Merged

Fix genesis-merge: retry merge state check for API propagation#44
github-actions[bot] merged 1 commit intomasterfrom
fix-merge-state-race

Conversation

@sorpaas
Copy link
Contributor

@sorpaas sorpaas commented Mar 22, 2026

Summary

gh pr merge returns before GitHub's API propagates the MERGED state. The immediate gh pr view reads stale state (OPEN), causing the workflow to report failure and skip cache update — even though the merge succeeded.

Adds a retry loop (5 attempts, 2s apart) before declaring failure. This fixes the race condition that caused PR #43's cache to need manual update.

Test plan

  • Next PR merge: bot should successfully detect MERGED state and update cache

🤖 Generated with Claude Code

gh pr merge returns before GitHub's API propagates the MERGED state.
The immediate gh pr view reads stale state (OPEN), causing the workflow
to report failure even though the merge succeeded. Add a retry loop
(up to 10s) before declaring failure.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Contributor

Genesis Review

Comparison targets:

How to review

Post a comment with the following format (rank from best to worst):

/review
difficulty: <commit1>, <commit2>, ..., <commitN>, currentPR
novelty: <commit1>, <commit2>, ..., <commitN>, currentPR
design: <commit1>, <commit2>, ..., <commitN>, currentPR
verdict: merge

Use the short commit hashes above and currentPR for this PR.
Each line ranks all comparison targets + this PR from best to worst.

To meta-review another reviewer's comment, react with 👍 or 👎.

@sorpaas
Copy link
Contributor Author

sorpaas commented Mar 22, 2026

/review
difficulty: 96aff8f, b012110, 080838c, b624f0d, 5e4b769, 80f77f7, currentPR, 063a782
novelty: 96aff8f, b012110, 080838c, b624f0d, 5e4b769, 80f77f7, currentPR, 063a782
design: 96aff8f, b012110, 080838c, b624f0d, 5e4b769, currentPR, 80f77f7, 063a782
verdict: merge

[Auto-review] Adds a retry loop (5 attempts, 2s apart) to the merge state confirmation in genesis-merge.yml. Fixes a race condition where gh pr merge returns before the MERGED state propagates via the API, causing the workflow to falsely report failure and skip cache update. Ranked low on difficulty/novelty — straightforward infrastructure fix. Slightly higher on design for correctly diagnosing the root cause rather than working around it.

@github-actions
Copy link
Contributor

JAR Bot: Review recorded from @sorpaas (1 reviews, 0 meta-reviews).
Merge weight: 1488/1488. Quorum reached — merging.

@github-actions github-actions bot merged commit f936be6 into master Mar 22, 2026
9 checks passed
@github-actions
Copy link
Contributor

JAR Bot: Merge failed unexpectedly (state: OPEN).

sorpaas pushed a commit that referenced this pull request Mar 22, 2026
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