()
| 348 | * Deeper health validation now lives in skillpack-node. |
| 349 | */ |
| 350 | export function validateEntries(): RegistryEntry[] { |
| 351 | const entries = readAll(); |
| 352 | const now = new Date().toISOString(); |
| 353 | |
| 354 | for (const entry of entries) { |
| 355 | if (entry.status === "running" && entry.pid !== null && !isPidAlive(entry.pid)) { |
| 356 | writeEntryFile({ |
| 357 | ...entry, |
| 358 | pid: null, |
| 359 | status: "stopped", |
| 360 | stoppedAt: now, |
| 361 | updatedAt: now, |
| 362 | }); |
| 363 | } |
| 364 | } |
| 365 | |
| 366 | const nextEntries = readAll(); |
| 367 | if (entries.length === nextEntries.length && entries.every((entry, index) => entriesEqual(entry, nextEntries[index]!))) { |
| 368 | return entries; |
| 369 | } |
| 370 | return nextEntries; |
| 371 | } |
nothing calls this directly
no test coverage detected