perf(evm): avoid repeated cleanup diagnostics (#1622)

Retain the original owned-command cleanup failure and one captured-output copy while preserving cleanup resources, truncation and retry semantics.

Verify socket release after cancelled CDP cleanup while retaining the independent detach regression.

Validation: 167 tests across 13 files, all eight local gates, real small Chrome/EVM CLI and pinned-SDK MCP controls, and 20/20 exact-head CI checks.
This commit is contained in:
Ysopwnable
2026-10-11 03:28:16 +08:00
committed by GitHub
parent b28c0337fc
commit c12a532b9c
6 changed files with 40 additions and 43 deletions
+2 -22
View File
@@ -401,28 +401,8 @@ export class EvmoleInterfaceProvider implements EvmInterfacePort {
}
if (processOwner !== undefined) {
this.#pendingCleanup = { root, process: processOwner };
root = undefined;
return err(
new ProviderCleanupError(
EVMOLE_PROVIDER_IDENTITY.id,
[
processOwner.launch.ownership?.runId ?? "owned-worker",
...(this.#pendingCleanup.root === undefined
? []
: [this.#pendingCleanup.root.path]),
],
{
reason: "Owned EVM worker cleanup could not be confirmed",
previous_error: result.ok
? null
: projectAnalysisError(result.error),
...(retainedOutput === undefined
? {}
: { captured_output: { ...retainedOutput } }),
},
{ operation: OPERATION },
),
);
// The command failure already owns this cleanup diagnostic and its resources.
return result;
}
if (root !== undefined) {
try {