Repository navigation
Commit f6f9dd9
fix(ci): diff the extension version guard against the merge commit's first parent
The guard diffed github.event.pull_request.base.sha against the checked-out
pull-request merge commit. Those two are not built from the same base: the
payload SHA is the base-branch tip from when the PR was opened and is not
refreshed when the base moves, while refs/pull/N/merge is rebuilt against
the current tip. Any base-branch drift between the two is then attributed
to the PR.
Observed on #4395 itself: base.sha was main as of Sep 1 (3eec154), the
merge commit was built on main as of Sep 3 (db64869), and two unbumped
bundled-extension changes merged in between (#4413 touching agent-context,
#4286 touching git) failed the guard on a PR that never touched either.
Fetch the merge commit with depth 2 so both parents are available and
diff against HEAD^1, which is by construction the base the merge was
built on. Fail loudly if HEAD is not a merge commit. The script's CLI is
unchanged; a regression test reproduces the trap in a throwaway repo (the
stale base blames the drift on the PR, HEAD^1 does not).
Refs #4345
Assisted-by: Claude Code (model: claude-fable-5-1)
Co-Authored-By: Claude Fable 5.1 <[email protected]>1 parent 23f252b commit f6f9dd9
2 files changed
Lines changed: 47 additions & 8 deletions
File tree
- .github/workflows
- tests/contract
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
28 | 32 | | |
29 | 33 | | |
30 | 34 | | |
| |||
34 | 38 | | |
35 | 39 | | |
36 | 40 | | |
37 | | - | |
38 | | - | |
39 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
40 | 50 | | |
41 | | - | |
42 | | - | |
43 | 51 | | |
44 | 52 | | |
45 | | - | |
46 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
135 | 163 | | |
136 | 164 | | |
137 | 165 | | |
| |||
0 commit comments