[PR #2500] [CLOSED] fix(electron): name the failing path in capture_electron_scenario input errors #5278

Closed
opened 2026-10-31 01:05:23 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/2500
Author: @chqcjq
Created: 10/13/2026
Status: ❌ Closed

Base: main ← Head: fix/electron-input-path-errors


📝 Commits (1)

  • dcdb8bc fix(electron): name the failing path in capture_electron_scenario input errors

📊 Changes

2 files changed (+42 additions, -8 deletions)

View changed files

📝 src/application/javascript/ElectronActiveObservationService.ts (+20 -3)
📝 src/browser/PlaywrightElectronActiveProvider.ts (+22 -5)

📄 Description

Fixes #2272.

Problem

capture_electron_scenario reports every unresolvable path as application_path/invalid_format, regardless of which input path actually failed. The underlying cause (which path, which errno) is not surfaced.

Root cause

Both path resolution layers — ElectronActiveObservationService.canonicalizeInput and PlaywrightElectronActiveProvider.canonicalPaths — use Promise.all to resolve paths concurrently. When any path fails, the rejection is caught by a generic handler that blames application_path and reports invalid_format.

Fix

  • Each path is resolved individually with its own error handler, naming the failing field (executable_path, application_path, or application_root).
  • The reason changes from invalid_format to invalid_value (the input is well-formed but does not exist).
  • The original error cause (errno) is preserved in the error chain.

Verification

  • rea capture-electron-scenario with a missing executable_path now returns issues[0].path: ["executable_path"] instead of ["application_path"].
  • npm run check, docs:check, and verify:test-discovery (943 files) all pass.

🔄 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/2500 **Author:** [@chqcjq](https://github.com/chqcjq) **Created:** 10/13/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/electron-input-path-errors` --- ### 📝 Commits (1) - [`dcdb8bc`](https://github.com/morluto/rea/commit/dcdb8bcc361640313af5e55d4d355461e42dde02) fix(electron): name the failing path in capture_electron_scenario input errors ### 📊 Changes **2 files changed** (+42 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `src/application/javascript/ElectronActiveObservationService.ts` (+20 -3) 📝 `src/browser/PlaywrightElectronActiveProvider.ts` (+22 -5) </details> ### 📄 Description Fixes #2272. ## Problem `capture_electron_scenario` reports every unresolvable path as `application_path/invalid_format`, regardless of which input path actually failed. The underlying cause (which path, which errno) is not surfaced. ## Root cause Both path resolution layers — `ElectronActiveObservationService.canonicalizeInput` and `PlaywrightElectronActiveProvider.canonicalPaths` — use `Promise.all` to resolve paths concurrently. When any path fails, the rejection is caught by a generic handler that blames `application_path` and reports `invalid_format`. ## Fix - Each path is resolved individually with its own error handler, naming the failing field (`executable_path`, `application_path`, or `application_root`). - The reason changes from `invalid_format` to `invalid_value` (the input is well-formed but does not exist). - The original error cause (errno) is preserved in the error chain. ## Verification - `rea capture-electron-scenario` with a missing `executable_path` now returns `issues[0].path: ["executable_path"]` instead of `["application_path"]`. - `npm run check`, `docs:check`, and `verify:test-discovery` (943 files) all pass. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:05:23 +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#5278
No description provided.