[GH-ISSUE #3670] [Bug] analyze-javascript-application silently skips JavaScript files above ~5 MB (parsed 0, parse_failures 0, no limitation) #1382

Closed
opened 2026-10-16 21:04:54 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @andresaragon on GitHub (Oct 14, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/3670

Summary: analyze-javascript-application silently skips JavaScript files above roughly 5 MB. The file is inventoried (text_status: "included") but never parsed: parse_status is null, parsed_javascript_files is 0, parse_failures is 0, visited_ast_nodes is 0, and no limitation mentions it. The summary then shows 0 for IPC and Electron facts, which reads as "nothing there" rather than "not analyzed".

Version / environment: rea-agents@6.4.0, Node 24.21.0, Linux x64 (WSL2), default --max-heap-mb.

Repro: a synthetic Electron-style app with a single JavaScript file of a chosen size.

mkdir app && echo '{"name":"repro","version":"1.0.0","main":"main.js"}' > app/package.json
python3 - <<'PY'
import sys
target = 5_000_000
parts = ['"use strict";const {ipcMain}=require("electron");\n']; size = n = 0
while size < target:
    n += 1
    s = f'function f{n}(a,b){{const o={{k{n}:a+{n},v:[b,{n},"s{n}"]}};if(a>{n}){{return o.v.map(x=>x+a)}}return o}}ipcMain.handle("ch:{n%50}",(e,x)=>f{n}(x,{n}));\n'
    parts.append(s); size += len(s)
open('app/main.js', 'w').write(''.join(parts))
PY
npx -y rea-agents@6.4.0 analyze-javascript-application "$PWD/app" --json > out.json

Observed (same generator, only target changes):

main.js size parsed_javascript_files parse_failures summary.ipc.operations
4 MB 1 0 25,749
5 MB 0 0 0
6 MB 0 0 0
8 MB 0 0 0
10 MB 0 0 0
19 MB 0 0 0

For the 10 MB case the file observation is {"bytes": 10000081, "text_status": "included", "parse_status": null}, and limitations has no entry about it. I could not find a byte limit for JavaScript sources in dist/, so the threshold above is only what I observed.

Expected: either parse the file, or report it as not analyzed, for example parse_status: "skipped" with a reason, a non-zero counter, and a limitation. Real-world bundles in this range are common (webpack/esbuild output).

Real-world impact: VSCodium 1.140.06880 (MIT build of VS Code), resources/app/out, analyzed with --max-heap-mb 6144 --analysis-timeout-ms 900000: out/vs/workbench/workbench.desktop.main.js (about 20 MB, the main renderer bundle) and out/vs/sessions/sessions.desktop.main.js (about 21 MB) end as parse_status: "failed", and statistics.parse_failures is 2. Those two files are about 68% of the text read, so every count derived from them is an unknown, not a zero. The summary does not say so.

Related but different from #1387 (which is about serialization size).

Originally created by @andresaragon on GitHub (Oct 14, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/3670 **Summary:** `analyze-javascript-application` silently skips JavaScript files above roughly 5 MB. The file is inventoried (`text_status: "included"`) but never parsed: `parse_status` is `null`, `parsed_javascript_files` is 0, `parse_failures` is 0, `visited_ast_nodes` is 0, and no limitation mentions it. The summary then shows `0` for IPC and Electron facts, which reads as "nothing there" rather than "not analyzed". **Version / environment:** `rea-agents@6.4.0`, Node 24.21.0, Linux x64 (WSL2), default `--max-heap-mb`. **Repro:** a synthetic Electron-style app with a single JavaScript file of a chosen size. ```bash mkdir app && echo '{"name":"repro","version":"1.0.0","main":"main.js"}' > app/package.json python3 - <<'PY' import sys target = 5_000_000 parts = ['"use strict";const {ipcMain}=require("electron");\n']; size = n = 0 while size < target: n += 1 s = f'function f{n}(a,b){{const o={{k{n}:a+{n},v:[b,{n},"s{n}"]}};if(a>{n}){{return o.v.map(x=>x+a)}}return o}}ipcMain.handle("ch:{n%50}",(e,x)=>f{n}(x,{n}));\n' parts.append(s); size += len(s) open('app/main.js', 'w').write(''.join(parts)) PY npx -y rea-agents@6.4.0 analyze-javascript-application "$PWD/app" --json > out.json ``` **Observed** (same generator, only `target` changes): | main.js size | parsed_javascript_files | parse_failures | summary.ipc.operations | |---|---|---|---| | 4 MB | 1 | 0 | 25,749 | | 5 MB | 0 | 0 | 0 | | 6 MB | 0 | 0 | 0 | | 8 MB | 0 | 0 | 0 | | 10 MB | 0 | 0 | 0 | | 19 MB | 0 | 0 | 0 | For the 10 MB case the file observation is `{"bytes": 10000081, "text_status": "included", "parse_status": null}`, and `limitations` has no entry about it. I could not find a byte limit for JavaScript sources in `dist/`, so the threshold above is only what I observed. **Expected:** either parse the file, or report it as not analyzed, for example `parse_status: "skipped"` with a reason, a non-zero counter, and a limitation. Real-world bundles in this range are common (webpack/esbuild output). **Real-world impact:** VSCodium 1.140.06880 (MIT build of VS Code), `resources/app/out`, analyzed with `--max-heap-mb 6144 --analysis-timeout-ms 900000`: `out/vs/workbench/workbench.desktop.main.js` (about 20 MB, the main renderer bundle) and `out/vs/sessions/sessions.desktop.main.js` (about 21 MB) end as `parse_status: "failed"`, and `statistics.parse_failures` is 2. Those two files are about 68% of the text read, so every count derived from them is an unknown, not a zero. The summary does not say so. Related but different from #1387 (which is about serialization size).
Author
Owner

@andresaragon commented on GitHub (Oct 15, 2026):

Re-tested on the published 6.5.0 with the same generator from the description (Linux x64, Node 24.21.0, default limits). Same result:

main.js size parsed_javascript_files parse_failures summary.ipc.operations
5 MB 0 0 0
10 MB 0 0 0
19 MB 0 0 0

The file is still inventoried (text_status: "included") with no parse status and no limitation, so the summary reads as "no IPC" instead of "not analyzed". I have not re-tested the 4 MB case on 6.5.0 and have not checked main.

<!-- gh-comment-id:6183013377 --> @andresaragon commented on GitHub (Oct 15, 2026): Re-tested on the published **6.5.0** with the same generator from the description (Linux x64, Node 24.21.0, default limits). Same result: | main.js size | parsed_javascript_files | parse_failures | summary.ipc.operations | |---|---|---|---| | 5 MB | 0 | 0 | 0 | | 10 MB | 0 | 0 | 0 | | 19 MB | 0 | 0 | 0 | The file is still inventoried (`text_status: "included"`) with no parse status and no limitation, so the summary reads as "no IPC" instead of "not analyzed". I have not re-tested the 4 MB case on 6.5.0 and have not checked `main`.
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#1382
No description provided.