文件
hyb-oa/issues/2026-05-12_01-12-20-r6-purchase-submit-budget-precheck-hotfix.csv
T

6.2 KiB

1IDTitleDescriptionAcceptanceTest_MethodToolsDev_StatusReview1_StatusRegression_StatusFilesDependenciesNotes
2PS6-1R6 采购提交阻断建档记录 R6-4 采购主链路在公网提交时触发服务端 500 的事实证据,并固定本热修合同范围。1) `docs/trialrun/manual-trialrun-report.md` 已登记 `R6-ISSUE-003`;2) R6 小范围合同 R6-4 保持未完整通过,R6-5/R6-6 不推进;3) 本合同只处理采购提交预算预检变量缺失,不扩功能、不改远端数据、不清理 smoke 数据。流程级验证:python3 /home/shunli/.codex/skills/plan/scripts/validate_issues_csv.py issues/2026-05-12_01-12-20-r6-purchase-submit-budget-precheck-hotfix.csv;rg -n 'R6-ISSUE-003|budgetPrecheckGate|ab69db11-87e3-48b0-8a8a-43324d1c70e5' docs/trialrun/manual-trialrun-report.md issues server/src/routes/purchaseRequests.js。python3|rg|manualDONEDONEDONEissues/2026-05-12_01-12-20-r6-purchase-submit-budget-precheck-hotfix.csv|docs/trialrun/manual-trialrun-report.md[]R6-4 已创建公网测试数据,采购草稿 `ab69db11-87e3-48b0-8a8a-43324d1c70e5` 停在 draft;不得清理或篡改历史数据,修复后新建或复用可解释测试单据复跑。
3PS6-2修复采购提交预算预检变量在 `server/src/routes/purchaseRequests.js` 的提交路径中正确求值或传递 `budgetPrecheckGate`,避免缺预算池分支引用未定义变量。1) `/api/purchase-requests/:id/submit` 不再因 `budgetPrecheckGate is not defined` 返回 500;2) 保持预算预检既有语义:开启 budget_precheck 时以 authoritative precheck 为准,未开启时走 legacy fallback control mode;3) 无 Prisma migration、无 API 契约变更、无权限模型变更。流程级验证:cd server && npm run prisma:validate;cd server && node --check src/routes/purchaseRequests.js;补充或更新采购提交测试,覆盖无预算池、预算预检开关关闭/继承、提交进入审批或返回可解释 4xx 的路径;确认不会生成 500。node|npmDONEDONEDONEserver/src/routes/purchaseRequests.js|server/tests/**["PS6-1"]DONE:已在采购提交事务中求值 `FEATURE_FLAG_KEYS.budgetPrecheck`,预算预检关闭时使用 legacy fallback control mode,开启时沿用 authoritative precheck 结果;新增 `server/tests/unit/routes/purchase.submit-budget-precheck.test.js` 覆盖无预算池、预算预检关闭且 precheck hint=block 时仍进入审批并返回 `missing_budget_pool` warning,不再 500。验证通过:`cd server && npm run prisma:validate`;`cd server && node --check src/routes/purchaseRequests.js`;`cd server && npm test -- tests/unit/routes/purchase.submit-budget-precheck.test.js tests/unit/routes/purchase.submit-side-effects.test.js`。回滚路径:还原本 Issue 对 `server/src/routes/purchaseRequests.js` 和测试文件的变更后重新部署;不涉及 schema 和数据回滚。
4PS6-3采购主链路本地回归复跑采购业务自动化,确认员工提交采购、经理审批、历史查看不再被预算预检变量阻断。1) 本地采购业务流通过;2) 若缺预算池,结果必须是可解释业务校验或正常进入审批,不允许 500;3) 不要求新增预算、ERP、AI、完整差旅或复杂 BPM。流程级验证:BUSINESS_FLOW_GROUPS=procurement bash scripts/qa/run-business-flow-gates.sh local;如该脚本不可用,则用现有 Playwright/接口脚本登录 `SMOKE002` 创建采购 -> 提交 -> `SMOKE101` 审批 -> 查询历史,并记录替代命令。bash|playwrightDONEDONEDONEscripts/qa/*|client/tests/e2e/*["PS6-2"]DONE:`BUSINESS_FLOW_GROUPS=procurement bash scripts/qa/run-business-flow-gates.sh local` 通过,`procurement-flow.spec.ts` 1 passed,报告 `artifacts/qa-flow/business-flow-20260512-012612/summary.txt`;本地链路覆盖员工提单、经理审批、财务归档,不新增预算、ERP、AI、完整差旅或复杂 BPM。
5PS6-4部署与公网复检本地验证通过后受控部署到 `https://oa.hyinda.com`,复检公网健康和基础 smoke。1) `bash deploy/trialrun/deploy.sh` 成功,不覆盖远端 `.env`;2) `/ready` 正常;3) public bundle 扫描 findings=0;4) live smoke readiness 通过;5) 企业微信个人应用消息通道仍为 `wecom_app_message enabled=true`。流程级验证:bash deploy/trialrun/deploy.sh;curl -fsS https://oa.hyinda.com/ready;LIVE_SMOKE_BASE_URL=https://oa.hyinda.com bash scripts/qa/run-live-smoke-readiness.sh;只读确认通知渠道和公网运行文件哈希。bash|curl|sshDONEDONEDONEdeploy/trialrun/*|scripts/qa/*["PS6-3"]DONE:`bash deploy/trialrun/deploy.sh` 成功,默认跳过 `.env` 同步;公网 `/ready` ok;远端与本机 `server/src/routes/purchaseRequests.js` sha256 一致;public bundle 扫描 `findings=0`;strict live env 通过;`LIVE_SMOKE_BASE_URL=https://oa.hyinda.com bash scripts/qa/run-live-smoke-readiness.sh` PASS,报告 `artifacts/qa-flow/live-smoke-readiness-20260512-013114`;通知渠道只读确认 `R5-WECOM-APP-PERSONAL mode=wecom_app_message enabled=true`,旧 `R50-MOCK-007334 mode=mock enabled=false`。
6PS6-5恢复 R6-4 采购复跑与状态回填热修部署后恢复 R6-4 的采购路径复跑,完成采购提交、审批和历史查看后再判断是否进入 R6-5。1) 采购从草稿提交进入审批或可解释业务状态;2) `SMOKE101` 可处理采购待办;3) 采购历史与审批中心一致;4) `docs/trialrun/manual-trialrun-report.md` 和 R6 合同已回填;5) 主 R6 仍不标 DONE,直到 R6-5/R6-6 完成。流程级验证:公网 `SMOKE002` 创建/提交采购 -> `SMOKE101` 审批 -> 员工/管理员查看采购历史和审批日志 -> 记录到 R6 流程矩阵;必要时补企业微信消息审计。manual|playwright|curlDONEDONEDONEdocs/trialrun/manual-trialrun-report.md|issues/2026-05-11_10-23-41-r6-small-trialrun-prep.csv["PS6-4"]DONE:公网 `SMOKE002` 创建并提交 `CG-20260512-0001`,采购 id `538c3c92-edce-4c28-bcdd-9bb8065c1d0e`,返回 `warnings=[missing_budget_pool]` 且无 500;`SMOKE101` 审批任务 `6d3cf41c-2a44-4bc3-9245-db6383fabdf0` 后采购终态 `approved`;通知 delivery 为 `wecom_app_sent`、errcode=`0`;`R6-ISSUE-003` 已关闭,R6-4 可回填 DONE 并进入 R6-5/R6-6 收口。