Stop raising a scheduled failure a later run recovered from (#127) - #128
Merged
Conversation
Select took every ended scheduled run on the default branch that did not succeed, whether or not a later scheduled run of the same workflow had succeeded since. A failure therefore stayed selectable for as long as it sat inside the window github.go fetches, so the tracking issue for it was raised again on the next sweep after somebody closed it, under the same key, and the loop ended when the evidence scrolled out rather than when anything was repaired. It happened on this board: #126 was raised against a failing run from 2026-08-21 after #120 was closed for it, and the newest scheduled run of that workflow on the default branch had already succeeded. Select now carries the newest scheduled run of each watched workflow that reported the schedule working again, and drops any failure at or below it. That is the sentence the raised body already prints, that its last run ended in the verdict being reported, and the reason the comment on Recent gives for the window, that the question is whether the thing is failing now. The test is red without the filter and green with it, and it covers three near misses that must not be read as a recovery: a success older than the failure, a success somebody asked for rather than one the schedule reached, and a success off the default branch. Signed-off-by: Nils Lehnen <30603423+iderex@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #127.
Selecttook every ended scheduled run of a watched workflow on the defaultbranch that did not succeed, whether or not a later scheduled run of the same
workflow had succeeded since. A failure therefore stayed selectable for as long
as it sat inside the window
github.gofetches, so the tracking issue for itwas raised again on the next sweep after somebody closed it, under the same
key. The loop ended when the evidence scrolled out rather than when anything
was repaired.
The change
Selectnow derives the newest scheduled run of each watched workflow on thedefault branch that ended in success, and drops any failure at or below it. Run
numbers are per workflow and increase, so that is the line a failure has to be
newer than to still be worth raising.
A recovery has to be a scheduled run of the default branch, because that is the
population this reports on. A run somebody asked for has somebody in front of
it and clears nothing here, which is the same reason the existing filters give
for leaving such a run out.
The recovery cannot be outside the window while the failure is inside it: the
window holds the newest runs, and the recovery is the newer of the two.
Why this reading rather than another
Two sentences already in the tree say it, which is why this is a repair and not
a new policy. The raised body prints
and the comment on
Recentgives the window its reason, "because the questionis whether the thing is failing now". Neither was what
Selectanswered.The guard, shown refusing
Run at
5c6d7b6056867c90d6304421faae08b31c3527fewith the two filter linesdeleted from
Selectand nothing else changed:Restored:
The same test also covers three near misses that must not be read as a
recovery, and each of them passes against the unpatched
Selectas well, sonone of them is what the new filter is carrying: a success older than the
failure, a success somebody asked for, and a success off the default branch.
The gate
Run at the head being pushed:
The means
Go, unchanged from the rest of this tree, in the package that already holds the
judgement being corrected.
decisions/means.mdis the argument, and this addsno dependency:
go.modis byte-identical toorigin/main.What this does not do
It does not touch the sentence the raised body prints. That sentence says "its
last run", while a failure is still grouped with every other failing run in the
window that shares its verdict, so a workflow whose newest run was cancelled
and whose run before that failed still raises a body saying its last run failed.
That is a second topic and it is not repaired here.
It also changes nothing about a failure nothing has recovered from. Such a
failure is selected exactly as before, and the first assertion in the new test
is there so that a filter which quietly reported nothing at all could not pass.
No second reader saw this before it landed.