'use strict'; function recordingRepairHistory(t,e){ const old=t.recording_replacements||[], diagnostics=t.predicate_diagnostics||[]; if(!old.length&&!diagnostics.length)return ''; return panel('Recording repair and native diagnostics',`
${old.map(h=>`

Earlier native ${h.success?'success':'failure'} · ${num(h.steps)} steps. Original native verdict and evidence retained; video repair preserves every available source frame.

${['video','native_session','verdict','protocol','usage','provenance','terminal_frame'].filter(k=>h.links[k]).map(k=>external(h.links[k],k.replaceAll('_',' '))).join('')}
`).join('')}${diagnostics.map(h=>`

Independent seed-0 diagnostic · native ${h.success?'success':'failure'} · ${num(h.steps)} steps. Same instruction and native verifier; excluded from formal-selection totals.

${esc(h.analysis.diagnosis||h.analysis.diagnostics||'')}

${['owner_diagnostics','transcript','native_session','verdict','protocol','usage','provenance','terminal_frame'].filter(k=>h.links[k]).map(k=>external(h.links[k],k.replaceAll('_',' '))).join('')}
`).join('')}
`); } const $=s=>document.querySelector(s), esc=v=>String(v??'').replace(/[&<>"']/g,c=>({'&':'&','<':'<','>':'>','"':'"',"'":'''}[c])); const num=v=>v==null?'—':Number(v).toLocaleString('en-US'); let data,routeEpoch=0; const symbol=''; const familyName=id=>data.families.find(f=>f.id===id).name; const external=(url,label)=>`${esc(label)} ↗`; const measuredInstruction=e=>e?.instruction ?? e?.effective_instruction ?? e?.native_instruction; const outcome=e=>e.success===true?'Successful':e.success===false?'Unsuccessful':'Unknown'; const elapsed=s=>s==null?'—':`${Math.floor(s/60)}m ${Math.round(s%60)}s`; function modifiedText(t){ const r=t.instruction_revision;if(!r)return esc(t.native_instruction||t.catalog_instruction); return r.diff.filter(p=>p.modified).map(p=>p.op==='equal'?esc(p.modified):`${esc(p.modified)}`).join(r.preserve_whitespace?'':' '); } function instructionPanel(t,e){ const r=t.instruction_revision; if(!r)return panel(e?'Original native instruction':'Upstream catalog description',`
${esc(e?.native_instruction||t.catalog_instruction)}
${e?`

${external(e.links.native_goal,'Instruction evidence')}

`:''}`); const earlier=e?.instruction_policy==='modified' && measuredInstruction(e)!==r.instruction; const measured=earlier?'This recording used an earlier modified instruction. The current revised definition is shown for comparison.':e?(e.instruction_policy==='modified'?'This recording used the modified instruction.':'This recording used the original instruction. The revised definition is shown for comparison.'):'This revised task has not been evaluated yet.'; return panel('Modified instruction',`

${measured}

${modifiedText(t)}

Highlighted words show additions and replacements. ${external(r.source_url,'Instruction source')}

${r.native_instruction_kind==='episode_template'?'Original instruction template':'Original native instruction'}
${esc(t.family==='task04'?(e?.native_instruction||r.native_instruction):r.native_instruction)}
${r.native_instruction_kind==='episode_template'?'

Object names and target assignments are supplied by the current scene.

':''}
${e && t.family!=="task04" && e.native_instruction!==r.native_instruction?`
Native instruction recorded in this scene
${esc(e.native_instruction)}
`:""}${earlier?`
Instruction used in this recording
${esc(measuredInstruction(e))}
`:''}${e?`

${external(e.links.native_goal,'Measured instruction evidence')}

`:''}`); } function visualReviewPanel(e){ const r=e.visual_review;if(!r)return ''; const labels={consistent_pass:'画面与原生通过一致',confirmed_false_positive:'误通过:画面未完成,但原生 verifier 判定通过',consistent_failure:'画面与原生失败一致'}; const label=labels[r.status]||'原生条件与画面复核'; const text=e.analysis?.visible_completion||r.review||''; return panel('独立视频复核',`

${esc(label)}

${esc(text)}

原生分数保持不变。${external(e.links.independent_review||e.links.analysis,'完整复核记录')}

`,'wide-panel'); } function failureBadge(r){return `${r.status==='provisional'?'可能 · ':''}${esc(r.label)}`;} function failureTable(episodes,id){ return `
查看全部 ${episodes.length} 项失败说明
${episodes.map(e=>``).join('')}
Task分类失败原因
${esc(data.tasks.find(t=>t.key===e.task_key)?.title || e.task_key)}${esc(data.tasks.find(t=>t.key===e.task_key)?.display_key || e.task_key)}${failureBadge(e.failure_review)}${esc(e.failure_review.reason)}
`; } function failureCategories(review){ return `
${review.categories.map(c=>``).join('')}
`; } function renderFailureOverview(){ const failures=data.episodes.filter(e=>!e.success); $('#failure-overview').innerHTML=`

当前结果与失败分析

Attempt history ↗

${data.tasks.length} 个任务 · ${data.episodes.filter(e=>e.success).length} 个成功 · ${failures.length} 个原生失败 · ${data.tasks.length-data.episodes.length} 个待发布。原生判定与完整 session 已保留;具体失败机制尚未逐项定位。服务端中断及其补跑记录见尝试历史。

`; $('#failure-filter').innerHTML=''; } const successPercent=value=>value==null?'—':(value*100).toFixed(2)+'%'; function successSummary(f){ return `${successPercent(f.success_rate)}${f.valid_results?`${f.successes} / ${f.valid_results} valid results`:'Not evaluated'}`; } function renderOverview(){ $('#readiness-note').hidden=!data.selection_pending?.length; $('#readiness-note').innerHTML=data.selection_pending?.length?'RoboTwin task03/10 is awaiting selection after seed-0 initialization failed. No model episode or score is recorded. View preparation evidence ↗':''; $('#edition-count').innerHTML=`${data.episodes.length} / ${data.tasks.length} results available · ${data.tasks.length-data.episodes.length} pending`; $('#edition-label').textContent=`${data.episodes.filter(e=>e.phase==='formal').length} formal results · ${data.episodes.filter(e=>e.phase==='preflight').length} preserved preflight`; $('#overview').innerHTML=data.families.map(f=>`${f.id.replace('task','Task')} · ${esc(f.name)}${f.completed}/${f.total}${successSummary(f)}${num(f.input_tokens)}${f.cached_input_tokens==null?'':num(f.cached_input_tokens)+' cached'}${num(f.output_tokens)}${f.completed?`${f.usage_complete} / ${f.completed}Complete`:'—No usage yet'}`).join(''); $('#family-nav').innerHTML=data.families.map(f=>`${f.id.replace('task','Task')} · ${esc(f.name)} ${f.total}`).join(''); renderFailureOverview();renderCards(); } function renderCards(){ const query=$('#search').value.toLowerCase(),status=$('#status-filter').value,category=$('#failure-filter').value; const filtered=data.tasks.filter(t=>{const e=data.episodes.find(e=>e.id===t.episode_id),r=e?.failure_review;return (status==='all'||t.status===status)&&(category==='all'||category==='failed'&&e&&!e.success||r?.category===category)&&[t.display_key || t.key,t.title,t.native_id,t.catalog_instruction,t.native_instruction||'',r?.label||'',r?.reason||''].join(' ').toLowerCase().includes(query);}); $('#families').innerHTML=data.families.map(f=>{ const tasks=filtered.filter(t=>t.family===f.id);if(!tasks.length)return ''; return `

${f.id.replace('task','Task')} · ${esc(f.name)}

${f.total} tasks · ${f.completed} result${f.completed===1?'':'s'} available · ${f.pending} pending${f.completed?' · '+f.successes+' native successes':''}

${f.id.slice(-2)}
${tasks.map(t=>{ const e=data.episodes.find(e=>e.id===t.episode_id); return `
${e?`${esc(f.name)} native episode recording4× VIDEO · ${e.phase.toUpperCase()}`:`
${symbol}${esc(f.name.toUpperCase())} / PENDING
`}
${t.family} / ${t.display_slot || t.slot}

${esc(t.title)}

${t.instruction_revision?'Modified instruction':e?'Original native instruction':'Upstream catalog description'}

${modifiedText(t)}

${t.instruction_revision&&(!e || measuredInstruction(e)!==t.instruction_revision.instruction)?`${e?(e.instruction_policy==="modified"?"Recorded result: earlier modified instruction":"Recorded result: original instruction"):"Revised task · not yet evaluated"}`:""}${e?.failure_review?`
${failureBadge(e.failure_review)}

${esc(e.failure_review.reason)}

`:''}
`; }).join('')}
`; }).join(''); $('#filter-count').textContent=`${filtered.length} / ${data.tasks.length} tasks`;$('#empty').hidden=filtered.length>0; } function panel(title,body,cls=''){return `

${title}

${body}
`;} function simpleAttemptHistory(t,e){ if(!t.simple_rerun)return ''; const history=t.attempt_history||[]; const current=e.provenance.max_steps||t.planned_protocol.max_control_steps; return panel('Attempt history',`

Current result: attempt ${e.provenance.attempt||1} · ${num(current)} action-step limit.

${esc(t.simple_rerun.note)}

${history.map(h=>`

Previous attempt · ${num(h.max_steps)} action-step limit · native ${h.success?'success':'failure'} · ${num(h.steps)} steps used. Retained outside current-selection totals.

${h.visual_review?`

独立复核:${esc(h.visual_review.review)}

`:''}
${['video','native_session','verdict','protocol','usage','provenance','episode_record','independent_review'].filter(k=>h.links[k]).map(k=>external(h.links[k],k.replaceAll('_',' '))).join('')}
`).join('')}
`); } function taskHeader(t,e){return `← Back to ${esc(familyName(t.family))}
${t.family} / ${t.display_slot || t.slot} · ${esc(familyName(t.family))}

${esc(t.title)}

Codex ${esc(e?'v'+e.codex_version:'benchmark')} · GPT-6 Astra · high · seed 0 · ${e?'1 measured episode':'1 planned episode'}
${e?`Native: ${outcome(e).toLowerCase()}Execution: ${esc(e.execution.status)}Evidence: ${e.verdict.evidence_valid?'valid':'invalid'}Usage: ${e.usage.audit_complete?'complete':'incomplete'}`:'Pending · no published result'}
${e?`${e.phase==='preflight'?'Preflight record':'Formal evaluation'}`:''}
`;} function renderPending(t){ const p=t.planned_protocol,r=t.readiness; return taskHeader(t,null)+`
${symbol}

${r?'Seed 0 initialization blocked':'Evaluation pending'}

${r?esc(r.message):esc(t.status_note || 'Queued for evaluation.')}

${r?`

${external(r.evidence,'Native initialization evidence')}

`:''}
Seed 0${num(p.max_control_steps)} control steps · ${p.control_frequency_hz} Hz8-hour limitStepped
`+instructionPanel(t,null)+(t.attempt_history?.length?panel('Preserved interrupted attempts',t.attempt_history.map(h=>external(h.links.provenance,'Attempt provenance')+' · '+external(h.links.native_session,'Native session')).join('
')):''); } async function renderResult(t,e,epoch){ const u=e.usage,m=e.media,views=m.view_names||m.recording.views.map(v=>v.name); const metrics=[[`${num(e.steps)} / ${num(t.planned_protocol.max_control_steps)}`,'Native control steps',e.simulation_time_s==null?`${m.recording.end_time_s.toFixed(2)} recorded simulation seconds`:`${e.simulation_time_s.toFixed(2)} simulation seconds`],[elapsed(e.wall_time_s),'Agent wall time','8-hour safety limit'],[num(u.accounting==='reported-responses'?u.response_count:(u.request_attempts??u.response_count)),u.accounting==='reported-responses'?'Model responses':'Model requests',u.accounting==='reported-responses'?'Provider-reported responses':`${num(u.reported_responses?.input_tokens)} / ${num(u.request_attempts??u.response_count)} terminal usage reported`],[num(e.call_activity.model_tool_calls),'Model tool calls','Nested RPC count unavailable'],[num(u.input_tokens),'Input tokens',num(u.cached_input_tokens)+' cached'],[num(u.output_tokens),'Output tokens',num(u.reasoning_output_tokens)+' reasoning']]; const r=e.failure_review;const reviewEvidence=r?`
失败判定依据 · ${esc(r.status_label)}

${esc(r.basis)}

${external(e.links.review_frame,'查看录像末帧')} · ${external(e.links.failure_review,'完整判定记录')}

${r.source_links.map(s=>`

${external(s.url,s.path)}

`).join('')}
`:''; $('#detail').innerHTML=taskHeader(t,e)+visualReviewPanel(e)+simpleAttemptHistory(t,e)+(e.usage_note?`
Usage incomplete

${esc(e.usage_note)}

`:'')+`
${views.map(v=>`${esc(v.replaceAll('_',' ').toUpperCase())}`).join('')}
Native spectator recording · ${m.width} × ${m.height} · ${m.duration_s.toFixed(2)} s

${views.length} native ${m.recording.views[0].height}p views captured at ${m.source_fps} FPS; ${m.recording.dropped_samples?num(m.recording.dropped_samples)+' capture samples dropped; ':''}edited to 4× simulation speed and ${m.output_fps} FPS. ${m.terminal_hold_s?`All ${num(m.native_frames)} recorded source frames retained; the true final frame is held for ${m.terminal_hold_s} seconds without advancing simulation. ${e.links.terminal_frame?external(e.links.terminal_frame,"Final recorded frame"):""}`:""} Agent events below use wall time and are not frame-synchronized.

${instructionPanel(t,e)}${data.instruction_correction?.task_key===t.key?panel("屋顶方向说明的纠正",`

${esc(data.instruction_correction.summary)}

${external(data.instruction_correction.evidence,"网格与原生条件核对")} · ${external(data.instruction_correction.video,"错误措辞回合的视频")} · ${external(data.instruction_correction.session,"完整 session")} · ${external(data.instruction_correction.native_verdict,"原生判定")}

`):""}${data.supplemental_verifications?.[t.key]?panel('Verifier 与环境不对齐',`

${esc(data.supplemental_verifications[t.key].summary)}

独立物理验证 · 0 次模型调用 · 不计入正式成功率

查看按下、撤手与回弹记录 →
`):''}${panel('运行分析',`${r?`
${failureBadge(r)}

${esc(r.reason)}

`:''}
${Object.entries(e.analysis).filter(([k])=>k!=='preflight').map(([,v])=>`

${esc(v)}

`).join('')}
${r?.trace_event_ids?`

查看引用的 session 事件:

${r.trace_event_ids.map(id=>``).join('')}
`:''}`,'wide-panel')}
${panel('Episode metrics',`
${metrics.map(([v,l,s])=>`
${v}${l}${s}
`).join('')}

Native reward: ${num(e.native_reward??(e.success?1:0))} · termination: ${esc(e.verdict.termination)}
Uncached input: ${num(u.uncached_input_tokens)} · cost: ${u.cost_usd==null?'unavailable':u.cost_usd}
Execution: ${esc(e.execution.status)}${e.execution.reason?' · '+esc(e.execution.reason):''}.

`)}${e.phase==='preflight'?`
Preserved preflight result

${esc(e.analysis.preflight)}

${external(e.links.provenance,'Build provenance')}
`:''}
`+ panel('Session & observations',`

Loading session counts… Tool inputs and outputs are expandable; the native session download retains the full event format. Event timestamps are in UTC.

Loading…
`,'wide-panel')+ panel('Agent resources',e.resources.length?`

Final tool and memo files written during this episode. Native session edits preserve their development history.

Open file ↗
Loading…
`:'

No tool or memo files were saved in this episode. The session and workspace evidence remain available below.','wide-panel')+ panel('Evidence & provenance',`

Lightweight public evidence is stored in the Dataset. Host paths are redacted in copies; original event IDs, native verdicts and usage are preserved.

${reviewEvidence}
${Object.entries(e.links).filter(([k])=>!['poster','transcript'].includes(k)).map(([k,v])=>external(v,k.replaceAll('_',' '))).join('')}
Source revisions and measured build identities
${esc(JSON.stringify(e.provenance,null,2))}
`,'wide-panel')+recordingRepairHistory(t,e); $('#playback-speed').onchange=()=>{$('#episode-video').playbackRate=Number($('#playback-speed').value);}; if(e.resources.length){ const loadResource=async()=>{const file=$('#resource-select').value;$('#resource-download').href=file;const r=await fetch(file);if(!r.ok)throw Error('Resource unavailable');const txt=await r.text();if(epoch===routeEpoch&&$('#resource-select').value===file)$('#resource-preview').textContent=txt;}; $('#resource-select').onchange=()=>loadResource().catch(showError);await loadResource();if(epoch!==routeEpoch)return; } const response=await fetch(e.links.transcript);if(!response.ok)throw Error('Could not load transcript');const events=await response.json();if(epoch!==routeEpoch)return; const images=events.flatMap(v=>v.parts.filter(p=>p.type==='image')); $('#session-counts').textContent=`${events.length} visible session events · ${images.length} observed images. Tool inputs and outputs are expandable; the native session download retains the full event format. Event timestamps are in UTC.`; $('#gallery summary').textContent=`Browse ${images.length} agent observation images`; const base=e.asset_base||e.links.transcript.slice(0,e.links.transcript.lastIndexOf('/')+1);let count=24; function renderEvents(){ const filter=$('#event-filter').value,q=$('#event-search').value.toLowerCase(); const selected=events.filter(v=>(filter==='all'||filter==='tools'&&v.role==='toolResult'||filter==='errors'&&v.error||filter==='assistant'&&v.role==='assistant'||filter==='images'&&v.parts.some(p=>p.type==='image'))&&JSON.stringify(v).toLowerCase().includes(q)); $('#event-count').textContent=`${Math.min(count,selected.length)} / ${selected.length} events`; $('#timeline').innerHTML=selected.slice(0,count).map(v=>{ const text=v.parts.map(p=>p.type==='text'?p.text:p.type==='tool'?p.name:'[image]').join(' ').trim(); return `
${esc(v.tool||v.role)}${esc(text.slice(0,160)||v.id)}${v.error?'error':''}
Event ${esc(v.id)} · ${esc(v.timestamp)}
${v.parts.map(p=>p.type==='image'?`Agent observation at event ${esc(v.id)}`:`
${esc(p.type==='tool'?JSON.stringify({tool:p.name,input:p.input},null,2):p.text)}
`).join('')}
`; }).join('');$('#more-events').hidden=count>=selected.length; } document.querySelectorAll('.review-event').forEach(button=>button.onclick=()=>{$('#event-filter').value='all';$('#event-search').value=button.dataset.eventId;count=24;renderEvents();const event=document.querySelector('.event[data-event="'+button.dataset.eventId+'"]');if(event){event.open=true;event.scrollIntoView({block:'center'});}}); $('#event-filter').onchange=()=>{count=24;renderEvents();};$('#event-search').oninput=()=>{count=24;renderEvents();};$('#more-events').onclick=()=>{count+=24;renderEvents();};renderEvents(); $('#observation-grid').innerHTML=events.flatMap(v=>v.parts.filter(p=>p.type==='image').map(p=>`Observed image, event ${esc(v.id)}${esc(v.id)}`)).join(''); $('#detail').dataset.ready='true'; } function showError(e){console.error(e);const p=document.createElement('p');p.setAttribute('role','alert');p.textContent='An asset could not be loaded. Please refresh or open the Dataset evidence.';$('#detail').append(p);} async function route(){ const epoch=++routeEpoch,hash=decodeURIComponent(location.hash.slice(1)); const video=$('#episode-video');if(video)video.pause(); if(hash.startsWith('task/')){ const [taskKey,query]=hash.slice(5).split("?");const task=data.tasks.find(t=>t.key===taskKey);$('#browse').hidden=true;$('#detail').hidden=false;$('#detail').dataset.ready='false';$('#detail').dataset.taskKey=taskKey;window.scrollTo(0,0); if(!task){$('#detail').innerHTML='← All tasks

Task not found

';return;} document.title=task.title+' · Codex Benchmark';if(query)window.history.replaceState(null,'','#task/'+task.key);const e=data.episodes.find(e=>e.task_key===task.key&&e.id===task.episode_id); if(e)await renderResult(task,e,epoch);else{$('#detail').innerHTML=renderPending(task);$('#detail').dataset.ready='true';} }else{ $('#detail').hidden=true;$('#detail').innerHTML='';$('#browse').hidden=false;document.title=data.title+' · RLE-Bench'; if(hash){if(!document.getElementById(hash)&&data.families.some(f=>f.id===hash)){$('#search').value='';$('#status-filter').value='all';$('#failure-filter').value='all';renderCards();}requestAnimationFrame(()=>document.getElementById(hash)?.scrollIntoView());}else window.scrollTo(0,0); } } (async()=>{try{const r=await fetch('data.json');if(!r.ok)throw Error('Data index unavailable');data=await r.json();renderOverview();$('#loading').hidden=true;$('#search').oninput=renderCards;$('#status-filter').onchange=renderCards;$('#failure-filter').onchange=renderCards;window.addEventListener('hashchange',()=>route().catch(showError));await route();document.body.dataset.ready='true';}catch(e){$('#loading').textContent='Could not load benchmark data. Please refresh or open the Dataset.';console.error(e);}})();