A superseded CI run is never cancelled
For a slow pipeline on an active branch that wastes most of the engine's capacity, and the wasted runs are precisely the ones nobody will read: the verdict people act on is the tip's.
Not simply 'cancel the previous run', though. Two things argue against being aggressive:
- A verdict is recorded per check-in as a tag artifact, and a cancelled run yields ci-fail. Cancelling a superseded run would stamp ci-fail on a check-in that was never actually tested, which is worse than no verdict at all — a reader cannot tell 'we stopped caring' from 'this broke'. - Bisecting wants per-check-in verdicts. Cancelling everything but the tip destroys exactly the history that makes a regression findable.
So the fix probably needs a distinct outcome for 'superseded' rather than reusing failure, and likely an opt-in policy per repository. Worth thinking about before building, which is why this is filed rather than done.
Related: the poller writes a verdict for any terminal state, so whatever is decided here has to teach it that superseded is not failure.
Fixed. Engine.Supersede cancels still-running runs of a workflow carrying the same labels, called from internal/ci/trigger.go when a newer check-in triggers. Verified live today: the server log shows "superseded 1 run(s)" and the superseded run reaches status cancelled — run aafe519b was cancelled mid-flight when a newer trunk check-in arrived.