fix(mcp): read the successes once, so every failed run is checked against all of them (#5842)
still_failing was handed the query's one-pass result. The first failed run's any() consumed it, so a second failure in the window found no successes left and was reported though a later run had put it right (ci-runner-volumes came back once keepalived-survey also had a failure). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -191,7 +191,8 @@ def still_failing(failed, succeeded) -> list:
|
||||
"""The failed runs nothing has since put right: a later success of the
|
||||
same playbook from the same source on the same hosts clears one, as long
|
||||
as it was at least as real (a dry run's success clears only a dry run's
|
||||
failure)."""
|
||||
failure). `succeeded` may be a one-pass result, so it is read once."""
|
||||
succeeded = list(succeeded)
|
||||
return [f for f in failed if not any(
|
||||
_run_key(s) == _run_key(f) and s.started_at > f.started_at and (_dry(f) or not _dry(s))
|
||||
for s in succeeded)]
|
||||
|
||||
Reference in New Issue
Block a user