From 9c819d94c8082a305b67d517e14b62bfc8e9dd71 Mon Sep 17 00:00:00 2001 From: Gustavo Madeira Santana Date: Wed, 22 Apr 2026 17:24:49 -0400 Subject: [PATCH] refactor: tighten support log tail types --- src/logging/diagnostic-support-export.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/logging/diagnostic-support-export.ts b/src/logging/diagnostic-support-export.ts index 3877356c693..42722ce607e 100644 --- a/src/logging/diagnostic-support-export.ts +++ b/src/logging/diagnostic-support-export.ts @@ -132,18 +132,24 @@ type ConfigExport = { sanitized?: unknown; }; -type SanitizedLogTail = { - status: "included" | "failed"; +type IncludedSanitizedLogTail = { + status: "included"; file: string; cursor: number; size: number; lineCount: number; truncated: boolean; reset: boolean; - error?: string; lines: Array>; }; +type FailedSanitizedLogTail = Omit & { + status: "failed"; + error: string; +}; + +type SanitizedLogTail = IncludedSanitizedLogTail | FailedSanitizedLogTail; + type SupportSnapshotStatus = | { status: "included";