5.8 KiB
5.8 KiB
R104 公网部署与视觉验收报告
日期:2026-05-07
结论
R100-R103 最新变更已部署到公网 https://oa.hyinda.com,自动化验收通过。
已完成:
- 本地发布前门禁通过。
- 已创建发布 tag:
trialrun-20260507-01。 - 已执行
bash deploy/trialrun/deploy.sh部署到118.89.77.218:/opt/hyb-oa-trialrun。 - 公网
/ready通过。 - 远端
smoke-external-deps.js通过,当前 OCR provider 为tencent。 - 远端
smoke-trialrun-runtime.js通过。 - 公网 live smoke 通过:管理员、员工只读 smoke 共 3 条通过。
- 公网视觉 Playwright 通过:桌面登录、企微 OAuth 边界、移动工作台、移动报销/请假、PC 报销/票据共 4 条通过。
- 公网真实腾讯 OCR 辅助复核通过:真实 PDF 发票上传后进入可处理状态。
仍需人工确认:
- 用真实手机企业微信从工作台打开 OA 应用,确认已绑定账号直接进入
/mobile。自动化已覆盖到 OAuth 跳转边界,但不能替代真实企业微信客户端内的最终点击。
本地发布前验证
已执行:
node deploy/trialrun/validate-env-contract.js
cd server && npm run prisma:validate
node scripts/qa/check-ui-design-rules.mjs
cd client && npm run typecheck
cd client && npm run build
cd client && npx playwright test tests/e2e/r102-reimbursement-main-flow.spec.ts tests/e2e/r103-cross-page-ui-consistency.spec.ts --reporter=list
结果:
- 部署环境契约:通过。
- Prisma schema:通过。
- UI 设计规则:
0 findings。 - 前端 typecheck:通过。
- 前端 build:通过;仍有既有 Vite manual chunk circular warning,本批不处理。
- R102/R103 Playwright:
6 passed。
公网部署
已执行:
git tag -a trialrun-20260507-01 -m "trialrun release 20260507-01"
bash deploy/trialrun/deploy.sh
部署结果:
- 远端目录:
/opt/hyb-oa-trialrun - 远端环境文件:
/opt/hyb-oa-trialrun/deploy/trialrun/.env .env未从本地同步,沿用远端事实源。- 远端 server 容器已重建。
- 部署脚本内
/ready、external deps smoke 通过。 - 部署脚本本机缺少完整
LIVE_SMOKE_*,因此 live smoke 由后续步骤手动补跑。
公网配置核验
已执行:
curl -fsS https://oa.hyinda.com/ready
curl -fsS https://oa.hyinda.com/api/auth/wecom/config
curl -sSI 'https://oa.hyinda.com/api/auth/wecom/login?returnTo=%2Fmobile'
结果:
/ready:通过。- 企业微信配置:
status=readyentryEnabled=trueoauthEnabled=truedefaultReturnTo=/mobileloginUrl=/api/auth/wecom/login?returnTo=%2Fmobile
- 企业微信登录入口:
HTTP 302到open.weixin.qq.com,回调地址为https://oa.hyinda.com/api/auth/wecom/callback,state 中returnTo=/mobile。
远端关键配置只读核验:
WECOM_ENTRY_ENABLED=trueWECOM_OAUTH_ENABLED=trueOPENAPI_DOCS_ENABLED=falseCOOKIE_SECURE=truePUBLIC_SECURITY_HARDENING_ENABLED=trueOCR_PROVIDER=tencent
远端 smoke
已执行:
ssh [email protected] 'cd /opt/hyb-oa-trialrun && ... exec -T server node src/scripts/smoke-trialrun-runtime.js'
结果:
- Prisma 连接正常。
- 工作区
profile=small_team_internal。 - trialrun 必需功能开关均 enabled。
- 导航构建成功:
main=9 admin=7。 trialrun runtime smoke通过。
公网 live smoke
操作:
- 仅重置独立 smoke 账号
SMOKE001/SMOKE002随机密码。 - 密码仅作为临时环境变量传给 Playwright,未写入 git,未写入报告。
已执行:
LIVE_SMOKE_BASE_URL=https://oa.hyinda.com \
LIVE_EXPECT_WECOM_STATUS=ready \
LIVE_SMOKE_ADMIN_IDENTIFIER=[email protected] \
LIVE_SMOKE_EMPLOYEE_IDENTIFIER=[email protected] \
bash scripts/qa/run-web-gates.sh smoke-live
结果:
- 公网基础探活与企微配置状态:通过。
- 管理员只读网页 smoke:通过。
- 员工只读网页 smoke:通过。
- 总计:
3 passed。
公网视觉自动化
新增测试:
client/tests/e2e/r104-public-visual-acceptance.spec.ts
已执行:
cd client
LIVE_SMOKE_BASE_URL=https://oa.hyinda.com \
LIVE_EXPECT_WECOM_STATUS=ready \
LIVE_SMOKE_ADMIN_IDENTIFIER=[email protected] \
LIVE_SMOKE_EMPLOYEE_IDENTIFIER=[email protected] \
E2E_MODE=live \
npx playwright test tests/e2e/r104-public-visual-acceptance.spec.ts --reporter=list
结果:4 passed。
覆盖:
- 公网桌面登录页与企业微信配置。
- 公网企业微信入口跳转到 OAuth 边界。
- 公网员工移动工作台、移动报销、移动请假。
- 公网 PC 报销与票据页面。
截图输出:
output/playwright/r104/desktop-login.pngoutput/playwright/r104/mobile-login-before-wecom.pngoutput/playwright/r104/mobile-home.pngoutput/playwright/r104/mobile-reimbursements.pngoutput/playwright/r104/mobile-leave.pngoutput/playwright/r104/desktop-reimbursements.pngoutput/playwright/r104/desktop-invoice-pool.png
公网真实腾讯 OCR
远端 OCR provider 当前为 tencent,因此执行真实 PDF 发票辅助复核。
已执行:
cd client
PLAYWRIGHT_MANUAL=1 \
PLAYWRIGHT_OCR_LIVE=1 \
PLAYWRIGHT_OCR_LIVE_FILE=/home/shunli/Projects/hyb-oa/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
结果:
1 passed- 链路:真实 PDF 上传 -> 腾讯 OCR -> 进入可处理状态。
风险与后续
- 真实企业微信客户端内最终落点仍需人工确认。
- Vite manual chunk circular warning 仍存在,应单独开技术优化 Issue。
- 公网 live OCR 会在 smoke 账号下产生测试票据记录;后续如需要,可开清理或测试数据归档专项。