fix(cutter): cancel discovery probes and queued work

Propagate CLI/MCP cancellation through shared Cutter discovery, stop queued probes, and drain admitted workers. Deliver terminal bridge results only after socket closure. Preserve confirmed command Evidence and caller reasons when cancellation arrives during finalization.

Validated 66 focused tests, full CI static/docs gates, actual CLI SIGINT, compiled stdio cancellation/recovery, and official Linux Cutter 2.5.0 Qt5 CLI/MCP ELF workflows. Native UI cancellation and descriptor filesystem cancellation remain unverified.

Fixes #3946.
This commit is contained in:
Ysopwnable authored and GitHub committed 2026-10-16 22:49:06 +08:00
1 parent 180ba03bfd
commit a6c6a76d37
8 files changed
+421 -38

No files matched your search

+5 -2
View File
@@ -23,8 +23,11 @@ export const registerCutterCommands = (
"List live Cutter instances connected through the REA Python plugin bridge",
args: z.object({}),
run: () =>
logCliCommand(logger, CLI_COMMANDS.listCutterSessions, () =>
cutter.listSessions(),
withCommandCancellation((signal) =>
logCliCommand(logger, CLI_COMMANDS.listCutterSessions, async () => {
const result = await cutter.listSessions({ signal });
return result.ok ? result.value : projectAnalysisError(result.error);
}),
),
});
cli.command(CLI_COMMANDS.cutterCommand, {