diff --git a/src/agent_env/explorer/ui/src/components/task-instance-viewer.tsx b/src/agent_env/explorer/ui/src/components/task-instance-viewer.tsx index 17d435de0..85828e5b8 100644 --- a/src/agent_env/explorer/ui/src/components/task-instance-viewer.tsx +++ b/src/agent_env/explorer/ui/src/components/task-instance-viewer.tsx @@ -490,7 +490,9 @@ export function TaskInstanceViewer({ id: string; score: number; result: boolean; - message: string; + message?: string; + description?: string; + weight?: number; title?: string; justification?: string; }[]; @@ -1084,6 +1086,9 @@ export function TaskInstanceViewer({ > Score: {(v.score * 100).toFixed(0)}% + + {verifierId} + {results.map((r, i) => ( @@ -1107,6 +1112,14 @@ export function TaskInstanceViewer({ {(r.id ?? `check ${i + 1}`).replace(/_/g, ' ')} + {typeof r.weight === 'number' && r.weight < 0 && ( + + penalty −{Math.abs(r.weight)} + + )} {typeof r.score === 'number' && r.score !== 0 && r.score !== 1 && ( score:{' '} @@ -1116,9 +1129,9 @@ export function TaskInstanceViewer({ )} - {r.message ? ( + {(r.message ?? r.description) ? (

- {r.message} + {r.message ?? r.description}

) : null} @@ -1387,6 +1400,12 @@ function AggregateScoreCard({ ); } +/** What weighted_average subtracts for a penalty check, as scoring.py computes it: (1 − score) × |weight|, the score + * the check's own or else 1 when it passed and 0 when it didn't. */ +function penaltySubtracted(score: number | undefined, result: boolean, weight: number): number { + return (1 - (typeof score === 'number' ? score : result ? 1 : 0)) * Math.abs(weight); +} + /** Sandbox-side verifier outcomes from a `verify_sandbox` step. Per-criterion rows show the criterion * `type` (probe_file_exists, bash_cmd_succeeds, …) and its `paths`/`cmd`. */ // Sandbox verifier — justification-string parsers. Each probe type emits its own `justification` format: