run_plc_scan's persist block was insert-only, so a PLC re-scan never updated control_refs on findings first seen before the semantic mapping pass ran — mappings could only be picked up by delete + re-add of the target. This ports the refresh branch run_pipeline already has (#228): when a finding already exists and now carries control_refs, $set them onto the existing row.
Why now: the PLC control-mapping loop was just proven live (pump-station: 11/16 findings tagged to master controls, emitted via oscal_assessment over MCP). This removes the delete/re-add wart so future PLC re-scans refresh mappings in place.
Verified:cargo fmt --all --check, cargo clippy -p compliance-agent -- -D warnings, and the CI --lib test set all green locally (-j8).
`run_plc_scan`'s persist block was insert-only, so a PLC re-scan never updated `control_refs` on findings first seen before the semantic mapping pass ran — mappings could only be picked up by delete + re-add of the target. This ports the refresh branch `run_pipeline` already has (#228): when a finding already exists and now carries `control_refs`, `$set` them onto the existing row.
**Why now:** the PLC control-mapping loop was just proven live (pump-station: 11/16 findings tagged to master controls, emitted via `oscal_assessment` over MCP). This removes the delete/re-add wart so future PLC re-scans refresh mappings in place.
**Verified:** `cargo fmt --all --check`, `cargo clippy -p compliance-agent -- -D warnings`, and the CI `--lib` test set all green locally (-j8).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
run_plc_scan's persist block was insert-only, so a PLC re-scan never
updated control_refs on findings first seen before the semantic mapping
pass ran (or before it was enabled) — mappings could only be picked up by
deleting and re-adding the target. Port the refresh branch run_pipeline
already has (#228): when a finding already exists and now carries
control_refs, $set them onto the existing row.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
sharang
merged commit effc3080e0 into main2026-07-22 17:06:09 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
run_plc_scan's persist block was insert-only, so a PLC re-scan never updatedcontrol_refson findings first seen before the semantic mapping pass ran — mappings could only be picked up by delete + re-add of the target. This ports the refresh branchrun_pipelinealready has (#228): when a finding already exists and now carriescontrol_refs,$setthem onto the existing row.Why now: the PLC control-mapping loop was just proven live (pump-station: 11/16 findings tagged to master controls, emitted via
oscal_assessmentover MCP). This removes the delete/re-add wart so future PLC re-scans refresh mappings in place.Verified:
cargo fmt --all --check,cargo clippy -p compliance-agent -- -D warnings, and the CI--libtest set all green locally (-j8).🤖 Generated with Claude Code