)
## Summary
First run of \`auto-update-pr-branches.yml\` after #5957 found 0 BEHIND
PRs even though three were stuck behind main (#5916, #5870, #5902). Two
issues:
1. **Timing.** The workflow runs ~4s after the push to main, but GitHub
recomputes \`mergeStateStatus\` and the cached PR head SHA
asynchronously. Right after the push the field is still UNKNOWN and the
cached head can be stale → \`update-branch\` returns *expected head sha
didn't match current head ref*. Add a 30s sleep at the start.
2. **Over-strict filter.** The script only iterated PRs where
\`mergeStateStatus == "BEHIND"\`, skipping UNKNOWN candidates — exactly
the ones we wanted to fix. Drop the filter: after a push to main, every
open auto-merge PR is behind, and \`update-branch\` is a no-op when the
head is already up-to-date.
Also:
- Bump permissions to \`contents: write\` (update-branch creates a merge
commit on the head ref).
- Drop \`--silent\` and capture stderr so the actual GitHub error lands
in the log.
Verified manually: calling \`PUT /pulls/{num}/update-branch\` from the
CLI on #5916 and #5870 worked and they auto-merged within seconds. The
422 on #5902 was a real history-divergence conflict (4 ahead / 58 behind
/ merge_base differs) — separate problem.
## Test plan
- [ ] After this merges, push something to main and confirm the workflow
finds N>0 PRs (where N is open auto-merge PRs).
- [ ] Confirm any genuinely stuck PR (conflict) gets a clear error in
the log instead of \`likely conflict or stale ref\`.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Implementation:
shap-waterfall- python/highchartsImplements the python/highcharts version of
shap-waterfall.File:
plots/shap-waterfall/implementations/python/highcharts.pyParent Issue: #5237
🤖 impl-generate workflow