Reject empty critique metrics

Treat empty and whitespace-only snapshot values as missing so malformed frontmatter cannot reintroduce plausible zeroes.

Prepared with AI assistance under maintainer pbakaus's standing automation authorization.
This commit is contained in:
Paul Bakaus
2026-08-11 13:00:31 -04:00
parent d4aacaccfd
commit 357f358050
2 changed files with 10 additions and 1 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ function latestCritique(cwd) {
if (!latest) return null;
const get = (key) => latest.meta[key] ?? null;
const num = (v) => {
if (v == null) return null;
if (v == null || (typeof v === 'string' && v.trim() === '')) return null;
const n = Number(v);
return Number.isFinite(n) ? n : null;
};