Skip to content

Commit 72d8325

Browse files
MDA2AVclaude
andcommitted
Fix unscored double-counting: exclude warns already in warnings count
Unscored tests with Warn verdict were counted in both warnings and unscored, making pass + warn + fail + unscored > total. Now unscored only counts unscored tests with non-Warn verdict so the numbers add up to total. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 7ed58b0 commit 72d8325

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/probe.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ jobs:
162162
total = len(scored_results)
163163
passed = sum(1 for r in scored_results if r['verdict'] == 'Pass')
164164
warned = sum(1 for r in results if r['verdict'] == 'Warn')
165-
unscored = sum(1 for r in results if not r['scored'])
165+
unscored = sum(1 for r in results if not r['scored'] and r['verdict'] != 'Warn')
166166
return {
167167
'summary': {'total': len(results), 'scored': total, 'passed': passed, 'failed': total - passed, 'warnings': warned, 'unscored': unscored},
168168
'results': results,

docs/static/probe/render.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,9 @@ window.ProbeRender = (function () {
254254
}
255255
html += '</div>';
256256
// Score: pass + warn [fail] [unscored] / total
257+
// Unscored excludes warns (already counted in warnings)
257258
var unscored = s.unscored != null ? s.unscored
258-
: sv.results ? sv.results.filter(function (r) { return r.scored === false; }).length
259+
: sv.results ? sv.results.filter(function (r) { return r.scored === false && r.verdict !== 'Warn'; }).length
259260
: 0;
260261
html += '<div style="min-width:200px;text-align:right;font-size:13px;">';
261262
html += '<span style="font-weight:700;color:' + PASS_BG + ';">' + s.passed + '</span>';
@@ -501,7 +502,7 @@ window.ProbeRender = (function () {
501502
failed: scored.filter(function (r) { return r.verdict === 'Fail'; }).length,
502503
warnings: filtered.filter(function (r) { return r.verdict === 'Warn'; }).length,
503504
errors: filtered.filter(function (r) { return r.verdict === 'Error'; }).length,
504-
unscored: filtered.filter(function (r) { return r.scored === false; }).length
505+
unscored: filtered.filter(function (r) { return r.scored === false && r.verdict !== 'Warn'; }).length
505506
}
506507
};
507508
})

0 commit comments

Comments
 (0)