Retain cancellation at the final readiness handoff

This commit is contained in:
2026-11-28 16:15:57 +00:00
parent 4801d0aac1
commit 460d368d8e
4 changed files with 25 additions and 2 deletions

View File

@@ -204,6 +204,9 @@ func executePreflight(invocation commandkit.Invocation, input pipelineRunInput,
}
}
// Recording failure is independent of a completed diagnostic assessment.
if ctxErr := ctx.Err(); ctxErr != nil && !errors.Is(err, ctxErr) {
err = errors.Join(err, ctxErr)
}
report.Ready = !failedCheck && len(observations) == 2*len(targets.Access)+len(targets.Profiles) && ctx.Err() == nil
if err != nil {
if !failedCheck && !report.Ready {