test: retire remaining rectification handoff contract
Staging Backend Quality Gate / validate (push) Successful in 10m52s
Staging Backend Quality Gate / publish (push) Failing after 55m13s

This commit is contained in:
Jesse_Chen
2026-08-07 13:47:10 +08:00
parent 3831b5bd9f
commit a2de662d1b
2 changed files with 10 additions and 13 deletions
+10
View File
@@ -2416,3 +2416,13 @@
- 相关记录:无
- 复发自:无
- 修复版本:待提交
## BUG-141 | self-hosted PostgreSQL DATE 行导致 consultation 503
- 状态:resolvedlocal 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 skippedTypeScript、lint0 error)、production build 与 `git diff --check` 通过。
- 修复版本:本次 staging-only 集成候选
@@ -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/);
});