From cce15ebda6859638bbe7d6c1428a1d48515a5916 Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Wed, 16 Sep 2026 02:50:15 +0200 Subject: [PATCH] fix: mark incomplete legacy collections --- tools/analyse.typ | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/analyse.typ b/tools/analyse.typ index 31be476..24a63fc 100644 --- a/tools/analyse.typ +++ b/tools/analyse.typ @@ -62,7 +62,8 @@ #let sections = (:) #for pair in capture.sections.pairs() { sections.insert(pair.first(), normalize-section(pair.last())) } -#let complete = sections.len() > 0 and sections.values().all(section => section.status == "ok" and not section.truncated) +#let source-warnings = get(capture, "warnings", default: ()).map(str).filter(item => item.match(regex("\\S")) != none) +#let complete = sections.len() > 0 and sections.values().all(section => section.status == "ok" and not section.truncated) and source-warnings.len() == 0 #let collection-status = if complete { "complete" } else { "partial" } #let selected = if version == 1 { ("recent_system_errors", "recent_application_errors") } else { ("recent_system_events", "recent_application_events") } #let observations = () @@ -130,7 +131,7 @@ } } -#let warnings = get(capture, "warnings", default: ()).map(str).filter(item => item.match(regex("\\S")) != none) +#let warnings = source-warnings #if not complete { warnings.push("Legacy capture collection is incomplete; finding confidence is capped at 50.") } #warnings.push("Migrated analyser supports " + str(rules.len()) + " event rules and " + str(watchlist.len()) + " candidate watchlist entries; unmatched events remain unanalysed.") #let clean-observations = observations.map(item => {