Verify updated PRs' diffs and wake GitHub's recompute when stale#58
Draft
Phlogistique wants to merge 1 commit into
Draft
Verify updated PRs' diffs and wake GitHub's recompute when stale#58Phlogistique wants to merge 1 commit into
Phlogistique wants to merge 1 commit into
Conversation
After a PR's base is edited, GitHub sometimes keeps serving the diff computed against the old base; only a fresh event on the PR triggers another recompute (see scortexio/gh-stack-mv#37, which works around the same bug). The retarget is the last event this action feeds a PR, so an affected child PR durably shows its parent's changes in "Files changed". Add an advisory pass after the retargets in all three modes: compare the diff GitHub serves for each updated PR against a local git diff of live-fetched refs, and on mismatch re-assert the PR's current base (a same-value edit that feeds the recompute a fresh event), re-checking a bounded number of times. Never fails the run; when the diff stays stale after the nudge, posts a comment on the PR with the manual fix. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019o5g4zMNLzTikiyFEghTVM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After a PR's base is edited, GitHub sometimes keeps serving the diff computed against the old base; only a fresh event on the PR triggers another recompute (see scortexio/gh-stack-mv#37, which works around the same bug). The retarget is the last event this action feeds a PR, so an affected child PR durably shows its parent's changes in the "Files changed" tab.
This ports the gh-stack-mv verify pass: after the retargets in all three modes, compare the diff GitHub serves for each updated PR against a local
git diffof live-fetched refs, and on mismatch re-assert the PR's current base (a same-value edit that feeds the recompute a fresh event), re-checking a bounded number of times. The pass is advisory and never fails the run.One difference from gh-stack-mv: when the diff stays stale after the nudge, the action posts a comment on the PR with the manual fix, since a warning in the action log would go unseen.
Generated by Claude Code