[GH-ISSUE #4403] fix(browser): preserve cleanup failure classification and lineage diagnostics #1754

Closed
opened 2026-10-16 21:09:51 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @N0zoM1z0 on GitHub (Oct 16, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/4403

Before submitting

  • Searched open and closed issues; this isolates the diagnostic defects observed in #4282 and the #4227 audit, rather than duplicating process-ownership recovery or #4322.
  • Evidence contains no credentials or private target data.

Area

Process capture or runtime observation

Observed behavior

A real Linux Electron capture completed all three actions and produced its expected IPC file effect, but cleanup remained unverified. The MCP error discarded the process observer’s unavailable-lineage reason and reported execution_failure: unreadable_output, although collected output was readable and retained.

Reproduction

Executed once against 2c7583599b9ac1c847bd77b1940930fd8d4594c7:

  1. Start an owned Ubuntu 24.04 container with authenticated Xvfb and official Electron 44.7.0. Use an authored app with a button whose IPC handler writes a file.
  2. Through the real stdio MCP client call capture_electron_scenario with that executable/app, --no-sandbox --disable-gpu, and actions wait 2000 ms, click #export, wait 300 ms.
  3. Observe all actions completed, the physical output file exists, and live Chromium descendants have readable /proc/<pid>/environ with the run marker absent (some buffers entirely NUL). The application root still has its marker. A separately owned marked sleep control survives.

Expected behavior

Keep cleanup_incomplete and retained partial observations, without weakening process ownership. Preserve the producing observer’s failure reason and classify cleanup failure independently of unreadable output. When observation also failed, retain its typed primary reason whether passed directly or in an AggregateError.

Impact and scope

Misleading recovery diagnostics obscure why cleanup was not proven. This report does not establish safe cleanup of marker-erasing Chromium helpers; that remains #4282. No Windows/macOS runtime claim.

REA version

2c7583599b9ac1c847bd77b1940930fd8d4594c7

Runtime and platform

Node 24.18.0, Ubuntu 24.04 x86_64 container on Linux 6.1.0-53-cloud-amd64, official Electron 44.7.0, authenticated Xvfb. Container capped at 4 GiB / two CPUs.

Target and artifact context

Disposable authored Electron app; three actions completed and IPC file effect independently checked.

Interface

MCP

Earliest failure stage

Transport or result projection

Relevant output or evidence

{"code":"cleanup_incomplete","details":{"reason":"cleanup_failed","cleanup":"incomplete","cleanup_reason":"owned Electron lineage was unavailable; helper cleanup was not proven","execution_failure":"unreadable_output"}}

The full response retained the completed actions and runtime observations in partial_observation.

Source-derived causes: cleanupElectronProcesses replaces unavailable lineage with a fixed string; browserErrorCode defaults cleanup_failed to unreadable_output; primaryBrowserFailureReason only unwraps AggregateError, while Electron supplies a direct typed observation failure. See provider and projection.

Additional context

Refs #4227, #4282. #4346 separately addresses #4322; #3544 addresses custom XAUTHORITY forwarding. Neither change is part of this report. Baseline probe took 8.14 s, sampled process-family peak 1.24 GiB; Xvfb/container baseline excluded from that sample. No speedup claim.

Originally created by @N0zoM1z0 on GitHub (Oct 16, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/4403 ### Before submitting - [x] Searched open and closed issues; this isolates the diagnostic defects observed in #4282 and the #4227 audit, rather than duplicating process-ownership recovery or #4322. - [x] Evidence contains no credentials or private target data. ### Area Process capture or runtime observation ### Observed behavior A real Linux Electron capture completed all three actions and produced its expected IPC file effect, but cleanup remained unverified. The MCP error discarded the process observer’s unavailable-lineage reason and reported `execution_failure: unreadable_output`, although collected output was readable and retained. ### Reproduction Executed once against `2c7583599b9ac1c847bd77b1940930fd8d4594c7`: 1. Start an owned Ubuntu 24.04 container with authenticated Xvfb and official Electron 44.7.0. Use an authored app with a button whose IPC handler writes a file. 2. Through the real stdio MCP client call `capture_electron_scenario` with that executable/app, `--no-sandbox --disable-gpu`, and actions wait 2000 ms, click `#export`, wait 300 ms. 3. Observe all actions completed, the physical output file exists, and live Chromium descendants have readable `/proc/<pid>/environ` with the run marker absent (some buffers entirely NUL). The application root still has its marker. A separately owned marked sleep control survives. ### Expected behavior Keep `cleanup_incomplete` and retained partial observations, without weakening process ownership. Preserve the producing observer’s failure reason and classify cleanup failure independently of unreadable output. When observation also failed, retain its typed primary reason whether passed directly or in an AggregateError. ### Impact and scope Misleading recovery diagnostics obscure why cleanup was not proven. This report does not establish safe cleanup of marker-erasing Chromium helpers; that remains #4282. No Windows/macOS runtime claim. ### REA version `2c7583599b9ac1c847bd77b1940930fd8d4594c7` ### Runtime and platform Node 24.18.0, Ubuntu 24.04 x86_64 container on Linux 6.1.0-53-cloud-amd64, official Electron 44.7.0, authenticated Xvfb. Container capped at 4 GiB / two CPUs. ### Target and artifact context Disposable authored Electron app; three actions completed and IPC file effect independently checked. ### Interface MCP ### Earliest failure stage Transport or result projection ### Relevant output or evidence ```json {"code":"cleanup_incomplete","details":{"reason":"cleanup_failed","cleanup":"incomplete","cleanup_reason":"owned Electron lineage was unavailable; helper cleanup was not proven","execution_failure":"unreadable_output"}} ``` The full response retained the completed actions and runtime observations in `partial_observation`. Source-derived causes: `cleanupElectronProcesses` replaces unavailable lineage with a fixed string; `browserErrorCode` defaults `cleanup_failed` to `unreadable_output`; `primaryBrowserFailureReason` only unwraps AggregateError, while Electron supplies a direct typed observation failure. See [provider](https://github.com/morluto/rea/blob/2c7583599b9ac1c847bd77b1940930fd8d4594c7/src/browser/PlaywrightElectronActiveProvider.ts#L284) and [projection](https://github.com/morluto/rea/blob/2c7583599b9ac1c847bd77b1940930fd8d4594c7/src/domain/analysisErrorProjection.ts#L129). ### Additional context Refs #4227, #4282. #4346 separately addresses #4322; #3544 addresses custom XAUTHORITY forwarding. Neither change is part of this report. Baseline probe took 8.14 s, sampled process-family peak 1.24 GiB; Xvfb/container baseline excluded from that sample. No speedup claim.
bsakaguchi 2026-10-16 21:09:51 +00:00
  • closed this issue
  • added the
    triage
    bug
    labels
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#1754
No description provided.