准备资产台账修复公网部署复检(05-31-deploy-asset-ledger-consistency-public-check)
这个提交包含在:
@@ -0,0 +1,3 @@
|
||||
{"file": ".trellis/spec/hyb-oa/project-governance.md", "reason": "Trellis 治理、提交和敏感信息边界"}
|
||||
{"file": ".trellis/spec/hyb-oa/deployment-trialrun.md", "reason": "部署后 /ready、runtime smoke、external deps smoke、bundle 扫描和 live smoke 验收"}
|
||||
{"file": ".trellis/spec/hyb-oa/security-privacy.md", "reason": "公网复检报告不得泄露账号、Secret、原始 payload 或完整敏感路径"}
|
||||
@@ -0,0 +1,3 @@
|
||||
{"file": ".trellis/spec/hyb-oa/project-governance.md", "reason": "公网部署审批、提交和证据边界"}
|
||||
{"file": ".trellis/spec/hyb-oa/deployment-trialrun.md", "reason": "公网部署命令、SYNC_ENV=0、安全边界和 smoke 要求"}
|
||||
{"file": ".trellis/spec/hyb-oa/frontend-react-vite-design.md", "reason": "部署后重点页面与台账/资产一致性复检"}
|
||||
@@ -0,0 +1,32 @@
|
||||
# 实施说明
|
||||
|
||||
## 部署策略
|
||||
|
||||
- 等待用户明确批准后执行公网部署;在获得批准前不连接远端、不运行部署脚本、不写公网数据库。
|
||||
- 部署命令固定为:
|
||||
|
||||
```bash
|
||||
SYNC_ENV=0 LIVE_SMOKE_BASE_URL=https://oa.hyinda.com bash deploy/trialrun/deploy.sh
|
||||
```
|
||||
|
||||
- `SYNC_ENV=0` 表示不覆盖远端 `.env`。
|
||||
- 部署脚本会在远端执行构建、Prisma migration deploy/status、seed、`/ready`、external deps smoke、runtime smoke 和公网 bundle 文案扫描。
|
||||
- 若本地未配置完整 `LIVE_SMOKE_*`,部署脚本会跳过网页 live smoke;跳过必须如实记录,不能写成通过。
|
||||
|
||||
## 复检策略
|
||||
|
||||
部署后独立运行:
|
||||
|
||||
```bash
|
||||
curl -fsS https://oa.hyinda.com/ready
|
||||
node scripts/qa/check-public-bundle-copy.mjs https://oa.hyinda.com
|
||||
LIVE_SMOKE_BASE_URL=https://oa.hyinda.com bash scripts/qa/run-live-smoke-readiness.sh
|
||||
cd client && E2E_BASE_URL=https://oa.hyinda.com npx playwright test tests/e2e/login-portal-ux.spec.ts tests/e2e/visual-portal.spec.ts --workers=1 --reporter=list
|
||||
```
|
||||
|
||||
## 风险控制
|
||||
|
||||
- 不同步本地 `.env`。
|
||||
- 不执行真实付款、银行流水导入、真实支付接口、ERP 写入、企业微信写入或数据库重置。
|
||||
- 不把 SKIP 写成 PASS。
|
||||
- 如部署失败,保留失败点,停止告知用户可线上测试,并优先判断是否需要回滚或拆修复任务。
|
||||
@@ -0,0 +1,95 @@
|
||||
# 部署资产与台账一致性修复并公网复检
|
||||
|
||||
## Goal
|
||||
|
||||
将当前 `main` 上已完成并本地验证通过的资产、业务台账一致性和本地启动修复部署到公网 OA,并完成公开访问复检。部署后才能告知用户可在线查看本轮页面效果。
|
||||
|
||||
## What I Already Know
|
||||
|
||||
- 当前工作区干净,最新提交包括:
|
||||
- `42a963d 归档资产 E2E 数据库漂移任务(05-31-fix-assets-e2e-schema-drift)`
|
||||
- `df6d721 记录资产 E2E 漂移验收完成(05-31-fix-assets-e2e-schema-drift)`
|
||||
- `dafd2eb 修复资产 E2E 数据库漂移(05-31-fix-assets-e2e-schema-drift)`
|
||||
- `f299cee 修正 ERP 边界与资产页面一致性(05-30-fix-erp-boundary-asset-consistency)`
|
||||
- `16fd9bd 统一业务台账首屏布局(05-30-fix-payment-ledger-layout-consistency)`
|
||||
- 本地已通过资产真实 E2E:`assets-flow.spec.ts` 建卡、领用、归还、调拨、盘点 `1 passed`。
|
||||
- 本地回归库已补齐待执行迁移;这不代表公网库已部署该批代码,公网仍需要部署脚本自行执行远端 migration status 和 init。
|
||||
- 当前产品边界固定:OA 没有 ERP,以后也不接 ERP;请假、考勤日常主办在企业微信,OA 不重复处理。
|
||||
- 公网部署属于准生产操作,必须得到用户明确部署批准后执行。
|
||||
|
||||
## Scope
|
||||
|
||||
- 使用现有部署脚本将当前 `main` 发布到 `https://oa.hyinda.com` 对应公网环境。
|
||||
- 使用 `SYNC_ENV=0`,不覆盖远端 `.env`。
|
||||
- 不执行真实业务写入、真实付款、ERP 写入、企业微信写入或数据库重置。
|
||||
- 执行部署后的公网健康、前端资源文案、live readiness 和重点页面 smoke。
|
||||
- 将部署命令、提交 hash、复检结果和是否可测试写入本任务实施记录。
|
||||
|
||||
## Requirements
|
||||
|
||||
- 部署前运行环境契约检查,避免新增配置键导致远端部署失败。
|
||||
- 部署脚本必须完成远端构建、Prisma migration deploy/status、seed、`/ready`、external deps smoke、runtime smoke 和公网 bundle 文案扫描。
|
||||
- 部署后独立复核:
|
||||
- `/ready`
|
||||
- `check-public-bundle-copy`
|
||||
- `run-live-smoke-readiness`
|
||||
- 聚焦公网 Playwright:至少覆盖登录/工作台、资产或台账一致性关键路径中当前可自动化的部分。
|
||||
- 如果缺少 `LIVE_SMOKE_*` 凭据,记录脚本跳过原因;不得把跳过说成真实登录 smoke 通过。
|
||||
- 若部署或 smoke 失败,停止告知“可线上测试”,记录失败点并优先回滚/修复。
|
||||
|
||||
## Test Plan
|
||||
|
||||
部署前:
|
||||
|
||||
```bash
|
||||
node deploy/trialrun/validate-env-contract.js
|
||||
cd server && npm run prisma:validate
|
||||
cd client && npm run build
|
||||
git diff --check
|
||||
```
|
||||
|
||||
部署:
|
||||
|
||||
```bash
|
||||
SYNC_ENV=0 LIVE_SMOKE_BASE_URL=https://oa.hyinda.com bash deploy/trialrun/deploy.sh
|
||||
```
|
||||
|
||||
部署后:
|
||||
|
||||
```bash
|
||||
curl -fsS https://oa.hyinda.com/ready
|
||||
node scripts/qa/check-public-bundle-copy.mjs https://oa.hyinda.com
|
||||
LIVE_SMOKE_BASE_URL=https://oa.hyinda.com bash scripts/qa/run-live-smoke-readiness.sh
|
||||
cd client && E2E_BASE_URL=https://oa.hyinda.com npx playwright test tests/e2e/login-portal-ux.spec.ts tests/e2e/visual-portal.spec.ts --workers=1 --reporter=list
|
||||
```
|
||||
|
||||
收口:
|
||||
|
||||
```bash
|
||||
python3 ./.trellis/scripts/task.py validate 05-31-deploy-asset-ledger-consistency-public-check
|
||||
node scripts/qa/check-trellis-governance.mjs
|
||||
git diff --check
|
||||
```
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- [ ] 用户明确批准公网部署。
|
||||
- [ ] 当前 `main` 成功部署到公网 OA,记录部署基线提交 hash。
|
||||
- [ ] 部署使用 `SYNC_ENV=0`,未覆盖远端 `.env`。
|
||||
- [ ] 远端 `/ready` 通过。
|
||||
- [ ] 公网前端资源文案扫描 findings=0,确认无 ERP 产品暴露回退。
|
||||
- [ ] live readiness 通过;如凭据缺失,按规则记录 SKIP,不声明真实登录通过。
|
||||
- [ ] 至少一组公网 Playwright 重点页面检查通过。
|
||||
- [ ] 任务文档记录部署结果、复检结果和是否可让用户线上查看。
|
||||
|
||||
## Out of Scope
|
||||
|
||||
- 不同步本地 `.env`。
|
||||
- 不做真实付款、银行流水导入、真实支付接口或 ERP 写入。
|
||||
- 不写企业微信,不改企业微信配置。
|
||||
- 不重置或恢复公网数据库。
|
||||
- 不新增页面设计改造;若公网发现 UI 问题,另建修复任务。
|
||||
|
||||
## Open Question
|
||||
|
||||
- 是否批准现在执行公网部署?推荐批准,理由是当前本地资产真实 E2E 和构建已通过,用户需要看到公网效果;部署仍使用 `SYNC_ENV=0` 并由脚本自动做远端 smoke。
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"id": "deploy-asset-ledger-consistency-public-check",
|
||||
"name": "deploy-asset-ledger-consistency-public-check",
|
||||
"title": "部署资产与台账一致性修复并公网复检",
|
||||
"description": "将资产、业务台账一致性和本地启动修复发布到公网 OA,并完成 /ready、bundle 文案、live readiness 与重点页面复检。",
|
||||
"status": "planning",
|
||||
"dev_type": "deployment",
|
||||
"scope": "public-deploy,trialrun-smoke",
|
||||
"package": "hyb-oa",
|
||||
"priority": "P2",
|
||||
"creator": "shunli",
|
||||
"assignee": "shunli",
|
||||
"createdAt": "2026-05-31",
|
||||
"completedAt": null,
|
||||
"branch": null,
|
||||
"base_branch": "main",
|
||||
"worktree_path": null,
|
||||
"commit": null,
|
||||
"pr_url": null,
|
||||
"subtasks": [],
|
||||
"children": [],
|
||||
"parent": null,
|
||||
"relatedFiles": [
|
||||
"deploy/trialrun/deploy.sh",
|
||||
"deploy/trialrun/validate-env-contract.js",
|
||||
"scripts/qa/check-public-bundle-copy.mjs",
|
||||
"scripts/qa/run-live-smoke-readiness.sh",
|
||||
"client/tests/e2e/login-portal-ux.spec.ts",
|
||||
"client/tests/e2e/visual-portal.spec.ts",
|
||||
".trellis/spec/hyb-oa/deployment-trialrun.md"
|
||||
],
|
||||
"notes": "",
|
||||
"meta": {}
|
||||
}
|
||||
在新工单中引用
屏蔽一个用户