diff --git a/docs/BUG_HISTORY.md b/docs/BUG_HISTORY.md index 9fdc70d5..0f2bb5f1 100644 --- a/docs/BUG_HISTORY.md +++ b/docs/BUG_HISTORY.md @@ -2416,3 +2416,13 @@ - 相关记录:无 - 复发自:无 - 修复版本:待提交 + +## BUG-141 | self-hosted PostgreSQL DATE 行导致 consultation 503 + +- 状态:resolved(local candidate) +- 首次发现:2026-08-07 +- 影响面:self-hosted staging 的 profile/consultation 读取;production 未受影响。 +- 根因:本地 PostgreSQL adapter 将 `DATE` 查询结果保留为 JavaScript `Date`,下游业务合同要求无时区的 `YYYY-MM-DD`。 +- 修复:按列类型将查询结果中的 `DATE` 归一化为本地日历字符串,timestamp 仍保持 `Date`;同步删除 legacy rectification 后的 account stale test。 +- 验证:focused 回归 37/37、完整前端 1017/1017、local quick quality gate 291 passed/1 skipped;TypeScript、lint(0 error)、production build 与 `git diff --check` 通过。 +- 修复版本:本次 staging-only 集成候选 diff --git a/frontend/tests/consultation-birth-time-mode.test.ts b/frontend/tests/consultation-birth-time-mode.test.ts index 33e0fb23..cdb12da5 100644 --- a/frontend/tests/consultation-birth-time-mode.test.ts +++ b/frontend/tests/consultation-birth-time-mode.test.ts @@ -126,16 +126,3 @@ test("homepage sends explicit modes and never routes an unverified minute throug assert.match(route, /旧版生时校正入口已停用/); assert.ok(route.indexOf("旧版生时校正入口已停用") < route.indexOf("reserveConsultationModel(", route.indexOf("chatRequestSchema.safeParse"))); }); - -test("range-terminal rectification handoff accepts unverified chart mode without weakening general-mode isolation", () => { - const route = readFileSync(new URL("../src/app/api/consult/route.ts", import.meta.url), "utf8"); - const handoffGuard = route.slice( - route.indexOf("if (handoff)"), - route.indexOf("try {", route.indexOf("if (handoff)")), - ); - - assert.match(handoffGuard, /\["verified_chart", "unverified_birth_time"\]\.includes\(parsed\.data\.consultationMode\)/); - assert.doesNotMatch(handoffGuard, /consultationMode !== "verified_chart"/); - assert.doesNotMatch(handoffGuard, /general_no_birth_time/); - assert.match(handoffGuard, /requestId !== handoff\.requestId/); -});