Skip to content
quarry View Ticket
Login

View Ticket

A superseded CI run is never cancelled

Closed02f61bbce5e359abb53466513e21664671b77cdaCreated 105.4 days agoUpdated 68.0 days ago
Description2026-08-17 15:10:57
When check-ins land in quick succession, quarry launches a run per check-in and lets every one of them finish. Nothing tells dagnats that a run is now pointless because a newer check-in on the same branch has its own run.

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.

2026-09-01 01:08:23

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.