Merge pull request #562 from pbakaus/codex/issue-561-critique-signals

Fix critique routing snapshot metrics
This commit is contained in:
Paul Bakaus
2026-08-12 15:57:19 -04:00
committed by GitHub
2 changed files with 31 additions and 3 deletions
+4 -3
View File
@@ -42,14 +42,15 @@ function latestCritique(cwd) {
if (!latest) return null;
const get = (key) => latest.meta[key] ?? null;
const num = (v) => {
if (v == null || (typeof v === 'string' && v.trim() === '')) return null;
const n = Number(v);
return Number.isFinite(n) ? n : null;
};
return {
slug: get('slug'),
score: num(get('score')),
p0: num(get('p0')),
p1: num(get('p1')),
score: num(get('total_score') ?? get('score')),
p0: num(get('p0_count') ?? get('p0')),
p1: num(get('p1_count') ?? get('p1')),
timestamp: get('timestamp'),
file: path.relative(cwd, latest.path),
};