[GH-ISSUE #720] [Bug] Supported JavaScript directories receive misleading target diagnostics #319

Closed
opened 2026-10-15 18:23:50 +00:00 by bsakaguchi · 0 comments
Owner

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

Before submitting

  • I searched the open and closed issues and relevant pull requests for a related report.
  • I removed credentials, tokens, private paths, and sensitive target data.

Area

Provider or capability discovery

Observed behavior

A readable three-file JS application directory was accepted by rea analyze and analyze_javascript_application, but open_binary returned target_unavailable with generic path/readability advice. rea doctor --target <JS_APP> --json classified the same directory as target config_drift and advised supplying a readable app/program path.

The public investigate_feature prompt lists open_binary and analyze_javascript_application as optional starting points; it does not mandate the failed opening call. Opening index.js succeeded, but application analysis still required its separate input_path.

Reproduction

Create a directory <JS_APP> containing these three files (replace the placeholder with a caller-selected temporary directory):

package.json:

{"name":"offline-search-demo","version":"1.0.0","type":"module","main":"index.js"}
// index.js
import { search } from './search.js';
export function findNotes(notes, query) { return search(notes, query); }
// search.js
export function search(notes, query) {
  const normalized = query.trim().toLowerCase();
  const matches = notes.filter(note => note.title.toLowerCase().includes(normalized));
  return { matches, count: matches.length };
}
  1. Run rea analyze <JS_APP> --json; observe success.
  2. Run rea doctor --target <JS_APP> --json; inspect the target check (separate it from unrelated audit-wide failures).
  3. On one real MCP connection, call open_binary({path: <JS_APP>}); observe generic target_unavailable.
  4. Call analyze_javascript_application({input_path: <JS_APP>}); observe success.
  5. Optionally open <JS_APP>/index.js; this succeeds but does not eliminate the application analyzer's explicit path input.

Expected behavior

Identify a supported JS application directory consistently, or explain that the selected opening/doctor route is narrower and name the available JS analyzer. An unsupported route should not imply that a known-readable supported application needs filesystem repair.

Impact and scope

Misleads target selection and recovery across CLI/MCP. This does not request deep native analysis of directories or claim that all directory kinds are supported. Doctor and opening are distinct boundaries; a shared internal cause has not been established.

REA version

REA 4.0.1, source revision c3bc38bf6c74d2175a4680530dcadd6cab0e7791; evaluation date 2026-10-06.

Runtime and platform

Node.js 22.19.0; Linux x64 on WSL2 (Ubuntu 24.04); pinned MCP client SDK 2.3.1. Windows-native behavior was not tested in this evaluation.

Target and artifact context

Three-file Node ES-module application directory, not an archive or native executable. Direct analysis succeeded without a deep analysis engine.

Interface

MCP

Earliest failure stage

Setup or provider admission

Relevant output or evidence

open_binary: target_unavailable / unavailable
REA could not open that app or binary. Check that the path exists, is readable, and points to a supported file.

doctor target check: ok=false, classification=config_drift
Supply a readable local app or program path.

analyze_javascript_application on the same directory: success, about 295 ms
rea analyze on the same directory: success, about 1.61 s

Typed outcome or recovery expected

Route-specific unsupported-target information with an available JS-analysis action, or successful shared application-target selection. Preserve actual unreadable/nonexistent-path errors.

Analysis or suspected cause

Observed classification/diagnostic mismatch. Do not infer that CLI doctor and MCP open share a parser or failure path.

Additional context

Hands-on public CLI/MCP evaluation, findings F03 and the target-specific part of F01. Baseline: REA 4.0.1, source revision c3bc38bf6c74d2175a4680530dcadd6cab0e7791; evaluation date 2026-10-06.

docs/mcp-prompts.md; docs/mcp-contracts.md. This differs from archive parsing and large-target failures such as #623.

Originally created by @N0zoM1z0 on GitHub (Oct 6, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/720 ### Before submitting - [x] I searched the open and closed issues and relevant pull requests for a related report. - [x] I removed credentials, tokens, private paths, and sensitive target data. ### Area Provider or capability discovery ### Observed behavior A readable three-file JS application directory was accepted by `rea analyze` and `analyze_javascript_application`, but `open_binary` returned `target_unavailable` with generic path/readability advice. `rea doctor --target <JS_APP> --json` classified the same directory as target `config_drift` and advised supplying a readable app/program path. The public `investigate_feature` prompt lists `open_binary` and `analyze_javascript_application` as optional starting points; it does not mandate the failed opening call. Opening index.js succeeded, but application analysis still required its separate input_path. ### Reproduction Create a directory `<JS_APP>` containing these three files (replace the placeholder with a caller-selected temporary directory): `package.json`: ```json {"name":"offline-search-demo","version":"1.0.0","type":"module","main":"index.js"} ``` ```js // index.js import { search } from './search.js'; export function findNotes(notes, query) { return search(notes, query); } ``` ```js // search.js export function search(notes, query) { const normalized = query.trim().toLowerCase(); const matches = notes.filter(note => note.title.toLowerCase().includes(normalized)); return { matches, count: matches.length }; } ``` 1. Run `rea analyze <JS_APP> --json`; observe success. 2. Run `rea doctor --target <JS_APP> --json`; inspect the target check (separate it from unrelated audit-wide failures). 3. On one real MCP connection, call `open_binary({path: <JS_APP>})`; observe generic target_unavailable. 4. Call `analyze_javascript_application({input_path: <JS_APP>})`; observe success. 5. Optionally open `<JS_APP>/index.js`; this succeeds but does not eliminate the application analyzer's explicit path input. ### Expected behavior Identify a supported JS application directory consistently, or explain that the selected opening/doctor route is narrower and name the available JS analyzer. An unsupported route should not imply that a known-readable supported application needs filesystem repair. ### Impact and scope Misleads target selection and recovery across CLI/MCP. This does not request deep native analysis of directories or claim that all directory kinds are supported. Doctor and opening are distinct boundaries; a shared internal cause has not been established. ### REA version REA 4.0.1, source revision [c3bc38bf6c74d2175a4680530dcadd6cab0e7791](https://github.com/morluto/rea/commit/c3bc38bf6c74d2175a4680530dcadd6cab0e7791); evaluation date 2026-10-06. ### Runtime and platform Node.js 22.19.0; Linux x64 on WSL2 (Ubuntu 24.04); pinned MCP client SDK 2.3.1. Windows-native behavior was not tested in this evaluation. ### Target and artifact context Three-file Node ES-module application directory, not an archive or native executable. Direct analysis succeeded without a deep analysis engine. ### Interface MCP ### Earliest failure stage Setup or provider admission ### Relevant output or evidence ```text open_binary: target_unavailable / unavailable REA could not open that app or binary. Check that the path exists, is readable, and points to a supported file. doctor target check: ok=false, classification=config_drift Supply a readable local app or program path. analyze_javascript_application on the same directory: success, about 295 ms rea analyze on the same directory: success, about 1.61 s ``` ### Typed outcome or recovery expected Route-specific unsupported-target information with an available JS-analysis action, or successful shared application-target selection. Preserve actual unreadable/nonexistent-path errors. ### Analysis or suspected cause Observed classification/diagnostic mismatch. Do not infer that CLI doctor and MCP open share a parser or failure path. ### Additional context Hands-on public CLI/MCP evaluation, findings F03 and the target-specific part of F01. Baseline: REA 4.0.1, source revision [c3bc38bf6c74d2175a4680530dcadd6cab0e7791](https://github.com/morluto/rea/commit/c3bc38bf6c74d2175a4680530dcadd6cab0e7791); evaluation date 2026-10-06. [docs/mcp-prompts.md](https://github.com/morluto/rea/blob/c3bc38bf6c74d2175a4680530dcadd6cab0e7791/docs/mcp-prompts.md); [docs/mcp-contracts.md](https://github.com/morluto/rea/blob/c3bc38bf6c74d2175a4680530dcadd6cab0e7791/docs/mcp-contracts.md). This differs from archive parsing and large-target failures such as #623.
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#319
No description provided.