rea/docs
xeropresence 66c21572de
fix(bun): report the real runtime and enforce worker memory budgets on Windows (#1730)
* fix(bun): report the real runtime and enforce worker memory budgets on Windows

Under Bun, REA recorded Node/V8 identity it did not observe and its JavaScript helper processes ran without a memory bound, because Bun ignores the V8 heap flags REA passes. Source-map trace Evidence claimed runtime node-v8 with Bun's synthetic V8 heap limit (the decoder then rejected that limit, so trace_web_source_location always failed), analysis resource failures reported heap limits Bun does not enforce, the HAR decoder claimed a fixed 192 MiB heap, and doctor reported Bun's Node.js compatibility version as the Node version.

Identify the runtime once from process.versions. Source-map reports record id bun with the Bun and Node.js compatibility versions and a null v8_heap_limit_bytes; the decoder checks the heap budget only for V8 reports and rejects a report from a runtime other than the launching one. The analysis worker reports a null heap limit under Bun, HAR limitations and failures omit heap sizes under Bun, and the doctor node check reports Bun and passes when its Node.js compatibility version is supported.

On Windows under Bun, each helper's owned Job Object now carries a commit limit of its heap budget plus a measured 512 MiB Bun runtime reserve (704 MiB for the codec and HAR decoder, 1536 MiB for the default analyzer). The native addon accepts an optional page-aligned job memory limit on process_spawn, verifies it by readback, associates a private completion port before the child is created, and reports a sticky memoryLimitReached and peak job commit on each poll; inspect reports jobMemoryLimit. A requested limit with an artifact lacking the control refuses the launch, and non-Windows launchers refuse a limit.

Reaching the limit is classified by the job notification rather than Bun's exit status: the analyzer fails the current source with a memory resource failure reporting worker_process_memory_limit_bytes, the codec returns a memory resource failure, and the HAR decoder returns its memory failure with process_memory_limit_bytes. Bun source-map Evidence records process_memory_limit_bytes, verified against the launcher. Node.js launches and outputs are unchanged.

* fix(windows): drain memory notifications after observing exit

---------

Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-10-11 19:20:00 +08:00
..
.vitepress docs: remove retired architecture and migration artifacts 2026-10-10 05:41:45 +08:00
assets docs: keep license sections text-only 2026-10-10 00:09:46 +08:00
releases chore(main): release rea-agents 6.4.0 (#1399) 2026-10-11 11:57:29 +08:00
adb-device-analysis.md fix(adb): retain rollback ownership and cancelled acquisition facts 2026-10-11 00:28:39 +08:00
android-analysis.md fix(mobile): bound framework conventions to path segments (#1506) 2026-10-10 21:42:03 +08:00
apktool-resource-analysis.md fix(apktool): run Windows batch launchers through cmd.exe (#1777) 2026-10-11 17:16:48 +08:00
apple-application-analysis.md fix(mobile): bound framework conventions to path segments (#1506) 2026-10-10 21:42:03 +08:00
architecture.mermaid refactor: use canonical implementations and types directly 2026-10-09 23:35:19 +08:00
binary-diagnostics.md fix(native): raise default PE resource entry budget to 16384 (#1703) 2026-10-11 19:01:33 +08:00
browser-observation.md fix(browser): retain effective source-map response urls 2026-10-11 15:35:43 +08:00
browser-scenario-contract.md fix(browser): seed storage by browser partition 2026-10-11 10:17:53 +08:00
cli.md fix(reference)!: preserve exclusion rule provenance 2026-10-11 04:15:26 +08:00
electron-observation.md fix(electron): support packaged app.asar pages and rewritten unpacked companions (#1400) 2026-10-10 23:01:54 +08:00
error-contract.schema.json feat(evm): inspect offline bytecode interfaces through EVMole (#1051) 2026-10-08 15:32:05 +08:00
evm-bytecode.md fix(build): make catalogs and packaged skills generated outputs (#1086) 2026-10-08 22:43:51 +08:00
firmware-analysis.md fix(providers): retain worker cleanup owners through shutdown 2026-10-11 00:03:21 +08:00
ghidra-dos.md fix(ghidra): reject address truncation before reads and edits 2026-10-09 03:53:28 +08:00
ghidra-mips.md fix(ghidra): admit carved MIPS ELF with incomplete section tables (#1629) 2026-10-11 04:33:05 +08:00
ghidra-nativeaot.md feat(ghidra): inspect NativeAOT PE metadata read-only 2026-10-11 10:31:49 +08:00
ghidra-provider.md feat(ghidra): inspect NativeAOT PE metadata read-only 2026-10-11 10:31:49 +08:00
ida-provider.md fix(ida): wait out a transient busy worker health in headless sessions (#1778) 2026-10-11 17:25:27 +08:00
index.md docs: publish VitePress documentation on GitHub Pages 2026-10-07 16:58:04 +08:00
installation.md fix(bun): report the real runtime and enforce worker memory budgets on Windows (#1730) 2026-10-11 19:20:00 +08:00
javascript-application-graph.md docs(contracts)!: explain canonical URL and skill metadata ownership 2026-10-10 02:49:46 +08:00
javascript-application-workflows.md docs: correct stale logging, Ghidra host, and example path statements (#1420) 2026-10-10 21:29:31 +08:00
javascript-artifact-reconstruction.md fix(bun): report the real runtime and enforce worker memory budgets on Windows (#1730) 2026-10-11 19:20:00 +08:00
javascript-recovery.md feat(javascript): recover code-split bundles from multiple inputs (#1686) 2026-10-11 18:39:49 +08:00
javascript-runtime-observation.md fix(inspector): bound retained metadata and preserve cancellation 2026-10-09 05:15:23 +08:00
javascript-runtime-reconciliation.md fix(tools)!: simplify direct invocation and harden boundary contracts (#555) 2026-10-05 20:16:44 +08:00
jeb-analysis.md feat(jeb): add JEB engine provider over its MCP interface (#1536) 2026-10-10 23:03:27 +08:00
managed-code-analysis.md fix(managed): distinguish .NET Standard targets from runtimes 2026-10-11 15:32:22 +08:00
mcp-contracts.md feat(evidence): discover retained records without full payloads (#1682) 2026-10-11 11:18:26 +08:00
mcp-prompts.md feat(mcp): select views of retained analysis results (#1180) 2026-10-09 12:45:48 +08:00
migration-6.2.md docs: correct MCP error and capture import guidance 2026-10-10 05:41:52 +08:00
native-investigation.md feat(ghidra): admit set_address_name and set_addresses_names (#1635) 2026-10-11 04:35:38 +08:00
process-capture.md feat(process): bound a finalization interval before forced capture timeout 2026-10-11 09:55:43 +08:00
reconstruction-obligation-ledgers.md refactor: return complete analysis results inline 2026-09-29 08:07:24 +08:00
reconstruction-readiness.md fix(tools)!: simplify direct invocation and harden boundary contracts (#555) 2026-10-05 20:16:44 +08:00
recorded-crashes.md feat(native): inspect recorded crashes through pwntools and pwndbg (#1054) 2026-10-08 16:50:31 +08:00
releasing.md fix(release): avoid duplicated contributor thanks 2026-10-11 11:49:49 +08:00
roadmap.md docs: remove retired architecture and migration artifacts 2026-10-10 05:41:45 +08:00
testing.md fix(bun): report the real runtime and enforce worker memory budgets on Windows (#1730) 2026-10-11 19:20:00 +08:00
tool-design.md docs: prune repeated contributor and tool design instructions 2026-10-10 05:28:13 +08:00
user-visible-errors.csv fix(setup): recognize supported Nobara hosts 2026-10-10 02:49:46 +08:00
web-network-captures.md fix(bun): report the real runtime and enforce worker memory budgets on Windows (#1730) 2026-10-11 19:20:00 +08:00
web-runtime.md fix(browser): treat module-import initiator positions as script positions 2026-10-08 16:44:25 +00:00
web-source-location.md fix(bun): report the real runtime and enforce worker memory budgets on Windows (#1730) 2026-10-11 19:20:00 +08:00
website-module-trace.md feat(browser): trace captured website module imports (#879) 2026-10-07 14:59:52 +08:00
website-script-export.md fix(files): reject nonregular capture and JSON inputs 2026-10-10 01:49:54 +08:00
windows-ghidra-p0.md feat(ghidra): inspect NativeAOT PE metadata read-only 2026-10-11 10:31:49 +08:00