Commit d3be055
authored
PETE - Recover from dropped pull_request events (#13667)
## Summary
- Listen for `synchronize` and `ready_for_review` on top of `opened` in
`.github/workflows/pr-test-checker.yml` so PETE has a recovery path when
GitHub drops a `pull_request: opened` delivery.
- Add an idempotency guard to
`.github/actions/pr-test-checker/action.yml`: any
`pull_request`-triggered run short-circuits when a PETE comment already
exists on the PR. `synchronize` / `ready_for_review` therefore only do
work when the original `opened` was missed -- they don't re-grade on
every push.
- `/recheck-tests` (the `issue_comment` flow) sets `force-regrade=true`
and bypasses the guard, so a manual re-grade is never short-circuited.
- Rename the `pull_request` job from `Grade on open` to `Grade on PR
change` to reflect the broadened trigger set.
## Motivation
[#13664](#13664) (opened by
@samclark2015) didn't get a PETE verdict because GitHub silently dropped
the `pull_request: opened` event delivery. The `pull_request_target`
channel (CLA) fired fine, but no `pull_request` workflows fired on open.
PETE only listened for `opened`, so it had no recovery path; other
workflows like *PR: Comment* recovered because they also listen for
`synchronize`.
## Observable behavior
- New PR opened (event delivered): PETE grades on `opened`. Done.
- New PR opened (event dropped): no comment exists, so the first
`synchronize` (next push) or `ready_for_review` (draft -> ready) fires
PETE, which posts the verdict.
- Subsequent pushes once a verdict exists: action looks up the existing
PETE comment, exits early, no LLM tokens spent.
- `/recheck-tests` comment: always re-grades regardless of any existing
comment.1 parent 8a7680c commit d3be055
2 files changed
Lines changed: 61 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
13 | 17 | | |
14 | 18 | | |
15 | 19 | | |
| |||
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
24 | 56 | | |
| 57 | + | |
25 | 58 | | |
26 | 59 | | |
27 | 60 | | |
28 | 61 | | |
29 | 62 | | |
| 63 | + | |
30 | 64 | | |
31 | 65 | | |
32 | 66 | | |
| |||
36 | 70 | | |
37 | 71 | | |
38 | 72 | | |
| 73 | + | |
39 | 74 | | |
40 | 75 | | |
41 | 76 | | |
| |||
44 | 79 | | |
45 | 80 | | |
46 | 81 | | |
| 82 | + | |
47 | 83 | | |
48 | 84 | | |
49 | 85 | | |
| |||
55 | 91 | | |
56 | 92 | | |
57 | 93 | | |
| 94 | + | |
58 | 95 | | |
59 | 96 | | |
60 | 97 | | |
| |||
72 | 109 | | |
73 | 110 | | |
74 | 111 | | |
| 112 | + | |
75 | 113 | | |
76 | 114 | | |
77 | 115 | | |
| |||
84 | 122 | | |
85 | 123 | | |
86 | 124 | | |
| 125 | + | |
87 | 126 | | |
88 | 127 | | |
89 | 128 | | |
| |||
98 | 137 | | |
99 | 138 | | |
100 | 139 | | |
101 | | - | |
102 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
103 | 144 | | |
104 | | - | |
| 145 | + | |
105 | 146 | | |
106 | 147 | | |
107 | 148 | | |
| |||
115 | 156 | | |
116 | 157 | | |
117 | 158 | | |
118 | | - | |
| 159 | + | |
119 | 160 | | |
120 | 161 | | |
121 | 162 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
7 | 19 | | |
8 | 20 | | |
9 | 21 | | |
| |||
18 | 30 | | |
19 | 31 | | |
20 | 32 | | |
| 33 | + | |
| 34 | + | |
21 | 35 | | |
22 | 36 | | |
23 | 37 | | |
24 | 38 | | |
25 | 39 | | |
26 | 40 | | |
27 | | - | |
| 41 | + | |
28 | 42 | | |
29 | 43 | | |
30 | 44 | | |
| |||
143 | 157 | | |
144 | 158 | | |
145 | 159 | | |
| 160 | + | |
0 commit comments