1extension RunTotals {
2 /// The run to compare a new report with, chosen from the runs published so far
3 /// (DESIGN.md D6, D9): the newest by `date` among those that have coverage (D8).
4 /// Nil when there is none, so the report is built without deltas.
54 public static func baseline(among publishedRuns: [RunTotals]) -> RunTotals? {
68 publishedRuns.filter { $0.unavailable == nil }.max { $0.date < $1.date }
74 }
8}