PLC findings were still keyed by POU and line and inserted one by one, so
every line shift in an export made a duplicate finding (they are not
auto-closed, so the old one stayed).
- plc::analyze_tree gives each hit its content: the POU, the rule's title
and description (variable and function names, no line numbers) and its
occurrence among identical hits in the POU. A PLCopen XML line is a line
of the embedded body, not of the file, so the file is not read.
- The PLC scan saves through RunFindings: content keys, the row stored
under the line-based fingerprint taken over (id, status, triage kept),
moved lines followed, control refs refreshed on earlier rows (what the
removed loop did). Still no auto-close for PLC.
- content_fingerprints works without a tree when the scanner gives the
content (a PLC scan reads several trees).
- Test: a comment added on top keeps every PLC content key, and no two
hits share one. Staging test plan: check 19.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p