
wangsli和Claude Sonnet 5
cd01e4bf28
迁移首批4个错误码:AP台账/查询、待办、工作台功能开关 [09-05-error-explainability-payment-readiness]
10-05 到期例外清单里已设计好的首批 4 个具体调用,现予落码(原方案见
implement.md §14「首批具体分支与验证要求」):
- ap_operations.feature_disabled(409):AP 台账/明细查询功能关闭
- ap_operations.query_invalid(400):AP 台账查询参数校验失败
- todo.feature_disabled(409):待办功能关闭
- portal.feature_disabled(409):工作台首页功能关闭
四处均改为调用 buildBusinessValidationError(reasonCode, details, statusCode),
保留原 HTTP 状态码、featureFlag/reason 等既有 details 字段不变,仅新增精确
reasonCode;不改功能开关判断逻辑、不改权限校验顺序。
- server/src/constants/errorReasons.js + client/src/api/errorReasons.ts:
注册 4 条原因码及中文文案,服务端/客户端逐字一致。
- scripts/qa/error-reason-legacy-baseline.json:移除这 4 条已迁移的旧例外
记录(591 → 587),check-error-reason-contract.mjs 主检查与 self-test
均 PASS,无 new_legacy/stale_exception/unregistered_reason。
- apOperations.permissions.test.js:扩展"功能关闭"断言校验 reasonCode 与
原 details 字段共存;新增"查询参数非法(功能开启)"400 用例,断言零
台账业务查询;新增"合法查询仍 200"用例。
- portal.test.js:新增工作台关闭时 409+reasonCode+零业务查询断言(此前
完全没有覆盖这条路径)。
- todos.test.js:新建(此前 todos 路由零测试覆盖),聚焦 ensureFeatureEnabled
网关:关闭时 GET/POST 均 409+reasonCode+零 todoItem 查询;开启时正常放行。
验证:server 5 个相关测试文件 286/286 通过;client typecheck/build 通过;
check-ui-design-rules.mjs --strict、check-trellis-governance.mjs、
git diff --check 通过。routes/ 全量回归 872/874(2 个失败为 paymentBatches
BIFF8 导出的既有环境问题,已用 git stash 验证在改动前的 HEAD 上同样失败,
与本次改动无关,不在本次范围内处理)。
剩余 669 条例外记录不变,尚未处理;B/C 两档 57 文件仍需逐模块确认迁移或
提出延期理由,本次不扩大范围。
Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-09-25 21:16:55 +08:00
..
2026-09-08 07:21:19 +08:00
2026-05-26 11:20:56 +08:00
2026-09-08 07:21:19 +08:00
2026-09-05 19:00:35 +08:00
2026-07-18 15:46:14 +08:00
2026-05-17 18:08:07 +08:00
2026-05-17 18:08:07 +08:00
2026-07-16 05:17:38 +08:00
2026-05-23 14:46:14 +08:00
2026-05-23 23:34:29 +08:00
2026-07-29 15:07:58 +08:00
2026-05-24 21:12:18 +08:00
2026-07-16 05:17:38 +08:00
2026-05-26 11:20:56 +08:00
2026-07-16 05:17:38 +08:00
2026-07-16 05:17:38 +08:00
2026-09-08 07:21:19 +08:00
2026-09-02 07:35:01 +08:00
2026-05-18 13:56:52 +08:00
2026-05-18 20:10:00 +08:00
2026-05-22 22:04:41 +08:00
2026-05-22 13:41:48 +08:00
2026-09-25 21:16:55 +08:00
2026-08-13 21:27:53 +08:00
2026-09-08 07:21:19 +08:00
2026-09-08 07:21:19 +08:00
2026-09-08 07:21:19 +08:00
2026-09-08 07:21:19 +08:00
2026-05-23 16:31:06 +08:00
2026-08-28 19:52:59 +08:00
2026-07-16 05:17:38 +08:00
2026-09-08 07:21:19 +08:00
2026-08-25 20:57:15 +08:00
2026-08-01 23:12:23 +08:00
2026-09-08 07:21:19 +08:00
2026-05-17 19:44:43 +08:00
2026-08-08 02:02:52 +08:00
2026-08-23 11:02:35 +08:00
2026-05-23 16:11:49 +08:00
2026-08-23 11:02:35 +08:00
2026-07-28 13:42:48 +08:00
2026-08-28 19:52:59 +08:00
2026-08-02 11:59:42 +08:00
2026-08-01 23:12:23 +08:00
2026-05-17 21:50:15 +08:00
2026-07-16 05:17:18 +08:00
2026-05-17 18:08:07 +08:00
2026-07-16 05:18:42 +08:00
2026-07-18 15:46:14 +08:00
2026-05-24 01:43:30 +08:00
2026-05-26 14:03:51 +08:00
2026-05-23 22:25:51 +08:00
2026-05-25 00:40:33 +08:00
2026-08-25 20:57:15 +08:00
2026-08-01 23:12:23 +08:00
2026-07-29 08:28:42 +08:00
2026-09-08 07:21:19 +08:00
2026-09-09 12:47:30 +08:00
2026-05-22 14:08:42 +08:00
2026-05-20 15:17:07 +08:00
2026-09-08 07:21:19 +08:00
2026-05-22 17:19:04 +08:00
2026-05-22 14:08:42 +08:00
2026-05-20 12:28:40 +08:00
2026-09-16 12:56:27 +08:00
2026-09-12 20:03:29 +08:00
2026-09-15 15:26:08 +08:00
2026-09-15 15:26:08 +08:00
2026-09-09 23:19:02 +08:00
2026-09-12 20:03:29 +08:00
2026-07-18 15:46:14 +08:00
2026-08-25 12:00:33 +08:00
2026-09-08 07:21:19 +08:00
2026-07-18 15:46:14 +08:00
2026-05-27 19:40:44 +08:00