(value: unknown)
| 237 | } |
| 238 | |
| 239 | function isValidAndon(value: unknown): value is Andon { |
| 240 | // Cached state JSON is git-fetched and partially untrusted, so validate via |
| 241 | // the strict schema rather than handrolling field checks. |
| 242 | return AndonSchema.safeParse(value).success; |
| 243 | } |
| 244 | |
| 245 | function truncate(s: string, n: number): string { |
| 246 | return s.length > n ? `${s.slice(0, n)}…` : s; |