feat(agent): cache control embedding index + auto-wire semantic pass (gated) (#217)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Docs (push) Skipped
CI / Deploy Agent (push) Failing after 3s
CI / Deploy Dashboard (push) Failing after 3s
CI / Deploy MCP (push) Failing after 2s

This commit was merged in pull request #217.
This commit is contained in:
2026-07-21 11:29:16 +00:00
parent f516ecf3b5
commit 0ef2cd1b23
6 changed files with 176 additions and 5 deletions
@@ -230,6 +230,28 @@ impl PipelineOrchestrator {
tracing::info!("[{repo_id}] Control triage tagged {tagged} findings with control refs");
}
// Stage 5c: semantic control mapping — scale path for the master-controls
// corpus (no CWE to LUT on): embed each finding's region, retrieve the
// nearest master controls, grounded-judge, and stamp confirmed refs. Gated
// (default off) as the corpus embedding + per-finding judging is the heavy
// path; enabled once verified live against a deployed master-controls catalog.
if self.config.breakpilot.semantic_mapping {
self.update_phase(scan_run_id, "semantic_control_mapping")
.await;
let sem = crate::controls::semantic_stamp_findings(
&self.config,
self.llm.clone(),
&repo_path,
&mut all_findings,
)
.await;
if sem > 0 {
tracing::info!(
"[{repo_id}] Semantic mapping tagged {sem} findings with master-control refs"
);
}
}
// Dedup against existing findings and insert new ones
let mut new_count = 0u32;
let mut new_findings: Vec<Finding> = Vec::new();