[GH-ISSUE #4869] [Bug] Browser scenario cleanup errors retain released ownership #3025

Closed
opened 2026-10-31 00:35:04 +00:00 by bsakaguchi · 0 comments
Owner

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

Before submitting

  • Searched the retained issue inventory and latest 100 issue/PR records for related cleanup reports. #4659 covers abrupt termination and durable reclamation, not this awaited retry control. Exact-title remote search across open/closed reports also returned no match.
  • No credentials or private target data included.

Area

Browser, Electron, or web observation

Observed behavior

On main3fcba0796, PlaywrightScenarioBrowserCleanupOwner creates cleanup errors with static browser_transport/browser_profile labels. After the transport closes but profile removal still fails, earlier/current errors retain the released transport label. After exact profile removal succeeds, earlier errors remain cleanupIncomplete=true.

Reproduction

A source test creates an authored temporary profile directory and file. Its closeBrowser action initially rejects. After allowing that action, removeProfile still rejects; the first and second error should name only browser_profile. Finally allow rm of the actual authored directory, await close, verify ENOENT, and inspect both returned errors. The control fails on unchanged main3fcba0796 at the partial-recovery resource assertion. Controlled actions model browser transport closure; no browser process is launched. This is not a natural SDK or OS incident.

Expected behavior

Keep canonical cleanup ownership, live labels, and release notifications through the browser owner, opening failures, retained scope, and final error projection. Independent resource cleanup must not stop at the first failed peer. Late close completion must update original errors without requiring an unrelated retry. Preserve physical failures, typed cancellation, exact reasons, captured facts and independent primary cleanup.

Impact and scope

Observed producer boundary with an actual authored directory and controlled close/removal failures. Source-derived: opening callbacks erase exact lease identity; returned provider errors copy cleanup status; retry stops after one failed pending callback. NOT_ENOUGH_INFO: real-browser incident rate and native SDK failure reproduction. Abrupt termination recovery remains separately tracked by #4659.

REA version

6.5.0,3fcba07962a1f9f23130a5210dba242f6a331a5b

Runtime and platform

Node24.18.0, macOS arm64.

Target and artifact context

Authored profile directory/file only, controlled transport action, no Chromium process or target execution.

Interface

Other: shared browser cleanup owner and provider boundary; public adapter impact currently source-derived.

Earliest failure stage

Cleanup, cancellation, or lifecycle

Relevant output or evidence

browserClosed=true after partial retry, but returned cleanup resources still include browser_transport. Actual directory removal is available and confirmed in the authored control's cleanup. Baseline test: browser-cleanup-recovery-baseline.log (1 failed/15 passed). No actual browser process leakage claim.

Typed outcome or recovery expected

Restore original typed outcome after exact cleanup, while keeping partial capture provenance and historical failure evidence.

Analysis or suspected cause

Close errors are snapshots without a release dependency. Callback retention discards the existing canonical owner and reconstructs another cleanup representation downstream.

Originally created by @morluto on GitHub (Oct 17, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/4869 ### Before submitting - [x] Searched the retained issue inventory and latest 100 issue/PR records for related cleanup reports. #4659 covers abrupt termination and durable reclamation, not this awaited retry control. Exact-title remote search across open/closed reports also returned no match. - [x] No credentials or private target data included. ### Area Browser, Electron, or web observation ### Observed behavior On main3fcba0796, PlaywrightScenarioBrowserCleanupOwner creates cleanup errors with static browser_transport/browser_profile labels. After the transport closes but profile removal still fails, earlier/current errors retain the released transport label. After exact profile removal succeeds, earlier errors remain cleanupIncomplete=true. ### Reproduction A source test creates an authored temporary profile directory and file. Its closeBrowser action initially rejects. After allowing that action, removeProfile still rejects; the first and second error should name only browser_profile. Finally allow rm of the actual authored directory, await close, verify ENOENT, and inspect both returned errors. The control fails on unchanged main3fcba0796 at the partial-recovery resource assertion. Controlled actions model browser transport closure; no browser process is launched. This is not a natural SDK or OS incident. ### Expected behavior Keep canonical cleanup ownership, live labels, and release notifications through the browser owner, opening failures, retained scope, and final error projection. Independent resource cleanup must not stop at the first failed peer. Late close completion must update original errors without requiring an unrelated retry. Preserve physical failures, typed cancellation, exact reasons, captured facts and independent primary cleanup. ### Impact and scope Observed producer boundary with an actual authored directory and controlled close/removal failures. Source-derived: opening callbacks erase exact lease identity; returned provider errors copy cleanup status; retry stops after one failed pending callback. NOT_ENOUGH_INFO: real-browser incident rate and native SDK failure reproduction. Abrupt termination recovery remains separately tracked by #4659. ### REA version 6.5.0,3fcba07962a1f9f23130a5210dba242f6a331a5b ### Runtime and platform Node24.18.0, macOS arm64. ### Target and artifact context Authored profile directory/file only, controlled transport action, no Chromium process or target execution. ### Interface Other: shared browser cleanup owner and provider boundary; public adapter impact currently source-derived. ### Earliest failure stage Cleanup, cancellation, or lifecycle ### Relevant output or evidence browserClosed=true after partial retry, but returned cleanup resources still include browser_transport. Actual directory removal is available and confirmed in the authored control's cleanup. Baseline test: browser-cleanup-recovery-baseline.log (1 failed/15 passed). No actual browser process leakage claim. ### Typed outcome or recovery expected Restore original typed outcome after exact cleanup, while keeping partial capture provenance and historical failure evidence. ### Analysis or suspected cause Close errors are snapshots without a release dependency. Callback retention discards the existing canonical owner and reconstructs another cleanup representation downstream.
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#3025
No description provided.