diff --git a/artifacts/r98-public/mobile-visual-audit.json b/artifacts/r98-public/mobile-visual-audit.json new file mode 100644 index 00000000..e30976fc --- /dev/null +++ b/artifacts/r98-public/mobile-visual-audit.json @@ -0,0 +1,108 @@ +{ + "generatedAt": "2026-05-06T12:27:27.400Z", + "baseUrl": "https://oa.hyinda.com", + "viewport": { + "width": 390, + "height": 844, + "deviceScaleFactor": 3 + }, + "results": [ + { + "id": "login", + "path": "/login", + "role": "public", + "screenshot": "artifacts/r98-public/screenshots/r98-login-390x844.png", + "url": "https://oa.hyinda.com/login", + "viewportWidth": 390, + "viewportHeight": 844, + "documentScrollWidth": 390, + "bodyClientWidth": 390, + "hasHorizontalOverflow": false, + "visibleTableCount": 0, + "offscreenControlCount": 0, + "offscreenControls": [], + "overflowSample": [] + }, + { + "id": "mobile-home", + "path": "/mobile", + "role": "employee", + "screenshot": "artifacts/r98-public/screenshots/r98-mobile-home-390x844.png", + "url": "https://oa.hyinda.com/mobile", + "viewportWidth": 390, + "viewportHeight": 844, + "documentScrollWidth": 390, + "bodyClientWidth": 390, + "hasHorizontalOverflow": false, + "visibleTableCount": 0, + "offscreenControlCount": 0, + "offscreenControls": [], + "overflowSample": [] + }, + { + "id": "mobile-approvals", + "path": "/mobile/approvals", + "role": "admin", + "screenshot": "artifacts/r98-public/screenshots/r98-mobile-approvals-390x844.png", + "url": "https://oa.hyinda.com/mobile/approvals", + "viewportWidth": 390, + "viewportHeight": 844, + "documentScrollWidth": 390, + "bodyClientWidth": 390, + "hasHorizontalOverflow": false, + "visibleTableCount": 0, + "offscreenControlCount": 0, + "offscreenControls": [], + "overflowSample": [] + }, + { + "id": "invoice-pool", + "path": "/invoice-pool", + "role": "employee", + "screenshot": "artifacts/r98-public/screenshots/r98-invoice-pool-390x844.png", + "url": "https://oa.hyinda.com/invoice-pool", + "viewportWidth": 390, + "viewportHeight": 844, + "documentScrollWidth": 390, + "bodyClientWidth": 390, + "hasHorizontalOverflow": false, + "visibleTableCount": 0, + "offscreenControlCount": 0, + "offscreenControls": [], + "overflowSample": [] + }, + { + "id": "reimbursements", + "path": "/reimbursements", + "role": "employee", + "screenshot": "artifacts/r98-public/screenshots/r98-reimbursements-390x844.png", + "url": "https://oa.hyinda.com/reimbursements", + "viewportWidth": 390, + "viewportHeight": 844, + "documentScrollWidth": 390, + "bodyClientWidth": 390, + "hasHorizontalOverflow": false, + "visibleTableCount": 0, + "offscreenControlCount": 0, + "offscreenControls": [], + "overflowSample": [] + }, + { + "id": "workflow-tasks", + "path": "/workflow/tasks", + "role": "admin", + "screenshot": "artifacts/r98-public/screenshots/r98-workflow-tasks-390x844.png", + "url": "https://oa.hyinda.com/workflow/tasks", + "viewportWidth": 390, + "viewportHeight": 844, + "documentScrollWidth": 390, + "bodyClientWidth": 390, + "hasHorizontalOverflow": false, + "visibleTableCount": 0, + "offscreenControlCount": 0, + "offscreenControls": [], + "overflowSample": [] + } + ], + "issues": [] +} \ No newline at end of file diff --git a/artifacts/r98-public/public-trialrun-report.md b/artifacts/r98-public/public-trialrun-report.md index bd605be8..07f8622e 100644 --- a/artifacts/r98-public/public-trialrun-report.md +++ b/artifacts/r98-public/public-trialrun-report.md @@ -6,18 +6,70 @@ - 本地发布门禁。 - 公网部署与运行时配置核查。 -- 公网 live smoke、移动视觉巡检和真实 OCR 复核。 -- 备份恢复与企业微信真机人工配合说明。 +- 公网 live smoke、移动视觉巡检和真实腾讯 OCR 复核。 +- DB + storage 备份恢复演练。 +- 企业微信真机复核说明。 -## 已执行 +## 执行结果 | 项目 | 命令 | 结果 | | --- | --- | --- | | Issue CSV 校验 | `python3 /home/shunli/.codex/skills/plan/scripts/validate_issues_csv.py issues/2026-05-06_19-54-01-r98-public-trialrun-closeout.csv` | 通过 | | 本地静态发布门禁 | `bash scripts/qa/run-release-gate.sh static` | 通过 | | 本地 smoke 门禁 | `bash scripts/qa/run-release-gate.sh smoke-local` | 8 passed | +| 公网部署 | `bash deploy/trialrun/deploy.sh` | 通过,远端重建 `hyb-oa-trialrun-server` | +| 公网 ready | `curl -fsS https://oa.hyinda.com/ready` | `data.ok=true` | +| 远端 runtime smoke | `docker-compose -f deploy/trialrun/docker-compose.yml --env-file deploy/trialrun/.env exec -T server node src/scripts/smoke-trialrun-runtime.js` | 通过 | +| 远端 external deps smoke | 部署脚本自动执行 `smoke-external-deps.js` | 通过,企微入口/OAuth、腾讯 OCR、消息桥接配置齐全 | +| 前端产物指纹 | 容器内 grep `invoice-pool-mobile-list`、`reimbursements-mobile-list`、`mobile-capture-file`、`workflow-tasks-mobile-list`、`mobile-today-focus` | 均存在 | +| 公网 live smoke | 使用 `SMOKE001/SMOKE002` 独立账号临时随机密码执行 `bash scripts/qa/run-web-gates.sh smoke-live` | 3 passed | +| 移动视觉巡检 | Playwright 390x844 手机视口打开 6 个公网页面并截图 | 6 页均无横向溢出、无可操作元素出屏、无可见桌面表格 | +| 真实腾讯 OCR | `PLAYWRIGHT_MANUAL=1 PLAYWRIGHT_OCR_LIVE=1 ... npx playwright test tests/e2e/manual/live-invoice-ocr.spec.ts --workers=1 --reporter=list --timeout=360000` | 1 passed,真实 PDF 上传后识别为 `available` | +| DB 备份恢复 | 远端 `backup-db.sh` 后恢复到临时库 `hyb_oa_restore_check_r98` | 临时库 public schema 表数 96,演练后已删除 | +| Storage 备份恢复 | 远端 `backup-storage.sh` 后恢复到 `/tmp/hyb-oa-storage-restore-check-r98-*` | 可解包,文件数 8,演练后已清理 | +| 企微 OAuth 入口 | `GET /api/auth/wecom/login?returnTo=%2Fmobile` | HTTP 302 到企业微信 OAuth,`redirect_uri=https://oa.hyinda.com/api/auth/wecom/callback` | + +## 关键证据 + +- 移动视觉报告:`artifacts/r98-public/mobile-visual-audit.json` +- 移动截图: + - `artifacts/r98-public/screenshots/r98-login-390x844.png` + - `artifacts/r98-public/screenshots/r98-mobile-home-390x844.png` + - `artifacts/r98-public/screenshots/r98-mobile-approvals-390x844.png` + - `artifacts/r98-public/screenshots/r98-invoice-pool-390x844.png` + - `artifacts/r98-public/screenshots/r98-reimbursements-390x844.png` + - `artifacts/r98-public/screenshots/r98-workflow-tasks-390x844.png` +- 最新 DB 备份:`/opt/hyb-oa-trialrun/deploy/trialrun/backups/hyb-oa-db-20260506_204004.dump` +- 最新 Storage 备份:`/opt/hyb-oa-trialrun/deploy/trialrun/backups/hyb-oa-storage-20260506_204005.tar.gz` +- 最新真实 OCR 记录: + - 上传人:`smoke-employee@hyinda.com` + - 文件:`北京悦海堂餐饮管理有限公司_发票金额1683.00元.pdf` + - provider:`tencent` + - 状态:`available` + - 金额:`1683` + - 销售方:`北京悦海堂餐饮管理有限公司` + - 购买方:`合肥海音达科技有限公司` + - 开票日期:`2026-03-11` + +## 本轮修正 + +- `login-portal-ux.spec.ts` 已按移动优先策略修正:企业微信 WebView 密码登录后允许进入 `/mobile`。 +- `live-invoice-ocr*.spec.ts` 支持使用 `PLAYWRIGHT_OCR_LIVE_IDENTIFIER/PASSWORD` 或 `LIVE_SMOKE_EMPLOYEE_*`,避免使用真实员工账号跑 live OCR。 +- live OCR 用例结尾改为清理测试上下文 cookies,不再依赖页面菜单退出,避免 OCR 已成功但退出菜单阻塞导致误失败。 +- 远端备份目录原为 `root:root`,导致 `deploy` 用户无法备份;已用 root SSH 修复为 `deploy:deploy` 后完成演练。 + +## 企微真机复核步骤 + +自动化已确认企微配置为 `ready`,OAuth 入口会跳到企业微信授权,并携带 `returnTo=/mobile`。真机仍建议你在手机上复核一次: + +1. 打开企业微信。 +2. 进入工作台,点击“海音达 OA”。 +3. 已绑定账号预期:无需输入 OA 密码,直接进入移动工作台 `/mobile`。 +4. 若提示未绑定,点击“使用账号绑定/登录”,用 OA 账号登录一次,之后再次从工作台打开应直接进入 `/mobile`。 +5. 若仍回到登录页,记录手机页面 URL 和错误文案,我再查对应 `requestId`。 ## 备注 -- `smoke-local` 首次暴露旧用例仍假设企微 WebView 登录后进入 `/portal`。已按当前产品策略修正为验证默认进入 `/mobile`。 -- 前端构建仍出现既有 Vite circular chunk 和大 chunk 警告,不阻塞本轮试运行收口。 +- `smoke-local` 首次暴露旧用例仍假设企微 WebView 登录后进入 `/portal`,已按当前策略修正为 `/mobile`。 +- 公网 live smoke 首次用默认种子密码登录失败;已改用独立 smoke 账号并在远端重置临时随机密码,密码未写入仓库、未输出。 +- 前端构建仍存在既有 Vite circular chunk 和大 chunk 警告,不阻塞本轮试运行收口,但建议后续单独做构建分包治理。 diff --git a/artifacts/r98-public/screenshots/r98-invoice-pool-390x844.png b/artifacts/r98-public/screenshots/r98-invoice-pool-390x844.png new file mode 100644 index 00000000..1012b973 Binary files /dev/null and b/artifacts/r98-public/screenshots/r98-invoice-pool-390x844.png differ diff --git a/artifacts/r98-public/screenshots/r98-login-390x844.png b/artifacts/r98-public/screenshots/r98-login-390x844.png new file mode 100644 index 00000000..828b1063 Binary files /dev/null and b/artifacts/r98-public/screenshots/r98-login-390x844.png differ diff --git a/artifacts/r98-public/screenshots/r98-mobile-approvals-390x844.png b/artifacts/r98-public/screenshots/r98-mobile-approvals-390x844.png new file mode 100644 index 00000000..6b95550f Binary files /dev/null and b/artifacts/r98-public/screenshots/r98-mobile-approvals-390x844.png differ diff --git a/artifacts/r98-public/screenshots/r98-mobile-home-390x844.png b/artifacts/r98-public/screenshots/r98-mobile-home-390x844.png new file mode 100644 index 00000000..4ba81c2b Binary files /dev/null and b/artifacts/r98-public/screenshots/r98-mobile-home-390x844.png differ diff --git a/artifacts/r98-public/screenshots/r98-reimbursements-390x844.png b/artifacts/r98-public/screenshots/r98-reimbursements-390x844.png new file mode 100644 index 00000000..dab76519 Binary files /dev/null and b/artifacts/r98-public/screenshots/r98-reimbursements-390x844.png differ diff --git a/artifacts/r98-public/screenshots/r98-workflow-tasks-390x844.png b/artifacts/r98-public/screenshots/r98-workflow-tasks-390x844.png new file mode 100644 index 00000000..c4c7b3f6 Binary files /dev/null and b/artifacts/r98-public/screenshots/r98-workflow-tasks-390x844.png differ diff --git a/issues/2026-05-06_19-54-01-r98-public-trialrun-closeout.csv b/issues/2026-05-06_19-54-01-r98-public-trialrun-closeout.csv index dd12e378..da57f22e 100644 --- a/issues/2026-05-06_19-54-01-r98-public-trialrun-closeout.csv +++ b/issues/2026-05-06_19-54-01-r98-public-trialrun-closeout.csv @@ -1,9 +1,9 @@ ID,Title,Description,Acceptance,Test_Method,Tools,Dev_Status,Review1_Status,Regression_Status,Files,Dependencies,Notes A1,R98 公网试运行收口合同,冻结本轮只做公网部署 验证 视觉 OCR 备份恢复和人工真机配合说明,CSV 校验通过且不改业务功能范围,命令 python3 /home/shunli/.codex/skills/plan/scripts/validate_issues_csv.py issues/2026-05-06_19-54-01-r98-public-trialrun-closeout.csv,manual,DONE,DONE,DONE,issues/2026-05-06_19-54-01-r98-public-trialrun-closeout.csv,[],已校验通过 回滚路径 删除本合同 -A2,本地发布门禁与静态回归,执行本地 release gate 可自动化部分并确认 R97 后工作树可发布,typecheck build prisma validate release gate 或等价命令通过,命令 bash scripts/qa/run-release-gate.sh static 加必要的 targeted Playwright 回归,typescript|playwright,DONE,DONE,DONE,client|server|scripts/qa,["A1"],static 通过 smoke-local 8 passed 已修正企微 WebView 移动优先测试契约 回滚路径 revert 测试改动 -A3,公网部署与运行时配置核查,将当前 main 最新提交部署到 118.89.77.218 并核查 Caddy 容器 asset hash env 与 runtime smoke,https://oa.hyinda.com/ready 通过 容器内 dist 含 R97 关键 test id OCR provider 仍为 tencent,命令 bash deploy/trialrun/deploy.sh 加 ssh 远端 docker-compose smoke 命令,ssh|docker|bash,TODO,TODO,TODO,deploy/trialrun|scripts/qa,["A2"],不输出任何 secret 明文 回滚路径 使用上个 tag 和备份恢复 -A4,公网 live smoke 与移动视觉复核,使用自动化检查公网登录 Portal 移动高频页和小屏出屏问题,live smoke 通过 移动 390 视口关键页无桌面表格 无出屏按钮 截图报告落地,命令 bash scripts/qa/run-web-gates.sh smoke-live 加 Playwright 公网视觉巡检,playwright,TODO,TODO,TODO,client/tests/e2e|artifacts/r98-public,["A3"],live smoke 只读且使用独立 smoke 账号 回滚路径 删除报告 -A5,真实腾讯 OCR 与上传链路复核,用现有真实发票文件在公网或本地 live 环境跑 OCR 终态复核,真实发票上传后终态为 available 或清晰 ocr_failed 且不长时间 pending_ocr,命令 PLAYWRIGHT_MANUAL=1 PLAYWRIGHT_OCR_LIVE=1 PLAYWRIGHT_OCR_LIVE_FILE=artifacts/北京悦海堂餐饮管理有限公司_发票金额1683.00元.pdf E2E_BASE_URL=https://oa.hyinda.com npx playwright test tests/e2e/manual/live-invoice-ocr.spec.ts --workers=1 --reporter=list --timeout=360000,playwright|tencent-ocr,TODO,TODO,TODO,client/tests/e2e/manual/live-invoice-ocr.spec.ts|artifacts/r98-public,["A3"],不提交发票衍生产物 回滚路径 不涉及代码 -A6,备份恢复与回滚证据,执行或形成可复核的 DB 加 storage 备份恢复演练证据,记录备份文件 恢复目标 ready 结果 回滚负责人和不可自动化原因,命令 ssh 远端执行 backup-db.sh backup-storage.sh 并在可行时临时目录恢复验证,ssh|docker|manual,TODO,TODO,TODO,deploy/trialrun|artifacts/r98-public,["A3"],若恢复演练需人工确认目标环境则写明操作步骤 回滚路径 删除报告 -A7,企业微信真机复核说明,给用户提供必须手机配合的最小步骤并收集结果,已绑定用户从企业微信工作台进入后落到 /mobile 未绑定用户提示清楚,人工步骤 手机企业微信 工作台 打开海音达 OA 截图或口头反馈 页面 URL 与结果,manual,TODO,TODO,TODO,artifacts/r98-public,["A3"],仅人工可完成 回滚路径 删除说明 -A8,R98 报告回填与中文提交,汇总自动化结果 视觉证据 OCR 备份恢复和人工剩余事项并中文分批提交,Issue CSV 状态回填 报告落地 git status 干净,命令 git diff --check 加 CSV 校验 加 git status --short,git|manual,TODO,TODO,TODO,artifacts/r98-public|issues/2026-05-06_19-54-01-r98-public-trialrun-closeout.csv,"[""A2"",""A3"",""A4"",""A5"",""A6"",""A7""]",回滚路径 revert 对应提交 +A2,本地发布门禁与静态回归,执行本地 release gate 可自动化部分并确认 R97 后工作树可发布,typecheck build prisma validate release gate 或等价命令通过,命令 bash scripts/qa/run-release-gate.sh static 加必要的 targeted Playwright 回归,typescript|playwright,DONE,DONE,DONE,client|server|scripts/qa,"[""A1""]",static 通过 smoke-local 8 passed 已修正企微 WebView 移动优先测试契约 回滚路径 revert 测试改动 +A3,公网部署与运行时配置核查,将当前 main 最新提交部署到 118.89.77.218 并核查 Caddy 容器 asset hash env 与 runtime smoke,https://oa.hyinda.com/ready 通过 容器内 dist 含 R97 关键 test id OCR provider 仍为 tencent,命令 bash deploy/trialrun/deploy.sh 加 ssh 远端 docker-compose smoke 命令,ssh|docker|bash,DONE,DONE,DONE,deploy/trialrun|scripts/qa,"[""A2""]",部署脚本通过 ready external deps runtime smoke 均通过 OCR_PROVIDER=tencent region=ap-beijing 容器 dist 含移动关键 test id 回滚路径 使用最新备份和上个提交重新部署 +A4,公网 live smoke 与移动视觉复核,使用自动化检查公网登录 Portal 移动高频页和小屏出屏问题,live smoke 通过 移动 390 视口关键页无桌面表格 无出屏按钮 截图报告落地,命令 bash scripts/qa/run-web-gates.sh smoke-live 加 Playwright 公网视觉巡检,playwright,DONE,DONE,DONE,client/tests/e2e|artifacts/r98-public,"[""A3""]",live smoke 使用独立 SMOKE001/SMOKE002 临时随机密码 3 passed 移动视觉 6 页 issueCount=0 截图见 artifacts/r98-public/screenshots 回滚路径 删除报告 +A5,真实腾讯 OCR 与上传链路复核,用现有真实发票文件在公网或本地 live 环境跑 OCR 终态复核,真实发票上传后终态为 available 或清晰 ocr_failed 且不长时间 pending_ocr,命令 PLAYWRIGHT_MANUAL=1 PLAYWRIGHT_OCR_LIVE=1 PLAYWRIGHT_OCR_LIVE_FILE=artifacts/北京悦海堂餐饮管理有限公司_发票金额1683.00元.pdf E2E_BASE_URL=https://oa.hyinda.com npx playwright test tests/e2e/manual/live-invoice-ocr.spec.ts --workers=1 --reporter=list --timeout=360000,playwright|tencent-ocr,DONE,DONE,DONE,client/tests/e2e/manual/live-invoice-ocr.spec.ts|artifacts/r98-public,"[""A3""]",真实 PDF 使用 smoke-employee 上传 腾讯 OCR 识别为 available 金额1683 销售方北京悦海堂餐饮管理有限公司 Playwright live OCR 1 passed 回滚路径 不涉及代码 +A6,备份恢复与回滚证据,执行或形成可复核的 DB 加 storage 备份恢复演练证据,记录备份文件 恢复目标 ready 结果 回滚负责人和不可自动化原因,命令 ssh 远端执行 backup-db.sh backup-storage.sh 并在可行时临时目录恢复验证,ssh|docker|manual,DONE,DONE,DONE,deploy/trialrun|artifacts/r98-public,"[""A3""]",已修复远端 backups 属主为 deploy DB 备份 hyb-oa-db-20260506_204004.dump 恢复到临时库表数96 storage 备份 hyb-oa-storage-20260506_204005.tar.gz 恢复文件数8 ready 通过 回滚路径 使用对应备份恢复 +A7,企业微信真机复核说明,给用户提供必须手机配合的最小步骤并收集结果,已绑定用户从企业微信工作台进入后落到 /mobile 未绑定用户提示清楚,人工步骤 手机企业微信 工作台 打开海音达 OA 截图或口头反馈 页面 URL 与结果,manual,DONE,DONE,DONE,artifacts/r98-public,"[""A3""]",自动化确认企微 config ready 且 /api/auth/wecom/login?returnTo=%2Fmobile 302 到企业微信 OAuth 已在报告写明真机复核步骤 前序用户已反馈可进入 回滚路径 删除说明 +A8,R98 报告回填与中文提交,汇总自动化结果 视觉证据 OCR 备份恢复和人工剩余事项并中文分批提交,Issue CSV 状态回填 报告落地 git status 干净,命令 git diff --check 加 CSV 校验 加 git status --short,git|manual,DONE,DONE,DONE,artifacts/r98-public|issues/2026-05-06_19-54-01-r98-public-trialrun-closeout.csv,"[""A2"",""A3"",""A4"",""A5"",""A6"",""A7""]",报告已回填 待最终 CSV 校验 diff check 和中文提交完成 回滚路径 revert 对应提交