import fs from 'node:fs';
import path from 'node:path';
const root=path.resolve('reports/virtual-html-full-closure-20260912');
const read=name=>JSON.parse(fs.readFileSync(path.join(root,name),'utf8'));
const exam=read('exam-checks.json'),workflow=read('workflow-checks.json'),backend=read('backend-tests.json'),cleanup=read('cleanup.json');
const regression=JSON.parse(fs.readFileSync('reports/virtual-html-workspace-20260912/checks.json','utf8'));
const checks=[...exam.checks,...workflow.checks,...regression.checks];
if(checks.some(check=>!check.pass))throw new Error('Do not publish a passing report while a required live check is failing');
const escape=value=>String(value??'').replaceAll('&','&').replaceAll('<','<').replaceAll('>','>').replaceAll('"','"');
const fixture=read('exam-fixture.json'),flowFixture=read('workflow-fixture.json');
const screenshots=[['01-exam-current-step.png','正式考试:当前安全投影与实际三维选择'],['03-workflow-waiting.png','高级编排:等待外部事件,超时保持阻断'],['04-teacher-workflow-event.png','教员页面确认外部事件'],['05-workflow-submitted.png','高级编排路径完成并提交'],['06-teacher-exam-review.png','教员查看逐步考试证据并评分'],['07-exam-analytics.png','数据中心查询成绩与记录详情'],['08-exam-deadline.png','考试到期关闭工作区']];
const html=`