import fs from 'node:fs';
import assert from 'node:assert/strict';
const dir='reports/bridge-installation-fixes-20260925';
const reports=['bridge-installation-fixes-20260925-007','bridge-installation-fixes-20260925-008'];
const results=reports.map(name=>({name,result:JSON.parse(fs.readFileSync(`reports/${name}/result.json`,'utf8'))}));
for(const {name,result} of results)assert.equal(result.pass,true,name);
fs.mkdirSync(dir,{recursive:true});
const figures=[
['007','88',8,1,'007:新泵安装后的第一颗螺栓,已到孔位,等待拖入扳手。'],
['008','89',10,2,'008 第 10 步:大腔螺栓在安装位置等待工具,暂存台上的其余零件保持原位。'],
['008','89',14,3,'008 第 14 步:第 3 颗小腔螺栓,从安装面正面观察。'],
];
for(const [suffix,id,step,bolt] of figures)assert.ok(fs.existsSync(`reports/bridge-installation-fixes-20260925-${suffix}/task-${id}-mount-step-${step}-bolt-${bolt}.png`));
fs.writeFileSync(`${dir}/index.html`,`
螺栓安装、油堵拆卸与平衡阀视角修正
螺栓安装、油堵拆卸与平衡阀视角修正
2026-09-25 · 本地 6180 → 6100 Gateway · 维护账号教员预览 · 真实鼠标点击、工具拖放和服务端预览校验。
完成内容
- 007、008 回装螺栓时,先把当前螺栓从暂存台送到安装孔,再等待学员用扳手紧固。搬运不完成子操作,不生成紧固证据。
- 008 第 9、13 步的油堵直接点击或拖动取下;第 4、8 步封堵仍使用工具箱油堵。
- 008 两侧螺栓按真实安装面法线设置视角,互换后的阀体跟随目的安装面。被交换阀体遮住的螺栓仍可见、可拾取。
- 保存失败恢复到待紧固位置,允许再次使用工具;不改写已发布任务、步骤数量或评分规则。
验证
相关 Node 自动测试、正式路由契约和前端生产构建通过。007、008 全流程使用正式页面与预览接口;模拟最后一颗安装螺栓保存失败并重试。未创建学员成绩或测试教学任务。
${results.map(({name,result})=>`- ${name}:通过,${result.checks.length} 条检查,${result.errors.length} 个页面脚本错误。
`).join('')}
${figures.map(([suffix,id,step,bolt,caption])=>`
${caption}`).join('')}
`);
console.log(`${dir}/index.html`);