From 71f116cb6767f93b772358154d3565d4190be560 Mon Sep 17 00:00:00 2001 From: garrytan Date: Sat, 31 Oct 2026 19:23:24 +0000 Subject: [PATCH] fix(eval-plan): summed deviation adds arm deviations, matching the summed band (arms share rows) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --- lib/eval-plan.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/eval-plan.ts b/lib/eval-plan.ts index 67ba6ebe0..bdd034b82 100644 --- a/lib/eval-plan.ts +++ b/lib/eval-plan.ts @@ -446,7 +446,7 @@ export function pilotReport(out: string, o: { total: number; workers?: number }) const priced = arms.filter(a => a.per_item_usd !== null); const n = priced.reduce((s, a) => s + a.n, 0); const mean = priced.length || !arms.length ? priced.reduce((s, a) => s + a.per_item_usd!, 0) : null; - const sd = mean !== null && priced.every(a => a.sd_usd !== null) ? Math.sqrt(priced.reduce((s, a) => s + a.sd_usd! ** 2, 0)) : null; + const sd = mean !== null && priced.every(a => a.sd_usd !== null) ? priced.reduce((s, a) => s + a.sd_usd!, 0) : null; const projected = mean === null ? null : mean * o.total; const band: [number, number] | null = projected !== null && priced.every(a => a.band_usd) ? [priced.reduce((s, a) => s + a.band_usd![0], 0), priced.reduce((s, a) => s + a.band_usd![1], 0)] : null;