fix(process): identify unknown live processes in cleanup diagnostics

This commit is contained in:
morluto
2026-10-09 00:49:31 +08:00
parent bfb7776006
commit eb89a16d9b
6 changed files with 49 additions and 6 deletions
+7 -1
View File
@@ -566,9 +566,15 @@ const cleanupValidationFailure = (
.sort(([left], [right]) => left.localeCompare(right))
.map(([category, count]) => `${category}=${String(count)}`)
.join(", ");
const candidates = unreadable
.map(
({ pid, diagnostic }) =>
`${String(pid)}=${sanitizedTokenReadFailure(diagnostic)}`,
)
.sort((left, right) => left.localeCompare(right));
return {
cleaned: false,
reason: `process ownership token could not be read for ${String(unreadable.length)} live process(es): ${breakdown}`,
reason: `process ownership token could not be read for ${String(unreadable.length)} live process(es): ${breakdown}; live candidates ${candidates.join(", ")}`,
failures,
...unverifiedEntry,
};