[PR #4345] fix(cleanup): restore shared ownership across browser, capture, and adb boundaries #6189

Open
opened 2026-10-31 01:12:32 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/4345
Author: @SoufianoDev
Created: 10/16/2026
Status: 🔄 Open

Base: main ← Head: fix/shared-cleanup-ownership


📝 Commits (2)

  • a12cc09 fix(cleanup): restore shared ownership across browser, capture, and adb boundaries
  • 34468b1 fix(mcp): close all shared observation providers on transport shutdown

📊 Changes

7 files changed (+109 additions, -32 deletions)

View changed files

📝 src/application/BrowserScenarioCaptureService.ts (+8 -8)
📝 src/browser/PlaywrightBrowserScenarioProvider.ts (+4 -1)
📝 src/cli/finishAnalysisCommand.ts (+0 -2)
📝 src/main/transport.ts (+29 -1)
📝 src/server/createServer.ts (+9 -3)
📝 tests/boundary/cli/adbCli.test.ts (+8 -8)
📝 tests/boundary/process/browserScenarioProbeLifecycle.test.ts (+51 -9)

📄 Description

Fixes the 7 CI failures on main (run 38833320851), all regressed in the 93c620c3e/3b698645a batch, not in the adb hash-cleanup commits.

Observable outcome: the 7 failing tests pass locally (plus the contradicted serverLifecycle neighbor).

Approach:

  • finishAnalysisCommand no longer resolves unrelated cleanup on service close; only the owning release may resolve.
  • Playwright provider and capture service keep step-level cancellation as the terminal representation instead of re-projecting to a top-level Cancelled error.
  • Shared MCP observation providers are caller-owned via a new createServer flag, so discarded SDK probes no longer kill peers; direct createServer use keeps server-close.
  • adb reinstall assertion tracks the staged snapshot path instead of the caller tmpdir.

Evidence (actually ran): targeted suites green (Playwright provider 20/20, capture/signal/adbCli/probeLifecycle, SIGINT+SIGTERM acceptance, serverLifecycleMcp, finishAnalysisCommand, capture service), plus build, typecheck, and lint. Full 7-shard CI not run.

Author readiness left for the human owner.


🔄 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/4345 **Author:** [@SoufianoDev](https://github.com/SoufianoDev) **Created:** 10/16/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/shared-cleanup-ownership` --- ### 📝 Commits (2) - [`a12cc09`](https://github.com/morluto/rea/commit/a12cc09ce105059ee00f6ca330c61422059574a6) fix(cleanup): restore shared ownership across browser, capture, and adb boundaries - [`34468b1`](https://github.com/morluto/rea/commit/34468b12f97fa22fc1632afc548b3427e3e76a78) fix(mcp): close all shared observation providers on transport shutdown ### 📊 Changes **7 files changed** (+109 additions, -32 deletions) <details> <summary>View changed files</summary> 📝 `src/application/BrowserScenarioCaptureService.ts` (+8 -8) 📝 `src/browser/PlaywrightBrowserScenarioProvider.ts` (+4 -1) 📝 `src/cli/finishAnalysisCommand.ts` (+0 -2) 📝 `src/main/transport.ts` (+29 -1) 📝 `src/server/createServer.ts` (+9 -3) 📝 `tests/boundary/cli/adbCli.test.ts` (+8 -8) 📝 `tests/boundary/process/browserScenarioProbeLifecycle.test.ts` (+51 -9) </details> ### 📄 Description Fixes the 7 CI failures on main (run 38833320851), all regressed in the 93c620c3e/3b698645a batch, not in the adb hash-cleanup commits. Observable outcome: the 7 failing tests pass locally (plus the contradicted serverLifecycle neighbor). Approach: - finishAnalysisCommand no longer resolves unrelated cleanup on service close; only the owning release may resolve. - Playwright provider and capture service keep step-level cancellation as the terminal representation instead of re-projecting to a top-level Cancelled error. - Shared MCP observation providers are caller-owned via a new createServer flag, so discarded SDK probes no longer kill peers; direct createServer use keeps server-close. - adb reinstall assertion tracks the staged snapshot path instead of the caller tmpdir. Evidence (actually ran): targeted suites green (Playwright provider 20/20, capture/signal/adbCli/probeLifecycle, SIGINT+SIGTERM acceptance, serverLifecycleMcp, finishAnalysisCommand, capture service), plus build, typecheck, and lint. Full 7-shard CI not run. Author readiness left for the human owner. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#6189
No description provided.