diff --git a/.trellis/tasks/05-26-oa-frontend-postdeploy-public-verification/check.jsonl b/.trellis/tasks/05-26-oa-frontend-postdeploy-public-verification/check.jsonl new file mode 100644 index 00000000..372fa63e --- /dev/null +++ b/.trellis/tasks/05-26-oa-frontend-postdeploy-public-verification/check.jsonl @@ -0,0 +1,4 @@ +{"file": ".trellis/spec/hyb-oa/deployment-trialrun.md", "reason": "核对部署命令、部署后 smoke、生产操作边界"} +{"file": ".trellis/spec/hyb-oa/frontend-react-vite-design.md", "reason": "核对前端构建、UI 规则和视觉验证要求"} +{"file": ".trellis/spec/hyb-oa/security-privacy.md", "reason": "核对报告、证据和输出不泄露敏感信息"} +{"file": ".trellis/spec/hyb-oa/docs-and-evidence.md", "reason": "核对证据落点、相对路径和任务归档规则"} diff --git a/.trellis/tasks/05-26-oa-frontend-postdeploy-public-verification/implement.jsonl b/.trellis/tasks/05-26-oa-frontend-postdeploy-public-verification/implement.jsonl new file mode 100644 index 00000000..b92f0350 --- /dev/null +++ b/.trellis/tasks/05-26-oa-frontend-postdeploy-public-verification/implement.jsonl @@ -0,0 +1,4 @@ +{"file": ".trellis/spec/hyb-oa/deployment-trialrun.md", "reason": "公网部署、安全模式、部署后 smoke 和生产边界"} +{"file": ".trellis/spec/hyb-oa/frontend-react-vite-design.md", "reason": "前端设计规则和部署前 UI 检查"} +{"file": ".trellis/spec/hyb-oa/security-privacy.md", "reason": "报告和聊天中的敏感信息排除规则"} +{"file": ".trellis/spec/hyb-oa/docs-and-evidence.md", "reason": "验证证据、报告引用和 Trellis task 记录规则"} diff --git a/.trellis/tasks/05-26-oa-frontend-postdeploy-public-verification/implement.md b/.trellis/tasks/05-26-oa-frontend-postdeploy-public-verification/implement.md new file mode 100644 index 00000000..332505a3 --- /dev/null +++ b/.trellis/tasks/05-26-oa-frontend-postdeploy-public-verification/implement.md @@ -0,0 +1,39 @@ +# Implementation Plan + +## Sequence + +1. Confirm explicit user approval for public deployment. +2. Run deployment preflight checks: + - clean working tree + - client build + - UI design rules + - `git diff --check` +3. Deploy with safe env boundary: + - `SYNC_ENV=0 bash deploy/trialrun/deploy.sh` + - do not sync or overwrite remote `.env` +4. Run post-deploy public checks: + - live smoke readiness + - permission matrix + - OAFRONT3 PC readonly visual matrix + - mobile entry matrix + - WeCom rendering matrix +5. Save/redact report references under this task research directory. +6. If green, conclude `READY_FOR_TRIAL_START_CONFIRMATION`. + +## Stop Conditions + +- User has not explicitly approved deployment. +- Working tree is dirty outside the task. +- Deployment script fails. +- Public `/ready` fails. +- Permission matrix has issues. +- PC visual matrix has P1 blocker. +- Any report contains sensitive data. + +## Safety Boundaries + +- No production `.env` overwrite. +- No real payment. +- No Enterprise WeChat writes. +- No true business write automation. +- No database reset, restore, or manual migration. diff --git a/.trellis/tasks/05-26-oa-frontend-postdeploy-public-verification/prd.md b/.trellis/tasks/05-26-oa-frontend-postdeploy-public-verification/prd.md new file mode 100644 index 00000000..2773127a --- /dev/null +++ b/.trellis/tasks/05-26-oa-frontend-postdeploy-public-verification/prd.md @@ -0,0 +1,126 @@ +# OA 前端清障部署后公网稳态验证 + +## Goal + +将已完成并提交的 PC 前端试运行前清障改动部署到公网试运行环境,并完成部署后公网稳态验证,确保真实 7 天试运行启动前的公网版本已经覆盖最新前端改动,且 `/ready`、live smoke、权限矩阵、PC 只读视觉矩阵、移动/企业微信入口和基础隐私扫描均可解释通过。 + +本任务只做受控部署和只读验证;不改生产 `.env`,不写真实业务数据,不写企业微信,不执行真实付款,不做生产数据库恢复或重置。 + +## Scope + +- 部署当前 `main` 上已提交的前端清障改动到公网试运行环境。 +- 使用既有部署脚本和 `SYNC_ENV=0` 安全模式完成远端同步、构建、迁移状态检查、runtime smoke 和 public bundle 扫描。 +- 部署后执行公网只读验证矩阵,并保存脱敏证据引用。 +- 只处理部署后验证发现的阻断分类和证据记录;如需修复代码,另建最小修复任务。 +- 不扩大前端体验改造范围,不启动真实 7 天计数。 + +## What I Already Know + +- 当前本地 `main` 已包含前端清障提交: + - `66b3ceb oa-frontend-pretrial-cleanup 收敛PC试运行前页面风格` + - `6a99d86 oa-frontend-pretrial-cleanup 归档PC前端清障任务` +- OAOPS1 7 天试运行准备任务已完成并归档: + - `2f5c992 oaops1-seven-day-trial-prep 完成启动准备复核` + - `892de7d oaops1-seven-day-trial-prep 归档7天试运行准备任务` +- 准备任务的只读复核已通过:公网 `/ready`、live smoke/OCR 条件、企业微信配置、权限矩阵均满足启动前自动化条件。 +- 前端清障改动已在本地通过: + - `cd client && npm run build` + - `node scripts/qa/check-ui-design-rules.mjs --strict` + - `bash scripts/qa/run-web-gates.sh r106-visual-local` + - Trellis task validate / governance / `git diff --check` +- 还缺部署后公网验证;此前 PC 只读视觉矩阵通过的是当时公网版本,不能证明最新本地前端改动已经在公网生效。 + +## Requirements + +- 部署前必须确认工作区干净,并复跑必要本地门禁: + - `cd client && npm run build` + - `node scripts/qa/check-ui-design-rules.mjs --strict` + - `git diff --check` +- 部署必须使用安全模式: + - `SYNC_ENV=0 bash deploy/trialrun/deploy.sh` + - 不覆盖远端 `.env` + - 不启用额外 worker/minio,除非另行确认 +- 部署后必须记录: + - 本地部署 commit hash + - 部署脚本输出结论 + - 公网 `/ready` 结果 + - public bundle 文案扫描结果 +- 部署后必须执行公网只读验证: + - live smoke / OCR readiness + - OA 权限矩阵只读检查 + - OAFRONT3 PC 只读视觉矩阵 + - 移动入口矩阵与企业微信渲染矩阵 +- 发现 blocker 时: + - 不启动 7 天试运行 + - 不用前端隐藏或临时配置绕过 + - 记录 blocker 证据并拆最小修复任务 + +## Acceptance Criteria + +- [ ] 用户明确批准执行公网部署。 +- [ ] 部署前本地门禁通过。 +- [ ] `SYNC_ENV=0 bash deploy/trialrun/deploy.sh` 成功,不覆盖远端 `.env`。 +- [ ] 部署后公网 `/ready` 通过。 +- [ ] 部署后 live smoke / OCR readiness 通过或可解释。 +- [ ] 部署后权限矩阵 `PASS_PERMISSION_MATRIX_READY`。 +- [ ] 部署后 PC 只读视觉矩阵无 P1 blocker。 +- [ ] 部署后移动入口和企业微信渲染矩阵通过。 +- [ ] 所有报告保存到当前 task 的 `research/` 或既有 `artifacts/qa-flow/`,且只在 task 中引用脱敏相对路径。 +- [ ] Trellis validate、governance 和 `git diff --check` 通过。 + +## Definition Of Done + +- 公网试运行环境已部署到包含最新前端清障改动的 commit。 +- 部署后公网验证报告齐全,并能说明是否允许进入真实 7 天试运行人工启动确认。 +- 没有密码、token、Secret、完整账号、完整本地路径、合同正文、银行资料、原始票据或 raw payload 写入 Trellis task、docs、报告摘要或聊天。 +- 本任务归档前明确结论:`READY_FOR_TRIAL_START_CONFIRMATION`、`READY_WITH_FINDINGS` 或 `BLOCKED_POSTDEPLOY_VERIFICATION`。 + +## Out Of Scope + +- 不启动真实 7 天计数。 +- 不创建、提交、审批、付款任何真实业务单据。 +- 不写企业微信消息、通讯录、审批或回调数据。 +- 不改远端 `.env` 或生产配置。 +- 不做数据库恢复、重置、手工迁移或真实回滚。 +- 不执行真实付款、银行流水导入、ERP 写入或支付接口联调。 +- 不继续扩大前端改版范围;本任务只验证已提交的前端清障改动。 + +## Test Plan + +部署前: + +```bash +cd client && npm run build +node scripts/qa/check-ui-design-rules.mjs --strict +git diff --check +``` + +部署: + +```bash +SYNC_ENV=0 bash deploy/trialrun/deploy.sh +``` + +部署后: + +```bash +set -a && source ~/.hyb-oa/live-smoke.env && set +a +LIVE_SMOKE_BASE_URL=https://oa.hyinda.com bash scripts/qa/run-live-smoke-readiness.sh +LIVE_SMOKE_BASE_URL=https://oa.hyinda.com OA_PERMISSION_MATRIX_REPORT_DIR= node scripts/qa/check-oa-permission-matrix.mjs +bash scripts/qa/run-oafront3-pc-readonly-visual.sh +cd client && E2E_BASE_URL=https://oa.hyinda.com npx playwright test tests/e2e/dg7-mobile-information-dedupe.spec.ts tests/e2e/r124-mobile-entry-matrix.spec.ts --workers=1 --reporter=list +cd client && E2E_BASE_URL=https://oa.hyinda.com npx playwright test tests/e2e/r6-wecom-mobile-rendering-hardening.spec.ts --workers=1 --reporter=list +python3 ./.trellis/scripts/task.py validate 05-26-oa-frontend-postdeploy-public-verification +node scripts/qa/check-trellis-governance.mjs +git diff --check +``` + +## Technical Notes + +- Deployment spec: `.trellis/spec/hyb-oa/deployment-trialrun.md` +- Frontend design spec: `.trellis/spec/hyb-oa/frontend-react-vite-design.md` +- Privacy spec: `.trellis/spec/hyb-oa/security-privacy.md` +- Trial run docs: `docs/trialrun/发布试运行准备清单.md` +- Deploy script: `deploy/trialrun/deploy.sh` +- PC visual script: `scripts/qa/run-oafront3-pc-readonly-visual.sh` +- Live readiness script: `scripts/qa/run-live-smoke-readiness.sh` diff --git a/.trellis/tasks/05-26-oa-frontend-postdeploy-public-verification/task.json b/.trellis/tasks/05-26-oa-frontend-postdeploy-public-verification/task.json new file mode 100644 index 00000000..8bf67d11 --- /dev/null +++ b/.trellis/tasks/05-26-oa-frontend-postdeploy-public-verification/task.json @@ -0,0 +1,32 @@ +{ + "id": "oa-frontend-postdeploy-public-verification", + "name": "oa-frontend-postdeploy-public-verification", + "title": "OA 前端清障部署后公网稳态验证", + "description": "部署已提交的 PC 前端试运行清障改动,并完成部署后公网 live smoke、权限矩阵、PC 视觉、移动入口和企业微信渲染验证。", + "status": "planning", + "dev_type": null, + "scope": "postdeploy-public-verification", + "package": null, + "priority": "P2", + "creator": "shunli", + "assignee": "shunli", + "createdAt": "2026-05-26", + "completedAt": null, + "branch": null, + "base_branch": "main", + "worktree_path": null, + "commit": null, + "pr_url": null, + "subtasks": [], + "children": [], + "parent": null, + "relatedFiles": [ + "deploy/trialrun/deploy.sh", + "scripts/qa/run-live-smoke-readiness.sh", + "scripts/qa/run-oafront3-pc-readonly-visual.sh", + "scripts/qa/check-oa-permission-matrix.mjs", + "docs/trialrun/发布试运行准备清单.md" + ], + "notes": "", + "meta": {} +}