fix(process): await cleanup on CLI and MCP cancellation

Propagate CLI interrupts to capture and interrupt post-exit settlement
without cancelling owned-resource cleanup or discarding prior observations.

Assisted-by: Kogasa (gensokyo-skills:kogasa-surprise-testing)
This commit is contained in:
Ysopwnable
2026-10-09 11:26:41 +00:00
committed by GitHub
parent b189c3ceb1
commit f6fe575094
8 changed files with 327 additions and 18 deletions
+2 -1
View File
@@ -47,6 +47,7 @@ export const isProcessCliFailure = (
export const captureProcessScenarioFile = async (
path: string,
environment: Readonly<Record<string, string | undefined>> = process.env,
signal?: AbortSignal,
) => {
try {
const input = await readJson(path);
@@ -60,7 +61,7 @@ export const captureProcessScenarioFile = async (
);
const captured = await captureProcessScenario(
parsed.data,
undefined,
signal,
process.platform,
environment,
);