[GH-ISSUE #3128] [Bug] analyze_javascript_application fails with unreadable_output on any candidate endpoint (unrecognized key 'interpretation') #1089

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

Originally created by @Sergio-763 on GitHub (Oct 14, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/3128

Before submitting

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

Area

Evidence, artifacts, or reconstruction

Interface

CLI

Earliest failure stage

Native analysis or reconstruction

Observed behavior

A one-line application containing a call that the endpoint helper classifies as a candidate (a get/post/put/patch/delete/request method call whose first string argument is not a URL or path) makes the whole analysis fail. The source analyzer's own output is rejected at the worker boundary:

{"error":"JavaScript application analysis failed","code":"unreadable_output","category":"execution_failure","message":"Analysis returned an unreadable result. Run `rea doctor` and review the reported details; repeating the unchanged request is not expected to succeed.","retryable":false, ... "details":{"operation":"analyze_javascript_application","reason":"main.js during static: [\n  {\n    \"code\": \"unrecognized_keys\",\n    \"keys\": [\n      \"interpretation\"\n    ],\n    \"path\": [\n      \"endpoints\",\n      0\n    ],\n    \"message\": \"Unrecognized key: \\\"interpretation\\\"\"\n  }\n]", ...}}

The command exits with an error and returns only a partial observation. A one-character change that makes the first argument a path ("/session") succeeds.

Reproduction

mkdir app && printf 'client.post("session");\n' > app/main.js
rea analyze-javascript-application ./app --format json

Observe the error above (path: ["endpoints", 0], key interpretation).

Control:

mkdir app-ok && printf 'client.post("/session");\n' > app-ok/main.js
rea analyze-javascript-application ./app-ok --format json   # succeeds

Both were run on revision f3534749e.

Expected behavior

Candidate endpoints are reported (as candidates) in the analysis Evidence, or are not emitted if the worker contract does not support them. The analyzer must not produce output its own boundary schema rejects.

Typed outcome or recovery expected

A successful analysis whose endpoint list marks the entry as a candidate interpretation.

Impact and scope

Any application source that contains an ambiguous method call matching the candidate heuristic (for example a keyed-collection or HTTP-client-like post("name")) makes the entire application analysis unusable, not only that file's endpoint list; the remediation text (rea doctor, repeating is not expected to succeed) gives no workaround. Applications whose method calls all take URL-like or path-like first arguments are unaffected. Affects both CLI and MCP since the failure is in shared analysis.

Analysis or suspected cause

Source-derived, not otherwise verified:

  • src/domain/javascript/javascriptStaticAnalysisCalls.ts:407 adds interpretation: "candidate" to the endpoint when the helper returns kind: "candidate" (the candidate kind is produced at src/domain/javascript/javascriptStaticAnalysisHelpers.ts:597-601 and :622-625).
  • src/javascript/analysis/JavaScriptAnalysisWorkerSchemas.ts:325-331 declares endpoints as a z.strictObject({ ...findingContext, kind, value, mechanism }) with no interpretation key, so the strict object rejects it. The domain types already declare the field (src/domain/javascript/javascriptStaticAnalysisTypes.ts:49, javascriptStaticAnalysisState.ts:87), and the dedup key at javascriptStaticAnalysisCalls.ts:516 and the spread at :522-524 carry it, which suggests the worker schema was not updated alongside the producer.

REA version

6.4.0 (source revision f3534749e)

Runtime and platform

Node 24.18.0; macOS arm64 (Darwin 25)

Target and artifact context

Extracted JavaScript application directory containing one source file.

Originally created by @Sergio-763 on GitHub (Oct 14, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/3128 ## Before submitting - [x] I searched the open and closed issues for a related report. - [x] I removed credentials, tokens, private paths, and sensitive target data. ## Area Evidence, artifacts, or reconstruction ## Interface CLI ## Earliest failure stage Native analysis or reconstruction ## Observed behavior A one-line application containing a call that the endpoint helper classifies as a *candidate* (a `get`/`post`/`put`/`patch`/`delete`/`request` method call whose first string argument is not a URL or path) makes the whole analysis fail. The source analyzer's own output is rejected at the worker boundary: ```json {"error":"JavaScript application analysis failed","code":"unreadable_output","category":"execution_failure","message":"Analysis returned an unreadable result. Run `rea doctor` and review the reported details; repeating the unchanged request is not expected to succeed.","retryable":false, ... "details":{"operation":"analyze_javascript_application","reason":"main.js during static: [\n {\n \"code\": \"unrecognized_keys\",\n \"keys\": [\n \"interpretation\"\n ],\n \"path\": [\n \"endpoints\",\n 0\n ],\n \"message\": \"Unrecognized key: \\\"interpretation\\\"\"\n }\n]", ...}} ``` The command exits with an error and returns only a partial observation. A one-character change that makes the first argument a path (`"/session"`) succeeds. ## Reproduction ```sh mkdir app && printf 'client.post("session");\n' > app/main.js rea analyze-javascript-application ./app --format json ``` Observe the error above (`path: ["endpoints", 0]`, key `interpretation`). Control: ```sh mkdir app-ok && printf 'client.post("/session");\n' > app-ok/main.js rea analyze-javascript-application ./app-ok --format json # succeeds ``` Both were run on revision f3534749e. ## Expected behavior Candidate endpoints are reported (as candidates) in the analysis Evidence, or are not emitted if the worker contract does not support them. The analyzer must not produce output its own boundary schema rejects. ## Typed outcome or recovery expected A successful analysis whose endpoint list marks the entry as a candidate interpretation. ## Impact and scope Any application source that contains an ambiguous method call matching the candidate heuristic (for example a keyed-collection or HTTP-client-like `post("name")`) makes the entire application analysis unusable, not only that file's endpoint list; the remediation text (`rea doctor`, repeating is not expected to succeed) gives no workaround. Applications whose method calls all take URL-like or path-like first arguments are unaffected. Affects both CLI and MCP since the failure is in shared analysis. ## Analysis or suspected cause Source-derived, not otherwise verified: - `src/domain/javascript/javascriptStaticAnalysisCalls.ts:407` adds `interpretation: "candidate"` to the endpoint when the helper returns `kind: "candidate"` (the candidate kind is produced at `src/domain/javascript/javascriptStaticAnalysisHelpers.ts:597-601` and `:622-625`). - `src/javascript/analysis/JavaScriptAnalysisWorkerSchemas.ts:325-331` declares `endpoints` as a `z.strictObject({ ...findingContext, kind, value, mechanism })` with no `interpretation` key, so the strict object rejects it. The domain types already declare the field (`src/domain/javascript/javascriptStaticAnalysisTypes.ts:49`, `javascriptStaticAnalysisState.ts:87`), and the dedup key at `javascriptStaticAnalysisCalls.ts:516` and the spread at `:522-524` carry it, which suggests the worker schema was not updated alongside the producer. ## REA version 6.4.0 (source revision f3534749e) ## Runtime and platform Node 24.18.0; macOS arm64 (Darwin 25) ## Target and artifact context Extracted JavaScript application directory containing one source file.
bsakaguchi 2026-10-15 18:30:58 +00:00
  • closed this issue
  • added the
    bug
    label
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#1089
No description provided.