fix(ci): restore lifecycle ownership coverage (#10147)

* fix(process): retain CLI input cleanup ownership

* test(ci): align lifecycle fixtures with typed ownership contracts

---------

Co-authored-by: Nianze Wu <wunianze666@gmail.com>
This commit is contained in:
morlutoandNianze Wu authored and GitHub committed 2026-11-11 18:37:28 -05:00
1 parent 4505477903
commit 6b2f991808
19 files changed
+232 -95

No files matched your search

@@ -8,6 +8,7 @@ import { expect, it, onTestFinished } from "vitest";
import { createDarwinProcessRunTokenReader } from "../../src/process/DarwinProcessRunTokenReader.js";
import { createSystemProcessOwnershipHost } from "../../src/process/ProcessOwnershipObservation.js";
import { startProcessSampler } from "../../src/process/capture/ProcessSampling.js";
import { ProcessOwnershipInspectionCancelled } from "../../src/process/ProcessInspectionCancellation.js";
const waitForFile = async (path: string, timeoutMs = 4_000): Promise<void> => {
const deadline = Date.now() + timeoutMs;
@@ -112,7 +113,9 @@ const expectOwnedCommandToFinishOnAbort = async (
if (!(failure instanceof Error))
throw new Error("The cancelled process command did not return an error");
expect(failure.cause).toBe(reason);
expect(ProcessOwnershipInspectionCancelled.from(failure)?.reason).toBe(
reason,
);
await expect(readFile(command.donePath, "utf8")).resolves.toBe("done");
};