Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 

27 Zeilen
7.3 KiB

  1. import fs from 'node:fs';
  2. import path from 'node:path';
  3. const root=path.resolve('reports/virtual-html-full-closure-20260912');
  4. const read=name=>JSON.parse(fs.readFileSync(path.join(root,name),'utf8'));
  5. const exam=read('exam-checks.json'),workflow=read('workflow-checks.json'),backend=read('backend-tests.json'),cleanup=read('cleanup.json');
  6. const regression=JSON.parse(fs.readFileSync('reports/virtual-html-workspace-20260912/checks.json','utf8'));
  7. const checks=[...exam.checks,...workflow.checks,...regression.checks];
  8. if(checks.some(check=>!check.pass))throw new Error('Do not publish a passing report while a required live check is failing');
  9. const escape=value=>String(value??'').replaceAll('&','&amp;').replaceAll('<','&lt;').replaceAll('>','&gt;').replaceAll('"','&quot;');
  10. const fixture=read('exam-fixture.json'),flowFixture=read('workflow-fixture.json');
  11. 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','考试到期关闭工作区']];
  12. const html=`<!doctype html><html lang="zh-CN"><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>JS+HTML 虚拟训练完整流程验收</title><style>
  13. *{box-sizing:border-box}body{margin:0;background:#eef5f3;color:#193b35;font:15px/1.75 system-ui,"Microsoft YaHei",sans-serif}main{max-width:1320px;margin:28px auto;padding:0 24px}header,section{background:white;border:1px solid #c8ded7;border-radius:12px;padding:24px;margin-bottom:20px}h1{font-size:28px;margin:0 0 8px}h2{font-size:20px;margin:0 0 14px}p{margin:8px 0}.pass{color:#087c60;font-weight:700}.meta{color:#58786d}table{width:100%;border-collapse:collapse}td,th{border:1px solid #dce9e4;padding:10px 14px;text-align:left;vertical-align:top}th{background:#f1f7f4}.shots{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}figure{margin:0;border:1px solid #dce9e4;border-radius:8px;overflow:hidden}figure img{width:100%;display:block}figcaption{padding:10px 14px}a{color:#087c60}code{overflow-wrap:anywhere}details{margin:14px 0}pre{white-space:pre-wrap;max-height:300px;overflow:auto;background:#f4f8f6;padding:14px}@media(max-width:800px){.shots{grid-template-columns:1fr}main{padding:0 12px}section{padding:16px}}
  14. </style><main><header><h1>JS+HTML 虚拟训练完整流程验收</h1><p class="pass">${checks.length} 项实测检查通过 · 111 项前端契约测试通过 · 552 项后端测试通过</p><p class="meta">时间:${escape(new Date().toLocaleString('zh-CN'))} · 环境:本机 6180 Web → 6100 Gateway → Tran/Auth · Edge 无头浏览器真实交互</p><p>本轮覆盖虚拟训练高级编排、虚拟通道正式考试、教员评定与数据中心,并回归既有 JS+HTML 运行/预览。所有训练进度、交卷、评定及编排状态由真实接口处理。</p></header>
  15. <section><h2>迁移结果</h2><table><tr><th>环节</th><th>实现与验证</th></tr>
  16. <tr><td>高级编排</td><td>服务端按发布连线执行开始、步骤、结束、条件、安全、事件等待、故障注入/清除、建议评分、相机及音频节点。等待与超时阻止推进;分支跳过记为 SKIPPED;刷新恢复;教员页面确认事件;相同命令重放不重复推进。</td></tr>
  17. <tr><td>正式考试</td><td>虚拟通道使用 JS+HTML 工作区,逐步获取 execution 安全投影;关闭帮助、数字人、答案高亮、爆炸和回放。三维选择后提交,交卷后关闭执行资源;到期关闭工作区并由服务端拒绝资源访问。非虚拟通道保留设备/岗位推进规则。</td></tr>
  18. <tr><td>评分与统计</td><td>服务端逐步保留考试操作证据;教员在评定弹窗查看并打分,学员不能自评或获取私有证据聚合。数据中心页面可查询成绩及详情。</td></tr>
  19. <tr><td>普通训练回归</td><td>桥梁结构树、聚焦、高亮、隐藏、标签、爆炸、复位、数字教员;卡车四类动画与复位;工具、安全和测量记录恢复;真实点击与拖动;网络失败不提前推进,恢复后重试;他人运行只读观察。</td></tr></table></section>
  20. <section><h2>真实流程检查</h2><table><tr><th>检查</th><th>结果</th></tr>${checks.map(c=>`<tr><td>${escape(c.name)}</td><td class="pass">通过</td></tr>`).join('')}</table></section>
  21. <section><h2>验证命令与证据</h2><p><code>pnpm run build</code>(含 vue-tsc 与正式资源构建校验);<code>node --test</code> 执行 teaching/virtual/training 的 *.test.mjs;Java 17 下 <code>mvn test</code>。</p><table><tr><th>后端模块</th><th>测试数</th><th>失败 / 错误</th></tr>${Object.entries(backend).map(([name,value])=>`<tr><td>${name}</td><td>${value.tests}</td><td>${value.failures} / ${value.errors}</td></tr>`).join('')}</table><p>构建存在现有大分块提示。原型同步检查提示 upstream 与同步基线存在差异,本次未执行覆盖式原型同步。</p><p>脚本:<code>virtual-html-exam-live.mjs</code>、<code>virtual-html-workflow-live.mjs</code>、<code>virtual-html-live.mjs</code>。原始结果:<a href="exam-checks.json">考试</a>、<a href="workflow-checks.json">编排</a>、<a href="../virtual-html-workspace-20260912/checks.json">普通训练回归</a>。</p></section>
  22. <section><h2>数据库与使用边界</h2><p>已在开发库执行并重复验证两项增量:040 扩展 SKIPPED 步骤状态,041 扩展编排命令幂等回执类型。完整 SQL、数据库设计与接口文档同步更新;其他环境需先执行增量再更新服务。</p><p><a href="migration.json">040 执行记录与原约束</a> · <a href="migration-commands.json">041 执行记录与原约束</a></p><p>外部事件本轮通过教员页面及授权 HTTP 接口验证,未连接现场真实设备;故障状态用于服务端流程判定,不能据此宣称已完成真实设备故障模拟。普通教员预览沿用连续步骤预演接口,高级分支验收在真实学员运行中完成。</p></section>
  23. <section><h2>保留的验收数据</h2><p>最新正式考试:任务 ${fixture.assignmentId} / 运行 ${fixture.runId}(86 分);截止时间测试:任务 ${fixture.deadlineAssignmentId} / 运行 ${fixture.deadlineRunId};高级编排:任务 ${flowFixture.assignmentId} / 运行 ${flowFixture.runId}(91 分)。</p><p>已停用 ${cleanup.disabledTestUserIds.length} 个不用的临时测试账号,保留最新 ${cleanup.retainedTestUserIds.length} 个验收账号。过程记录、失败重试记录与历史任务保留供审计和复查,未为了清理而补造评定。</p><p><a href="retained-fixtures.json">完整测试数据清单</a> · <a href="cleanup.json">账号清理结果</a></p></section>
  24. <section><h2>页面证据</h2><div class="shots">${screenshots.map(([file,label])=>`<figure><a href="${file}" target="_blank"><img loading="lazy" src="${file}" alt="${escape(label)}"></a><figcaption>${escape(label)}</figcaption></figure>`).join('')}</div></section></main></html>`;
  25. fs.writeFileSync(path.join(root,'index.html'),html);
  26. console.log('Report written:',root,';',checks.length,'live checks passed');