test(api): read every published list with a row in it

The GET contract run counted 40 operations whose bodies held only empty
arrays, and an empty array parses against any item schema. The seed now
links the visit, lab, condition, document and dose to each other, adds a
procedure, a second and third lab reading, nutrients, a category, the
list order, courses, a rescheduled medication, a history fact, Coach
preferences, a plan and a fact, a reminder event, an invite, a delegate's
visit, a sign-in, a personal record, a trusted device, a marker alias, a
symptom on a cycle and an illness day, part-way import jobs and a chat
about the document. The run requires every operation to answer at least
once with a filled list, apart from eleven named exceptions, and a floor
of filled operations. The first finding is fixed: the document chat list
returns fenced, attachments and documentTitle, now declared.
This commit is contained in:
Marc-André Bombeck committed 2026-10-20 17:02:44 +02:00
1 parent 6182d45354
commit c72b81fa66
4 files changed
+394 -19

No files matched your search

+32 -1
View File
@@ -118,9 +118,40 @@ const documentChatDetailSchema = documentChatConversationSchema
})
.meta({ id: "DocumentChatDetail" });
/** One thread in the document's rail: the conversation row the Coach rail reads. */
const documentChatListItemSchema = documentChatConversationSchema
.extend({
fenced: z
.boolean()
.describe(
"Always true here: a chat about a document is a fenced thread (no tools, no health snapshot).",
),
attachments: z
.array(
z.object({
documentId: z.string(),
title: z
.string()
.nullable()
.describe(
"The attached document's title, falling back to its filename; null when it has neither.",
),
}),
)
.optional()
.describe("The documents the thread is about, as they are now."),
documentTitle: z
.string()
.nullish()
.describe(
"The first attached document's title, for a one-line badge; null when none is attached any more.",
),
})
.meta({ id: "DocumentChatListItem" });
const documentChatListSchema = z
.object({
conversations: z.array(documentChatConversationSchema),
conversations: z.array(documentChatListItemSchema),
nextCursor: z.string().nullable(),
})
.meta({ id: "DocumentChatList" });