Repository navigation
fix(review): stop the fallback comment from firing on superseded runs #9716
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
26d2484
49e9207
36b9a5b
46cec25
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3069,9 +3069,19 @@ describe('fallback comment resilience (PR #8894 incident class)', () => { | |
| expect(job.if).toContain("needs.review-pr.result == 'failure'"); | ||
| // A review-pr that dies to its own job-level timeout is auto-cancelled | ||
| // (result 'cancelled', failure() false), which would open neither this | ||
| // gate nor the in-job step; a run-level cancel cancels this queued job | ||
| // too, so a live evaluation seeing 'cancelled' is the timeout case. | ||
| expect(job.if).toContain("needs.review-pr.result == 'cancelled'"); | ||
| // gate nor the in-job step — but `always()` keeps this job alive through | ||
| // a RUN-level cancel, so a bare 'cancelled' clause posts a false "did | ||
| // not complete" from a concurrency-superseded run while its same-head | ||
| // twin is still reviewing (PR #9131, run 32558544379 — same head, so | ||
| // the in-step head-moved guard cannot catch it). The two cancels differ | ||
| // in `needs`: a timeout cancels review-pr ALONE, a run-level cancel | ||
| // sweeps the upstream chain too. Pin the full compound clause — the | ||
| // grouping included — so reverting either upstream conjunct fails here. | ||
| expect(job.if).toContain( | ||
| "(needs.review-pr.result == 'cancelled' &&\n" + | ||
| " needs.authorize.result != 'cancelled' &&\n" + | ||
| " needs.delay-automatic-review.result != 'cancelled') ||", | ||
| ); | ||
|
Comment on lines
+3080
to
+3084
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Landed in Also took this round's deferred note in the same commit: the job comment now states that a run-level cancel landing after the upstream chain finished still opens the gate, that the push-supersede flavor is then suppressed by the in-step head-moved guard, and why a same-head twin cannot land that late (its cancel fires at run creation). Re-verified by mutation: with the bare disjunct re-added beside the intact compound clause the gate test fails on the new negation; the pristine workflow passes the suite at parity with base. |
||
| expect(job.if).toContain("needs.authorize.result == 'failure'"); | ||
| expect(job.if).toContain("needs.review-config.result == 'failure'"); | ||
| expect(job.if).toContain( | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Landed in
49e92078fb.Pinned the full compound clause — grouping included — rather than the two conjuncts separately, so dropping either
!= 'cancelled'conjunct or the parenthesization fails the gate test, and rewrote the rationale comment that still asserted the falsified premise (a run-level cancel taking the queued fallback job down with it).Mutation-verified locally the same way as the review's probe: the gate test fails on a reverted-gate mutant and passes on the PR gate. The two
runHealthProbefailures a root shell shows locally are environmental (chmod-based unwritability is void for root) and green in CI.