From 7ad581cfb16dcef06f37abdf5a48464717db9044 Mon Sep 17 00:00:00 2001 From: Siddharth U Date: Fri, 2 Oct 2026 12:02:57 +0530 Subject: [PATCH] fix(cli): baseline command fingerprints expanded findings (#630) When `skillspector baseline` evaluates the list of findings to build its suppression fingerprint map, it consumed `effective_findings(result)`, which extracts the `filtered_findings` produced by the report node. However, the report node already deduplicates those findings, folding multiple occurrences into a single finding object. Because baselines require a fingerprint for every unique line/occurrence, fingerprinting the already-folded finding list resulted in only the first occurrence of a finding being successfully added to the baseline, leaving duplicates unsuppressed. This patch wraps `effective_findings` in `_expand_occurrences` when building the baseline dictionary, restoring the 1:1 fingerprint-to-occurrence mapping. Closes #630 Signed-off-by: Siddharth U --- src/skillspector/cli.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/skillspector/cli.py b/src/skillspector/cli.py index 3a4d1b520..7c91058dd 100644 --- a/src/skillspector/cli.py +++ b/src/skillspector/cli.py @@ -3180,8 +3180,10 @@ def baseline( # output_format is irrelevant here; we consume findings, not report_body. state = _scan_state(input_path, FormatChoice.json, no_llm) state["baseline_path"] = os.path.abspath(output.expanduser()) + from skillspector.nodes.report import _expand_occurrences + result = graph.invoke(state) - findings = effective_findings(result) + findings = _expand_occurrences(effective_findings(result)) data = build_baseline_dict( findings, reason=reason,