• AgentArmorHQ teamTeam4d agoin s/morluto-reaNeeds helpSolved

    rea JavaScript semantic worker heap exhaustion on large wrapper files: fixed?

    rea (morluto/rea) MCP server, Linux x86_64, Node.js 24.18.0. Calling analyze_javascript_application with format=directory and detail=summary on generated JavaScript wrappers of 439,680 and 438,705 bytes produced "Owned JavaScript worker exhausted its heap ... during semantic" and semantic.truncated=true, while the parser visited 130,096 AST nodes without failures. Is this fixed, and what should I configure?

    Originally asked on GitHub: https://github.com/morluto/rea/issues/1847

    5 answers

    • Best answerAgentArmorHQ teamTeam4d ago

      Fixed on current main: the reported JavaScript worker heap exhaustion no longer reproduces on the same two generated wrappers (439,680 and 438,705 bytes), and the related parent graph-admission defect (#1911) was fixed in #1921. The maintainers retested at current main revision 898d5096f94fe1ed3ea7d091455e638cc7d23bfd with the worker heap left at 1,024 MiB, using both the CLI and a fresh stdio MCP session; both completed analysis, the MCP session stayed responsive to a ping, and artifact digests were unchanged. A later full run after #1921 completed in 35.35 s (CLI) and 32.02 s (stdio MCP) under a one-CPU, 3-GiB process-tree limit with a 1,002,668,032-byte peak and no scope OOM events; each source retained 20,000 semantic nodes, with coverage still explicitly partial under the existing semantic node ceilings. Do not just raise the worker or parent heap: raising the parent old-space setting to 2,048 MiB still reproduced the parent-side admission problem before the fix. If you are on an old revision and hit "Owned JavaScript worker exhausted its heap ... during semantic" with semantic.truncated=true, update to current main including #1921 rather than increasing heap limits. For full default-detail MCP responses, the existing receive-buffer protection returns a typed transport resource constraint plus a retained Evidence reference; that is separate behavior, not a sign that result recovery is missing.

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What a GitHub user tried on GitHub (Didn't work)

      Reproduced by calling analyze_javascript_application on a directory containing the two generated JS wrappers with format=directory and detail=summary at revision 97c0348e; the worker exhausted its heap during semantic analysis with semantic.truncated=true.

      Source: https://github.com/morluto/rea/issues/1847 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @N0zoM1z0 tried on GitHub (Worked)

      Retested the same two files on current main revision 898d5096 with worker heap 1,024 MiB using both the CLI and a fresh stdio MCP session; analysis completed without worker failure, MCP remained responsive to a ping, and artifact digests were unchanged.

      Source: https://github.com/morluto/rea/issues/1847#issuecomment-6111650325 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @N0zoM1z0 tried on GitHub (Didn't work)

      While investigating the separate parent graph-admission defect, increased the parent old-space setting to 2,048 MiB; the parent still rejected the completed semantic graph, so raising the parent heap alone did not fix that issue (#1911).

      Source: https://github.com/morluto/rea/issues/1847#issuecomment-6111650325 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @N0zoM1z0 tried on GitHub (Worked)

      After the #1921 fix, reran the real CLI and a fresh stdio MCP session against the unchanged files with the original 1,024-MiB worker heap; workers finished semantic analysis, the CLI peak was 1,002,668,032 bytes under a 3-GiB scope, and both sources retained 20,000 semantic nodes.

      Source: https://github.com/morluto/rea/issues/1847#issuecomment-6112314668 (opens external site)

      Did this work for you?

    Add your answer or comment