mirror of
https://github.com/morluto/rea.git
synced 2026-11-08 07:46:28 +00:00
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:
1 parent
b189c3ceb1
commit
f6fe575094
8 files changed
+327
-18
No files matched your search
@@ -8,6 +8,7 @@ import {
|
||||
import { logCliCommand } from "../cliLogging.js";
|
||||
import type { Logger } from "../logger.js";
|
||||
import { CLI_COMMANDS } from "../cliCommandNames.js";
|
||||
import { withCommandCancellation } from "./commandCancellation.js";
|
||||
|
||||
/** Register direct process capture and comparison commands. */
|
||||
export const registerProcessCommands = (
|
||||
@@ -19,11 +20,13 @@ export const registerProcessCommands = (
|
||||
description: "Capture one caller-selected process scenario",
|
||||
args: z.object({ scenario: z.string().describe("Scenario JSON path") }),
|
||||
run: ({ args }) =>
|
||||
logCliCommand(
|
||||
logger,
|
||||
"capture-process",
|
||||
() => captureProcessScenarioFile(args.scenario, environment),
|
||||
isProcessCliFailure,
|
||||
withCommandCancellation((signal) =>
|
||||
logCliCommand(
|
||||
logger,
|
||||
"capture-process",
|
||||
() => captureProcessScenarioFile(args.scenario, environment, signal),
|
||||
isProcessCliFailure,
|
||||
),
|
||||
),
|
||||
});
|
||||
cli.command(CLI_COMMANDS.compareProcessCaptures, {
|
||||
|
||||
Reference in new issue
Block a user