Files
openclaw/src
juyaohuidt d71ab44a0c fix(sandbox): bound sandbox seed bootstrap file reads (#110017)
* fix(sandbox): bound sandbox seed bootstrap file reads

ensureSandboxWorkspace copies each seed bootstrap file (AGENTS.md / SOUL.md /
TOOLS.md / ...) into a fresh sandbox workspace with an unbounded
readFileSync after the root-boundary open. The seed path comes from user
config (seedFrom), so a misconfigured or oversized seed file forced an
unbounded allocation at sandbox-creation time. Use
readFileDescriptorBoundedSync with a 2 MiB limit (matching the workspace
bootstrap file limit) and skip the oversized seed file with a warning instead
of reading it all.

* fix(sandbox): bound workspace seed reads

Co-authored-by: 琚耀辉0668001366 <ju.yaohui@xydigit.com>

* test(agents): cover async bootstrap read retries

* test(agents): align bootstrap read mocks with main

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-18 22:53:31 +01:00
..