MCPcopy Create free account
hub / github.com/openai/plugins / summarizeChecks

Function summarizeChecks

plugins/plugin-eval/src/core/scoring.js:43–61  ·  view source on GitHub ↗
(checks)

Source from the content-addressed store, hash-verified

41}
42
43export function summarizeChecks(checks) {
44 return checks.reduce(
45 (summary, check) => {
46 summary.total += 1;
47 summary[check.status] = (summary[check.status] || 0) + 1;
48 summary[check.severity] = (summary[check.severity] || 0) + 1;
49 return summary;
50 },
51 {
52 total: 0,
53 pass: 0,
54 warn: 0,
55 fail: 0,
56 info: 0,
57 error: 0,
58 warning: 0,
59 },
60 );
61}
62
63function computeCheckPenalty(check) {
64 const weight = SEVERITY_WEIGHT[check.severity] ?? 0;

Callers 1

computeSummaryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected