Files
openclaw/extensions/browser
wanyongstar 9c3e4ce431 fix(browser): bound batch action nesting depth in act request normalization (#120274)
* fix(browser): bound batch action nesting depth in act request normalization

normalizeActRequest recursed over batch nesting with no depth bound, so a
~1MB POST /act body with tens of thousands of nested batch levels parsed
fine and then crashed normalization with RangeError: Maximum call stack
size exceeded before the ACT_MAX_BATCH_ACTIONS count check could run,
surfacing an internal stack overflow as the 400 validation message.

Thread the existing ACT_MAX_BATCH_DEPTH limit through normalizeBatchAction/
normalizeActRequest and reject deeper nesting up front with a clear
'batch nesting exceeds maximum depth of 5' error, matching the bound the
Playwright executor already enforces at dispatch time.

* fix(browser): match batch depth executor boundary

Accept the six wrapper levels supported by the Playwright executor and reject the seventh during request normalization.

Co-authored-by: 万拥 0668000723 <wan.yong@xydigit.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-08 12:52:59 -07:00
..