package check import ( "strings" "git.novox.be/novox/mesh-sdk/go/delivery" ) // withComposition is v with the check's composition taken in: a failed one fails the check, naming its machine. func withComposition(v *delivery.Verdict, comp delivery.CompositionVerdict) { v.Composition = comp.Composition() v.Took.Composition = comp.Took if comp.State == delivery.CompositionPass && len(comp.Warnings) > 0 && v.Composition != nil { v.Composition.Words = strings.Join(comp.Warnings, "; ") // passed with a warning (ADR 0593 ยง9) } if comp.State == delivery.CompositionFail { machine := comp.Machine if machine == "" { machine = "the composition" } f := delivery.FailedFirst{Machine: machine, Words: comp.Words} if v.State == delivery.VerdictFail { addFailure(v, f) // the tests failed too: the composition is named after them (the operator, 2026-11-02) return } v.State, v.Failed = delivery.VerdictFail, f } }