Skip to content

fix(ci): report why a PR could not be woken instead of guessing - #76

Merged
github-actions[bot] merged 1 commit into
mainfrom
fix/wake-failure-message
Aug 14, 2026
Merged

fix(ci): report why a PR could not be woken instead of guessing#76
github-actions[bot] merged 1 commit into
mainfrom
fix/wake-failure-message

Conversation

@catomean

Copy link
Copy Markdown
Collaborator

Follow-up to #75.

The bug

The wake path decided whether a PR was conflicted by reading mergeable from the cached gh pr list payload. GitHub computes that field lazily and invalidates it every time the base branch moves — which is exactly when this workflow runs. The file already documents this trap for the merge path:

Mergeability is computed lazily by GitHub and is invalidated every time the base branch moves — so right after a merge (exactly when this workflow runs) every PR reports UNKNOWN.

The wake path did not honour it. A conflicted, check-less PR whose mergeable read UNKNOWN skipped the CONFLICTING branch, attempted update-branch, failed, and was told:

#N could not be woken (already current with main?) — close/reopen it to force checks

Close/reopen would not have helped — the branch conflicts. That is this file's own bug class: a skip line that reads plausible and sends the reader somewhere useless.

The fix

On failure, ask GitHub for the real mergeable state and name the actual reason:

  • conflicting → "it conflicts with main — resolve the conflict (or @dependabot recreate)"
  • otherwise → "it is already current with main — close/reopen it to force checks"

One extra API call, on a path that only runs when a wake has already failed.

Verification

🤖 Generated with Claude Code

The wake path read `mergeable` from the cached `gh pr list` payload. GitHub
computes that lazily and invalidates it whenever the base moves — which is
precisely when this workflow runs — so it is often UNKNOWN. A conflicted PR
therefore slipped past the CONFLICTING branch and was told it was "already
current with main", pointing at close/reopen, which would not have helped.

That is this file's own bug class: a skip line that reads plausible and
sends the reader somewhere useless. So on failure, ask GitHub for the real
mergeable state and name the actual reason — conflict, or genuinely current.
One extra API call on a path that only runs when a wake has already failed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions
github-actions Bot merged commit cb6bd9e into main Aug 14, 2026
2 checks passed
@github-actions
github-actions Bot deleted the fix/wake-failure-message branch August 14, 2026 01:03
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