[PR #1622] [MERGED] perf(evm): avoid repeated cleanup diagnostics #4706

Closed
opened 2026-10-31 00:54:13 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/1622
Author: @N0zoM1z0
Created: 10/10/2026
Status: ✅ Merged
Merged: 10/10/2026
Merged by: @N0zoM1z0

Base: main ← Head: perf/evm-cleanup-diagnostics-1065


📝 Commits (2)

  • e05b42a perf(evm): retain cleanup diagnostics without repeated output
  • 0ab1e7f test(browser): verify released sockets after cancelled cleanup

📊 Changes

6 files changed (+40 additions, -43 deletions)

View changed files

📝 src/evm/EvmoleFailures.ts (+0 -2)
📝 src/evm/EvmoleInterfaceProvider.ts (+2 -22)
📝 tests/boundary/browser/cdpCleanupCancellation.test.ts (+8 -0)
📝 tests/boundary/evm/evmoleInterfaceProvider.test.ts (+27 -19)
📝 tests/fixtures/fakeCdpBrowser.ts (+1 -0)
📝 tests/fixtures/fakeCdpBrowserTypes.ts (+2 -0)

📄 Description

An EVM command output overflow combined with incomplete cleanup currently wraps the same cleanup failure twice and repeats the full captured stdout in previous-error metadata. Return the original mapped failure while retaining its cleanup owner and resources, and keep stdout/stderr once in canonical captured_output. The original output-limit cause, exit/signal facts, truncation and retry behavior remain available. No new output caps or tool/schema changes.

The regression uses actual owned subprocess output and retryable cleanup, with a bounded assertion projection so a failure cannot print megabytes of diagnostics. It also verifies that an uncertain owner blocks another launch until cleanup recovers. Browser socket-release and external-target controls proposed in closed #1617 are retained alongside the detach regression from merged #1618. This is the remaining follow-up after those existing PRs were handled.

Refs #1065. Follow-up to #1618 and #1617.

Validation on main 16d9c5ad plus this change (0ab1e7f7):

  • 167 runnable tests across 13 affected process/filesystem/browser/firmware files; two platform skips. The duplicate-diagnostic regression fails before the fix and passes after it.
  • Fresh runtime/metadata build and all eight type/lint/format/unused-code/duplication/documentation/architecture/discovery checks pass.
  • Actual owned subprocess overflow with injected cleanup-reporting failure: projected error 2,098,769 -> 1,049,484 bytes, retaining all 1,048,576 captured stdout bytes and the original failure. Serialized bytes are not billed-token measurements.
  • Real 66-byte Chrome-page and five-byte EVM-bytecode CLI/pinned-SDK MCP controls pass. EVM normalized results and Evidence IDs match; text/structured parity, unchanged bytecode source, subsequent ping, browser cancellation, external-target preservation and owned browser cleanup pass. A hung domain-disable reply is covered by the deterministic HTTP/WebSocket peer, separately from real Chrome.

Linux x64, Node 24.18.0. No chain/bytecode execution, real firmware extraction or Hopper/Ghidra claim. Existing large-folder JavaScript OOM #1563 remains open.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/1622 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 10/10/2026 **Status:** ✅ Merged **Merged:** 10/10/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `perf/evm-cleanup-diagnostics-1065` --- ### 📝 Commits (2) - [`e05b42a`](https://github.com/morluto/rea/commit/e05b42a19f4defc2a42fa4387b9c3e7d9e15a0cf) perf(evm): retain cleanup diagnostics without repeated output - [`0ab1e7f`](https://github.com/morluto/rea/commit/0ab1e7f7afe260f5e69802a809bbf5e06fc4cb7e) test(browser): verify released sockets after cancelled cleanup ### 📊 Changes **6 files changed** (+40 additions, -43 deletions) <details> <summary>View changed files</summary> 📝 `src/evm/EvmoleFailures.ts` (+0 -2) 📝 `src/evm/EvmoleInterfaceProvider.ts` (+2 -22) 📝 `tests/boundary/browser/cdpCleanupCancellation.test.ts` (+8 -0) 📝 `tests/boundary/evm/evmoleInterfaceProvider.test.ts` (+27 -19) 📝 `tests/fixtures/fakeCdpBrowser.ts` (+1 -0) 📝 `tests/fixtures/fakeCdpBrowserTypes.ts` (+2 -0) </details> ### 📄 Description An EVM command output overflow combined with incomplete cleanup currently wraps the same cleanup failure twice and repeats the full captured stdout in previous-error metadata. Return the original mapped failure while retaining its cleanup owner and resources, and keep stdout/stderr once in canonical `captured_output`. The original output-limit cause, exit/signal facts, truncation and retry behavior remain available. No new output caps or tool/schema changes. The regression uses actual owned subprocess output and retryable cleanup, with a bounded assertion projection so a failure cannot print megabytes of diagnostics. It also verifies that an uncertain owner blocks another launch until cleanup recovers. Browser socket-release and external-target controls proposed in closed #1617 are retained alongside the detach regression from merged #1618. This is the remaining follow-up after those existing PRs were handled. Refs #1065. Follow-up to #1618 and #1617. Validation on main `16d9c5ad` plus this change (`0ab1e7f7`): - 167 runnable tests across 13 affected process/filesystem/browser/firmware files; two platform skips. The duplicate-diagnostic regression fails before the fix and passes after it. - Fresh runtime/metadata build and all eight type/lint/format/unused-code/duplication/documentation/architecture/discovery checks pass. - Actual owned subprocess overflow with injected cleanup-reporting failure: projected error 2,098,769 -> 1,049,484 bytes, retaining all 1,048,576 captured stdout bytes and the original failure. Serialized bytes are not billed-token measurements. - Real 66-byte Chrome-page and five-byte EVM-bytecode CLI/pinned-SDK MCP controls pass. EVM normalized results and Evidence IDs match; text/structured parity, unchanged bytecode source, subsequent ping, browser cancellation, external-target preservation and owned browser cleanup pass. A hung domain-disable reply is covered by the deterministic HTTP/WebSocket peer, separately from real Chrome. Linux x64, Node 24.18.0. No chain/bytecode execution, real firmware extraction or Hopper/Ghidra claim. Existing large-folder JavaScript OOM #1563 remains open. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 00:54:13 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#4706
No description provided.