[PR #2279] [MERGED] fix(electron): identify each unresolved scenario path #5135

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/2279
Author: @1052326311
Created: 10/12/2026
Status: ✅ Merged
Merged: 10/13/2026
Merged by: @morluto

Base: main ← Head: fix/electron-path-diagnostics


📝 Commits (2)

  • ef51f6f fix(electron): identify each unresolved scenario path
  • 73b150e fix(electron): reconcile path diagnostics with current main

📊 Changes

2 files changed (+87 additions, -0 deletions)

View changed files

📝 tests/boundary/cli/scenarioCliInputDiagnostics.test.ts (+41 -0)
📝 tests/boundary/mcp/electronMcp.test.ts (+46 -0)

📄 Description

Summary

Fixes #2272. capture_electron_scenario now reports each unresolved path under its own argument instead of blaming application_path for every filesystem failure.

Problem and expected behavior

A missing executable previously returned issues[0].path: ["application_path"] with invalid_format. It now returns ["executable_path"], invalid_value, and the filesystem error including ENOENT/path. Multiple failures produce one issue per rejected field in stable input-field order.

Change and scope

Canonicalize the three paths independently at the existing application boundary, retaining their causes and collecting all failures before provider admission. Keep canonical paths and inferred application-root behavior on successful requests. The separate launch-failure containment problem tracked in #2269 is outside this PR's scope.

Contract and boundary impact

  • Semantic owner and earliest changed stage: ElectronActiveObservationService.canonicalizeInput.
  • Contribution scope fit and linked maintainer decision: ordinary diagnostic fix within existing behavior; new-capability decision not applicable.
  • CLI and MCP/tool-catalog contract: unchanged schemas; use existing invalid_value reason for well-formed paths that cannot resolve.
  • Provider, bridge, target-format, or platform compatibility: no provider launch changes.
  • Evidence, artifact, provenance, or reconstruction contract: no success Evidence changes.
  • Target selection, authority, upstream behavior, and cleanup details: preserve realpath normalization; reject invalid inputs before provider capture.
  • Generated metadata, package, or installation impact: none.

Expected effects of this change:

  • Read existing files or captured data (existing path-resolution boundary).

Evidence and regression coverage

  • Three compiled CLI regressions distinguish missing executable, application and root. On unchanged base 2e45b4d7, all three fail; two existing schema tests pass.

  • MCP regression checks all three missing paths together, ensures capture was not called, and pings the still-live server.

  • Existing MCP success test retains canonical symlink resolution and inferred-root behavior.

  • Representative output: issues: [{path:["executable_path"], reason:"invalid_value", message:"Cannot resolve executable_path: ENOENT: ..."}].

  • Remaining proof gaps: executed on macOS; Windows and permission-denied filesystem cases not executed locally. No live Electron launch is needed for this pre-admission change or claimed as tested.

  • Observed, derived, and inferred claims remain distinguishable.

  • Artifact identity, source provenance, and failed attempts remain preserved.

  • Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.

Validation performed

  • npm run test:focused -- tests/boundary/cli/scenarioCliInputDiagnostics.test.ts tests/boundary/mcp/electronMcp.test.ts — 11 passed.
  • npm run check — six tasks and architecture guards passed.
  • git diff --check — passed.

Compatibility, safety, and release

  • Breaking changes or migration steps: none; existing error schema and reason enum retained.
  • Real Hopper/Ghidra, browser, or OS coverage: real macOS filesystem, compiled CLI and in-memory MCP transport; no live analysis engine.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: path diagnostics refer to caller-selected files; no new authority or execution.

Review checklist

  • Concrete problem, focused outcome, and conventional title.
  • Issue linked; no new-capability scope decision needed.
  • Changed observable behavior and existing success path covered.
  • No schema/catalog/documentation contract changes required.
  • Representative CLI/MCP output and proof gaps provided.
  • Final diff inspected for secrets, generated files and unrelated changes.

Upstream status — 2026-10-13

The maintainer has addressed #2272 directly on main in b7169c8b74, including field-specific path diagnostics and additional canonicalization boundary changes. This PR remains unmerged and now overlaps that implementation; its original validation below applies to its own head, not current main.


🔄 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/2279 **Author:** [@1052326311](https://github.com/1052326311) **Created:** 10/12/2026 **Status:** ✅ Merged **Merged:** 10/13/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/electron-path-diagnostics` --- ### 📝 Commits (2) - [`ef51f6f`](https://github.com/morluto/rea/commit/ef51f6f62d6ca065c5c1205ff810aa87d9821c74) fix(electron): identify each unresolved scenario path - [`73b150e`](https://github.com/morluto/rea/commit/73b150ec1f189658f412ba5ebc96629f2ec3486f) fix(electron): reconcile path diagnostics with current main ### 📊 Changes **2 files changed** (+87 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `tests/boundary/cli/scenarioCliInputDiagnostics.test.ts` (+41 -0) 📝 `tests/boundary/mcp/electronMcp.test.ts` (+46 -0) </details> ### 📄 Description ## Summary Fixes #2272. `capture_electron_scenario` now reports each unresolved path under its own argument instead of blaming `application_path` for every filesystem failure. ## Problem and expected behavior A missing executable previously returned `issues[0].path: ["application_path"]` with `invalid_format`. It now returns `["executable_path"]`, `invalid_value`, and the filesystem error including ENOENT/path. Multiple failures produce one issue per rejected field in stable input-field order. ## Change and scope Canonicalize the three paths independently at the existing application boundary, retaining their causes and collecting all failures before provider admission. Keep canonical paths and inferred application-root behavior on successful requests. The separate launch-failure containment problem tracked in #2269 is outside this PR's scope. ## Contract and boundary impact - Semantic owner and earliest changed stage: `ElectronActiveObservationService.canonicalizeInput`. - Contribution scope fit and linked maintainer decision: ordinary diagnostic fix within existing behavior; new-capability decision not applicable. - CLI and MCP/tool-catalog contract: unchanged schemas; use existing `invalid_value` reason for well-formed paths that cannot resolve. - Provider, bridge, target-format, or platform compatibility: no provider launch changes. - Evidence, artifact, provenance, or reconstruction contract: no success Evidence changes. - Target selection, authority, upstream behavior, and cleanup details: preserve realpath normalization; reject invalid inputs before provider capture. - Generated metadata, package, or installation impact: none. Expected effects of this change: - [x] Read existing files or captured data (existing path-resolution boundary). ## Evidence and regression coverage - Three compiled CLI regressions distinguish missing executable, application and root. On unchanged base `2e45b4d7`, all three fail; two existing schema tests pass. - MCP regression checks all three missing paths together, ensures capture was not called, and pings the still-live server. - Existing MCP success test retains canonical symlink resolution and inferred-root behavior. - Representative output: `issues: [{path:["executable_path"], reason:"invalid_value", message:"Cannot resolve executable_path: ENOENT: ..."}]`. - Remaining proof gaps: executed on macOS; Windows and permission-denied filesystem cases not executed locally. No live Electron launch is needed for this pre-admission change or claimed as tested. - [x] Observed, derived, and inferred claims remain distinguishable. - [x] Artifact identity, source provenance, and failed attempts remain preserved. - [x] Unsupported, incomplete, unavailable, or uncertain outcomes remain visible. ## Validation performed - `npm run test:focused -- tests/boundary/cli/scenarioCliInputDiagnostics.test.ts tests/boundary/mcp/electronMcp.test.ts` — 11 passed. - `npm run check` — six tasks and architecture guards passed. - `git diff --check` — passed. ## Compatibility, safety, and release - Breaking changes or migration steps: none; existing error schema and reason enum retained. - Real Hopper/Ghidra, browser, or OS coverage: real macOS filesystem, compiled CLI and in-memory MCP transport; no live analysis engine. - Package or release metadata impact: none. - Security, privacy, process, or containment review: path diagnostics refer to caller-selected files; no new authority or execution. ## Review checklist - [x] Concrete problem, focused outcome, and conventional title. - [x] Issue linked; no new-capability scope decision needed. - [x] Changed observable behavior and existing success path covered. - [x] No schema/catalog/documentation contract changes required. - [x] Representative CLI/MCP output and proof gaps provided. - [x] Final diff inspected for secrets, generated files and unrelated changes. ## Upstream status — 2026-10-13 The maintainer has addressed #2272 directly on main in b7169c8b747cbc032913b31f008a3b81c77b6219, including field-specific path diagnostics and additional canonicalization boundary changes. This PR remains unmerged and now overlaps that implementation; its original validation below applies to its own head, not current main. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:04:14 +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#5135
No description provided.