Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/skillspector/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is why lint fails at make format-check: ruff format --check wants a blank line after the function-local import (Would reformat: src/skillspector/cli.py). Please import at module level next to report (from skillspector.nodes.report import report, cli.py:63) and run make format, or drop the import if you switch approach.


result = graph.invoke(state)
findings = effective_findings(result)
findings = _expand_occurrences(effective_findings(result))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same limitation as #631: _expand_occurrences copies the representative's context, code_snippet and confidence onto every occurrence (report.py:255-275), and finding_fingerprint hashes all three (suppression.py:236,247-248). For context-bearing rules, such as AR2 in #633, the non-representative occurrences never match what partition_findings computes on the next scan, so they stay reported. Please fingerprint the kept, pre-deduplication list the report node partitions, as #637 does with active_findings.

data = build_baseline_dict(
findings,
reason=reason,
Expand Down
Loading