Skip to content

Commit 270fe6b

Browse files
MDA2AVclaude
andcommitted
Fix unscored count: use actual scored field instead of subtraction
The previous formula (total - passed - failed - warnings) varied per server because it depended on verdict distribution. Now counts r.scored === false directly from results, giving a consistent number across all servers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 19da11f commit 270fe6b

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/probe.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,9 @@ 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'])
165166
return {
166-
'summary': {'total': len(results), 'scored': total, 'passed': passed, 'failed': total - passed, 'warnings': warned},
167+
'summary': {'total': len(results), 'scored': total, 'passed': passed, 'failed': total - passed, 'warnings': warned, 'unscored': unscored},
167168
'results': results,
168169
}
169170

docs/static/probe/render.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ window.ProbeRender = (function () {
254254
}
255255
html += '</div>';
256256
// Score: pass + warn [fail] [unscored] / total
257-
var unscored = total - s.passed - failed - warnings;
257+
var unscored = s.unscored || 0;
258258
html += '<div style="min-width:200px;text-align:right;font-size:13px;">';
259259
html += '<span style="font-weight:700;color:' + PASS_BG + ';">' + s.passed + '</span>';
260260
if (warnings > 0) {
@@ -498,7 +498,8 @@ window.ProbeRender = (function () {
498498
passed: scored.filter(function (r) { return r.verdict === 'Pass'; }).length,
499499
failed: scored.filter(function (r) { return r.verdict === 'Fail'; }).length,
500500
warnings: filtered.filter(function (r) { return r.verdict === 'Warn'; }).length,
501-
errors: filtered.filter(function (r) { return r.verdict === 'Error'; }).length
501+
errors: filtered.filter(function (r) { return r.verdict === 'Error'; }).length,
502+
unscored: filtered.filter(function (r) { return r.scored === false; }).length
502503
}
503504
};
504505
})

0 commit comments

Comments
 (0)