Surface thinking level for scenariobench bands; backfill Ollama Cloud runs to low

This commit is contained in:
PeterChrz 2026-09-30 10:30:55 -04:00
parent 4bfa1c75ea
commit f334538866
Signed by untrusted user who does not match committer: pch
GPG key ID: 8F0826ECF7302C63

View file

@ -277,11 +277,17 @@ private function aggregateScenarioBand(array $runs): array
->selectRaw('sum(gen_tokens) / nullif(sum(wall), 0) as gen_tps')
->first();
// Thinking level: keep it only when every scenario row in the band
// agrees — matches the per-run runLevel() rule, applied at band scope.
$level = DB::table('scenario_runs')
->whereIn('benchmark_run_id', $runPks)
->distinct()->pluck('level')->filter()->values();
return [
'run_pk' => $first->id,
'run_id' => $first->run_id,
'suite' => 'scenariobench',
'level' => null,
'level' => $level->count() === 1 ? $level->first() : null,
'passed' => (int) ($agg->passed ?? 0),
'failed' => (int) ($agg->failed ?? 0),
'avg_user_tps' => null,