fix(electron): check Windows lineage before process cleanup
Return an unverified cleanup failure before invoking numeric process-tree termination when owned lineage is unavailable. Preserve the partial capture and existing cleanup diagnostics. Exercise the provider capture boundary with stable application-state observations; assert no Windows cleanup call and retained partial Evidence. Source tests pass; native Windows behavior was not verified.
This commit is contained in:
@@ -264,14 +264,14 @@ const cleanupElectronProcesses = async (
|
||||
lineage: ProcessLineageObservation | undefined,
|
||||
): Promise<ProcessCleanupResult> => {
|
||||
if (process.platform === "win32") {
|
||||
const root = await cleanupWindowsProcessTree(ownership.leaderPid);
|
||||
if (!root.cleaned) return root;
|
||||
if (lineage?.status !== "verified")
|
||||
return {
|
||||
cleaned: false,
|
||||
reason:
|
||||
"owned Electron lineage was unavailable; helper cleanup was not proven",
|
||||
};
|
||||
const root = await cleanupWindowsProcessTree(ownership.leaderPid);
|
||||
if (!root.cleaned) return root;
|
||||
for (const descendant of lineage.lineage.descendants) {
|
||||
const result = await cleanupWindowsProcessTree(descendant.pid);
|
||||
if (!result.cleaned) return result;
|
||||
|
||||
Reference in New Issue
Block a user