Skip to content

Verify updated PRs' diffs and wake GitHub's recompute when stale#58

Draft
Phlogistique wants to merge 1 commit into
mainfrom
claude/gh-stack-mv-feature-parity-oecag0
Draft

Verify updated PRs' diffs and wake GitHub's recompute when stale#58
Phlogistique wants to merge 1 commit into
mainfrom
claude/gh-stack-mv-feature-parity-oecag0

Conversation

@Phlogistique

Copy link
Copy Markdown
Collaborator

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 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. 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

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
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.

2 participants