[GH-ISSUE #1548] bug(verification): native value adapter checks discard Node heap budgets #522

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

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

The shared environment used by verifyNativeValueE2e for its compiled CLI and stdio MCP child processes discards caller-selected NODE_OPTIONS. A constrained verification invocation therefore applies its heap setting to the parent, while those Node children use their defaults.

Independent consumer-boundary reproduction uses the production helper's existing entrypoint seam and an actual Node child which records process.env.NODE_OPTIONS and v8.getHeapStatistics().heap_size_limit, then exits before native inspection. With the caller setting --max-old-space-size=384:

  • current main child sees NODE_OPTIONS = null and a 4,496,293,888-byte heap limit;
  • forwarding the selected variable makes the child see the exact flag string and a 603,979,776-byte heap limit.

This is a real subprocess environment check, not a real-provider workflow. It proves the dropped setting. Two separate full Ghidra verification attempts under the 2,304 MiB family budget stopped at 2,416,283,648 and 2,417,963,008 bytes; their largest allocation stage is not yet attributed, so the lost heap setting is not claimed to explain all of that memory.

Expected: preserve explicitly supplied Node runtime options for both adapter children; leave the variable absent when the caller omitted it. The fix should forward this selected setting through the owning helper, without capturing or persisting the entire ambient environment.

Related to bounded-resource verification and native review under #1065.

Originally created by @N0zoM1z0 on GitHub (Oct 10, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/1548 The shared environment used by `verifyNativeValueE2e` for its compiled CLI and stdio MCP child processes discards caller-selected `NODE_OPTIONS`. A constrained verification invocation therefore applies its heap setting to the parent, while those Node children use their defaults. Independent consumer-boundary reproduction uses the production helper's existing `entrypoint` seam and an actual Node child which records `process.env.NODE_OPTIONS` and `v8.getHeapStatistics().heap_size_limit`, then exits before native inspection. With the caller setting `--max-old-space-size=384`: - current main child sees `NODE_OPTIONS = null` and a 4,496,293,888-byte heap limit; - forwarding the selected variable makes the child see the exact flag string and a 603,979,776-byte heap limit. This is a real subprocess environment check, not a real-provider workflow. It proves the dropped setting. Two separate full Ghidra verification attempts under the 2,304 MiB family budget stopped at 2,416,283,648 and 2,417,963,008 bytes; their largest allocation stage is not yet attributed, so the lost heap setting is not claimed to explain all of that memory. Expected: preserve explicitly supplied Node runtime options for both adapter children; leave the variable absent when the caller omitted it. The fix should forward this selected setting through the owning helper, without capturing or persisting the entire ambient environment. Related to bounded-resource verification and native review under #1065.
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#522
No description provided.