## 诊断流程样例\n\n### 输入\n\n- HTML: `out/reports/product_knowledge_skill_reading.html`\n- 关键文本: `核心数字`、`口径差异`、`场景库分布`、`可搜索清单`\n- 输出目录: `out/smoke/product_knowledge_skill_reading/`\n\n### 命令\n\n```bash\npython /Users/bytedance/.codex/night-gym/tools/local_html_smoke_check.py \\\n --html out/reports/product_knowledge_skill_reading.html \\\n --out out/smoke/product_knowledge_skill_reading \\\n --expect-text 核心数字 \\\n --expect-text 口径差异 \\\n --expect-text 场景库分布 \\\n --expect-text 可搜索清单\n```\n\n### 检查步骤\n\n1. 解析 HTML 并确认文件非空、标题存在。\n2. 启动临时本地服务,避免 `file://` 下资源加载差异。\n3. 用可用浏览器后端打开桌面和移动 viewport。\n4. 保存首屏截图,检查截图不是空白或纯背景。\n5. 抽取可见文本,核对关键数字和章节名。\n6. 检查 `document.body.scrollWidth <= window.innerWidth + tolerance`,捕捉横向溢出。\n7. 收集控制台错误;若存在搜索框,输入一个高频词并确认结果区没有崩溃。\n\n### 成功信号\n\n- `smoke_report.json` 中 `status=pass`。\n- `desktop.png` 和 `mobile.png` 均存在,且首屏包含主要标题和核心数字。\n- 关键文本全部命中,无横向溢出,无严重控制台错误。\n\n### 失败信号\n\n- `status=fail`,并出现 `browser_unavailable`:当前环境没有内嵌浏览器或 Playwright,需要在最终回复中明确未完成截图级验收。\n- `blank_screenshot`:页面可能白屏、资源路径错误或脚本异常。\n- `missing_expected_text`:交付摘要声称包含的核心内容没有进入页面可见文本。\n- `layout_overflow`:移动端或桌面首屏存在明显布局溢出,需要回到 HTML/CSS 修复。\n\n### 期望交付写法\n\n```markdown\n已完成 HTML 交付,并跑过本地 smoke check:\n- 报告:out/smoke/product_knowledge_skill_reading/smoke_report.json\n- 桌面截图:out/smoke/product_knowledge_skill_reading/desktop.png\n- 移动截图:out/smoke/product_knowledge_skill_reading/mobile.png\n- 结果:pass,关键章节和核心数字均可见,无横向溢出。\n```