[PR #1773] [MERGED] fix(cli): retry retained browser scenario cleanup #4806

Closed
opened 2026-10-31 00:55:16 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: fix/browser-cli-cleanup-retry-1771


📝 Commits (1)

  • 83351cf fix(cli): retry retained browser scenario cleanup

📊 Changes

2 files changed (+338 additions, -5 deletions)

View changed files

📝 src/cliBrowserScenarioCommands.ts (+36 -5)
➕ tests/boundary/cli/browserScenarioCleanup.test.ts (+302 -0)

📄 Description

The one-shot browser scenario CLI previously discarded its provider after returning capture results, leaving the real Playwright provider's retained cleanup callback without a retry. Attempt optional provider close before the command finishes, including failed and unexpectedly thrown captures.

Preserve the primary capture error and partial observations when shutdown also fails. If capture succeeded but shutdown fails, report a typed cleanup failure and retain the completed, authenticated Evidence. Persistent failures remain reported as incomplete cleanup; one retry does not establish eventual recovery.

Validation:

  • Reproduced on exact main 6d5d71fa through the registered Incur CLI, real Playwright scenario provider and cleanup owner: error/partial observation assertions passed, but provider close was called zero times.
  • Repeated the missing-close reproduction on newer main 40b37aee through the source production CLI/provider boundary; the same zero-close assertion fails. The private reproduction worktree was removed.
  • Five CLI boundary regressions plus 14 existing provider tests passed: transient and persistent cleanup failure, completed Evidence retention, nested cancellation diagnostics and thrown-error precedence. Existing provider tests retain actual AbortSignal coverage.
  • Fresh runtime compile, full single-threaded typecheck, lint/module boundaries, changed-file formatting and architecture guards passed under the 2 GiB/90-second local guardian.

The boundary fixtures inject provider session failures without creating live Chromium processes or profiles. This does not claim live-browser verification or fix a specific earlier real-provider timeout.

Closes #1771.


🔄 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/1773 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 10/11/2026 **Status:** ✅ Merged **Merged:** 10/11/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `fix/browser-cli-cleanup-retry-1771` --- ### 📝 Commits (1) - [`83351cf`](https://github.com/morluto/rea/commit/83351cfdfb4ed4577b308decf61962f6125ac50a) fix(cli): retry retained browser scenario cleanup ### 📊 Changes **2 files changed** (+338 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `src/cliBrowserScenarioCommands.ts` (+36 -5) ➕ `tests/boundary/cli/browserScenarioCleanup.test.ts` (+302 -0) </details> ### 📄 Description The one-shot browser scenario CLI previously discarded its provider after returning capture results, leaving the real Playwright provider's retained cleanup callback without a retry. Attempt optional provider close before the command finishes, including failed and unexpectedly thrown captures. Preserve the primary capture error and partial observations when shutdown also fails. If capture succeeded but shutdown fails, report a typed cleanup failure and retain the completed, authenticated Evidence. Persistent failures remain reported as incomplete cleanup; one retry does not establish eventual recovery. Validation: - Reproduced on exact main `6d5d71fa` through the registered Incur CLI, real Playwright scenario provider and cleanup owner: error/partial observation assertions passed, but provider close was called zero times. - Repeated the missing-close reproduction on newer main `40b37aee` through the source production CLI/provider boundary; the same zero-close assertion fails. The private reproduction worktree was removed. - Five CLI boundary regressions plus 14 existing provider tests passed: transient and persistent cleanup failure, completed Evidence retention, nested cancellation diagnostics and thrown-error precedence. Existing provider tests retain actual AbortSignal coverage. - Fresh runtime compile, full single-threaded typecheck, lint/module boundaries, changed-file formatting and architecture guards passed under the 2 GiB/90-second local guardian. The boundary fixtures inject provider session failures without creating live Chromium processes or profiles. This does not claim live-browser verification or fix a specific earlier real-provider timeout. Closes #1771. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 00:55:16 +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#4806
No description provided.