fix(consult): a warm that cannot be scheduled no longer fails the save (BUG-1305)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017eEAG8HD3mm8gsKXgk8uU8
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
cd625e8a35
commit
b4eedb7725
@@ -17519,3 +17519,19 @@
|
||||
- 相关记录:BUG-1300、BUG-1302。
|
||||
- 复发自:无。
|
||||
- 修复版本:无。
|
||||
|
||||
## BUG-1305 | 保存星盘后安排预热抛错,已写库的保存返回 500(staging 门禁 run 1784 红)
|
||||
|
||||
- 状态:resolved(Claude 直接修复,产品 2026-10-09 授权;推 staging 后由门禁真实 PostgreSQL 套件复核)
|
||||
- 首次发现 / 最近更新:2026-10-09 / 2026-10-09
|
||||
- 来源:staging `backend-quality-gate` run 1784(`cd625e8a`)唯一失败:`database-profile-gender.test.ts`「people and account routes read and write gender on real PostgreSQL without cross-person leaks」,`500 !== 200`。
|
||||
- 影响面:新建人物、修改人物、修改本人资料三个保存接口(`/api/chart-profiles`、`/api/chart-profiles/[id]`、`/api/account`)。在 Next 正常请求里 `after` 可用,线上不必然出现;但只要安排预热失败,用户会看到保存失败而数据其实已经写进去。
|
||||
- 现象:数据库写入成功后接口仍返回 500。
|
||||
- 触发条件:`scheduleConsultPacketWarm` 用默认的 Next `after`,在没有请求作用域时调用(数据库测试直接调路由函数)。
|
||||
- 根因:BUG-1300 加的预热只对 fetch 失败兜底,没有对 `after` 本身抛错兜底;抛错落进路由的 catch,变成 500。违反修复单红线「预热失败不影响保存」。验收时本机无 Docker,数据库套件全部 skip,所以本机和执行方都没看到。
|
||||
- 修复:`frontend/src/lib/consult-packet-warm.ts` 安排预热包 try/catch,失败返回 false,保存照常返回。
|
||||
- 验证:`frontend/tests/consult-packet-warm-20261009.test.ts` 新增「a warm that cannot be scheduled does not break the save」(修复前默认依赖直接抛错);本机 `npm test` 4,999 / 失败 24 与基线逐名相同,tsc 0、lint 0;数据库套件由门禁真实 PostgreSQL 复核。
|
||||
- 防复发:上述测试;验收凡改到 `database-*.test.ts` 会调用的路由,推 staging 前用本机 PostgreSQL 替身跑一遍数据库套件。
|
||||
- 相关记录:BUG-1300、BUG-1302、BUG-1118(同类:数据库套件只在门禁里跑)。
|
||||
- 复发自:无。
|
||||
- 修复版本:本提交。
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
- 基线:`origin/staging`,含 `fc3a2e68`(对话卡同源已合入)。分支 `codex/consult-career-type-residual-20261009`。
|
||||
- 前序:`TASK-consult-card-full-source-fix2-20261009.md`(已验收合入)。
|
||||
- BUG 编号:本单已登记 BUG-1303、BUG-1304(investigating),新问题从 **1305** 起,开工时核对。
|
||||
- BUG 编号:本单已登记 BUG-1303、BUG-1304(investigating),新问题从 **1306** 起,开工时核对。
|
||||
|
||||
## 1. 实证
|
||||
|
||||
|
||||
Reference in New Issue
Block a user