primus.scoring.recall module
Recall scoring for scanner eval pipelines.
evaluate_recall takes gold annotations and scanner findings as plain
Python data and returns recall/accuracy/precision metrics plus a confusion
matrix. No HTTP, no dashboard, no persistence.
- primus.scoring.recall.evaluate_recall(annotations: list, findings: list) dict[str, Any]
Score recall of
findingsagainst goldannotations.Each annotation is a dict with
file_path,start_line,end_line, andexpected.status("positive"or"negative"). Each finding is a dict withfilePath,startLine,endLine.Returns a dict with
accuracy,recall,precision,confusion_matrix, and denominators. Negative annotations are scored as “No” references; a scanner finding overlapping them is a false positive.