From 5dde5e14670a12dd62f8b56aa46c3ce35d89759e Mon Sep 17 00:00:00 2001 From: Alexander Maslennikov Date: Sat, 23 May 2026 19:13:34 +0200 Subject: [PATCH 1/9] validate: PASS/FAIL banner + per-group preset-match cross-check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two related additions on the validate side: (1) pkg/presetmatch/ — new package that wraps presets.LoadPreset + presets.ValidatePreset into a single MatchGroup / MatchAll call. Result carries Status (match / deviation / not-found / skipped), the matched preset name, and the deviation slice. Discovery now delegates its preset lookup through this package (LoadPreset + ApplyPreset stay in pkg/presets — only the lookup-vs-spec logic moved). l8k validate calls MatchAll over the cluster-config.yaml's groups at validate-time so cluster drift is re-evaluated even when the user didn't re-run discover. Preset deviations stay informational — they don't gate the exit code. They surface as a sub-table in the HTML report's "Node groups" section and as a "Preset match" block in text output. (2) PASS/FAIL banner at the top of both text output and the HTML report. computeOverallVerdict folds every gating check (Helm release version, component versions, manifest verdict, connectivity matrix) into an OverallVerdict{Pass, Reasons, Notes}. Pass=false when any gate fails — same condition that drives the exit code. Notes carry informational items that don't gate (preset deviations, in-progress manifests when --wait wasn't used, matrix soft-skip); those don't downgrade PASS but the operator sees them. Banner format: Text: a wide ═-bordered box at the top of the report with a bulleted list of failure reasons (Reasons) and an ⓘ-prefixed list of notes (Notes). Green/red text via the existing color helpers. HTML: full-width div at the top of
, color-coded green (.verdict-pass) or red (.verdict-fail), with the same Reasons / Notes lists rendered as