Repository navigation
fix(ci): make pr-merge refuses a head behind its base - #145
Merged
Merged
Conversation
make pr-merge merged a head behind main when GitHub could apply it cleanly, squashing a tree nobody had built (the base's newer commits plus the PR). That is how two green PRs broke sparkrack's main: #50 merged, then #49, whose head lacked #50, removed a function #50 still called. verify.Decide now refuses a head behind its base (Pull.Behind, from GitHub's compare) with "rebase onto origin/main and re-attest". The merge reads the base once more right before gh pr merge. On the real case (base 5210400 = #50's squash, #49's head b8fa04f) compare gives behind_by=1 and Decide refuses. docs/CI.md and the github-prs skill say so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Authorized by JJ, merged by Claude (Opus 5.5, Doug) with --admin after make ci-local attested b493226 |
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.
Problem
make pr-mergemerged a head that was behind main whenever GitHub could apply it cleanly. GitHub then squashed it into a tree nobody had built: the base's newer commits plus the PR. That is how two green PRs broke sparkrack's main. #50 merged first; then #49, whose head lacked #50, removedserver.ManualPaymentsand changedNewBuybackService, which #50 still called.Fix
verify.Deciderefuses a head behind its base (Pull.Behind, from GitHub's compare) with "rebase onto origin/main and re-attest".make pr-mergereads the base again right beforegh pr merge.go build(too many arguments in call to services.NewBuybackService), while scratch: CI minutes before/admin (do not merge) #49's head alone builds. A head that contains its base (b398941...a07c04a) gives behind_by=0.Local verification
Head
b49322600ff9aa9713402e41f116f33ffcfd65bf· treeef8dba7f9f76· passedAttested by
JJ EatononMacBook-Pro-3.localRan: make ci on this exact head in a 4 vCPU Davit box (passed); go test ./scripts/cilocal/... (verify 100% coverage), golangci-lint on scripts/cilocal; the real sparkrack #49/#50 reproduction against GitHub's compare (behind_by=1, Decide refuses; merged tree fails go build); make secret-scan.
🤖 Generated with Claude Code