test(db): retired rectification sessions are no longer listed (BUG-1644)
Independent Staging Quality Gate / validate-frontend (push) Successful in 4m55s
Independent Staging Quality Gate / validate-python (push) Successful in 5m38s
Independent Staging Quality Gate / publish (push) Successful in 3m25s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXozbkyFNqbu8pVEtZ7W
This commit is contained in:
2026-11-06 10:13:16 +08:00
co-authored by Claude Opus 5.5
parent 47fa33cafd
commit bab7bf36db
@@ -27,7 +27,10 @@ const filledConsultation = "33333333-3333-4333-8333-333333333333";
const archivedRectification = "44444444-4444-4444-8444-444444444444";
const archivedEmptyConsultation = "55555555-5555-4555-8555-555555555555";
test("session list query keeps empty rectification rows and drops empty consultations", {
// 原值: 测试名「keeps empty rectification rows」,liveIds 期望 [emptyRectification, filledConsultation]
// 新值: 退役的 birth_time_rectification 会话一律不列出,liveIds 只剩 filledConsultation
// 原因: BUG-1644 对话式生时校正下线,这类会话再也打不开(excludeEmptyConsultations 加了 neq session_type)
test("session list query drops retired rectification rows and empty consultations", {
skip: docker ? false : "docker unavailable",
}, async () => {
const fixture = startPostgresFixture();
@@ -64,7 +67,8 @@ test("session list query keeps empty rectification rows and drops empty consulta
);
assert.equal(live.error, null, live.error?.message);
const liveIds = (live.data as { id: string }[]).map((row) => row.id).sort();
assert.deepEqual(liveIds, [emptyRectification, filledConsultation].sort());
assert.deepEqual(liveIds, [filledConsultation]);
assert.equal(liveIds.includes(emptyRectification), false);
assert.equal(liveIds.includes(archivedRectification), false);
assert.equal(liveIds.includes(archivedEmptyConsultation), false);
const rows = [