openclaw/scripts/mantis
NIO bde17f99e9
fix(mantis): bound upload error response bodies (#109044)
* fix(mantis): bound upload error response bodies

Replace unbounded response.text() on non-ok upload error paths with
readBoundedResponseText (64 KiB cap). Only swallow the size-exceeded
diagnostic; propagate signal aborts and other failures so timeouts
during body reading are not masked as generic upload failures.

- Import shared readBoundedResponseText from scripts/lib/bounded-response.mjs
- Add MANTIS_UPLOAD_ERROR_BODY_MAX_BYTES constant (64 KiB)
- Catch only size-exceeded errors; re-throw timeouts and stream errors
- Add test: oversized body bounded at 64 KiB
- Add test: signal abort during body read propagates correctly
- Add test: small error body within bound reads normally

* fix(mantis): contextualize bounded upload failures

Co-authored-by: 胡根深 0668000903 <hu.genshen@xydigit.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-18 22:00:15 +01:00
..
build-telegram-desktop-proof-evidence.d.mts fix(ci): catch script declaration drift before merge (#110248) 2026-07-18 02:54:26 +01:00
build-telegram-desktop-proof-evidence.mjs refactor(deadcode): enforce repository hard zero (#108641) 2026-07-15 22:40:00 -07:00
build-telegram-evidence.d.mts chore(tooling): typecheck root test/** with a dedicated tsgo lane (#104475) 2026-07-11 06:15:41 -07:00
build-telegram-evidence.mjs refactor(qa): migrate Telegram scenarios into QA Lab (#108430) 2026-07-15 12:55:00 -07:00
build-web-ui-chat-evidence.d.mts chore(tooling): typecheck root test/** with a dedicated tsgo lane (#104475) 2026-07-11 06:15:41 -07:00
build-web-ui-chat-evidence.mjs
publish-pr-evidence.d.mts fix(mantis): bound R2 evidence uploads (#108616) 2026-07-15 22:57:36 -07:00
publish-pr-evidence.mjs fix(mantis): bound upload error response bodies (#109044) 2026-07-18 22:00:15 +01:00