Repository navigation
fix(tlon): bound Urbit auth response body drain to prevent OOM - #109697
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 17, 2026, 3:48 AM ET / 07:48 UTC. Summary PR surface: Source +23, Tests +77. Total +100 across 2 files. Reproducibility: yes. —source inspection gives a high-confidence reproduction path: the previous successful-login path awaited response.text() on an attacker-controlled streamed body, allowing unbounded accumulation. The submitted proof verifies the corrected production path, although it intentionally does not force a process-level OOM. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Refresh the branch onto current main, confirm the focused authentication tests and bounded live stream behavior under supported Node and Bun paths, then merge the plugin-owned drain hardening. Do we have a high-confidence way to reproduce the issue? Yes—source inspection gives a high-confidence reproduction path: the previous successful-login path awaited response.text() on an attacker-controlled streamed body, allowing unbounded accumulation. The submitted proof verifies the corrected production path, although it intentionally does not force a process-level OOM. Is this the best way to solve the issue? Yes—the plugin-owned bounded streaming drain is narrower and more maintainable than adding global fetch policy or configuration, and the corrected version removes the only unbounded fallback. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 73d04395defe. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +23, Tests +77. Total +100 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (4 earlier review cycles)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Replace the unbounded response.text() body drain (discarded after reading to finalize set-cookie headers) with a streaming reader capped at 64 KiB. When no body stream is available, fall back to text() for compatibility. A hostile or misconfigured Urbit endpoint could previously stream an arbitrarily large body into memory during login. Co-Authored-By: Claude <[email protected]>
Remove the unbounded response.text() body-less fallback path. When no body stream is available, there is nothing to drain — cookie headers are already finalised. Move reader.cancel() into a finally block so the reader is released even when read() throws. Co-Authored-By: Claude <[email protected]>
3508f99 to
6478c5d
Compare
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(tlon): bound Urbit auth response body drain to prevent OOM This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
|
Merged via squash.
|
…law#109697) * fix(tlon): bound Urbit auth response body drain to prevent OOM Replace the unbounded response.text() body drain (discarded after reading to finalize set-cookie headers) with a streaming reader capped at 64 KiB. When no body stream is available, fall back to text() for compatibility. A hostile or misconfigured Urbit endpoint could previously stream an arbitrarily large body into memory during login. Co-Authored-By: Claude <[email protected]> * fix(tlon): add curly braces to drain loop for lint compliance * fix(tlon): remove unbounded text() fallback, cancel reader in finally Remove the unbounded response.text() body-less fallback path. When no body stream is available, there is nothing to drain — cookie headers are already finalised. Move reader.cancel() into a finally block so the reader is released even when read() throws. Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: Claude <[email protected]>
* fix(wiki): wiki_get and wiki compile miss nested source files (#96022)
* fix(wiki): discover nested source files in QUERY_DIRS
Two functions in the memory-wiki extension — listWikiMarkdownFiles
(wiki_get runtime lookup) and collectMarkdownFiles (wiki compile
indexing) — used fs.readdir without { recursive: true }. Nested
source files (e.g. sources/audi/car.md) were silently invisible to
both wiki_get and wiki compile.
Add recursive: true and adjust path construction using
entry.parentPath so nested .md files in all QUERY_DIRS are
discovered while preserving the index.md exclusion and backward
compatibility with flat vaults.
* fix(wiki): remove entry.path fallback, only parentPath is typed on Dirent
* fix(wiki): add recursive scan to status.ts and add nested-file regression tests
* fix(wiki): use toSorted instead of sort to pass lint
* style(memory-wiki): format recursive discovery fix
---------
Co-authored-by: Vincent Koc <[email protected]>
(cherry picked from commit 63ee4cd2405c932f338de269147ed0510910c0e8)
* fix(tools-manager): require clean exit in commandExists (#96361)
Summary:
- The PR changes the agent tools manager to treat spawned-but-nonzero fd/rg probes as missing and adds regression tests for non-zero and zero spawn status.
- PR surface: Source +3, Tests +27. Total +30 across 2 files.
- Reproducibility: yes. Current main ignores non-zero `spawnSync.status`, and a live Node probe confirms a spawned child can exit non-zero while leaving `error` unset.
Automerge notes:
- No ClawSweeper repair was needed after automerge opt-in.
Validation:
- ClawSweeper review passed for head 377d560effe8fbeaf464bcdf8f5892eab925475a.
- Required merge gates passed before the squash merge.
Prepared head SHA: 377d560effe8fbeaf464bcdf8f5892eab925475a
Review: https://github.com/openclaw/openclaw/pull/96361#issuecomment-4788071605
Co-authored-by: liyuanbin <[email protected]>
Co-authored-by: Claude <[email protected]>
Approved-by: takhoffman
(cherry picked from commit 380f2749becc001c4f949a922d9a0fd427e2b539)
* fix(lmstudio): bound model load success response body to prevent OOM (#96042)
The /api/v1/models/load success path read the response with an unbounded
await response.json(), so a misbehaving or compromised LM Studio server
could stream an arbitrarily large JSON body that is fully buffered into
memory before any size check. Read it through the shared byte-capped
readProviderJsonResponse helper instead (16 MiB provider-JSON cap, cancels
the stream on overflow, wraps malformed JSON), matching the discovery path
and the already-bounded error body.
Migrate the model fetch/load test mocks to real Response objects (the
bounded readers need a real body stream) and add a regression test that
streams an oversized success body and asserts a bounded error plus stream
cancellation.
Label: security
(cherry picked from commit 7844b0844568f8f71040008ef596bc715064657b)
* fix(parallel): bound successful web-search JSON response reads (#96035)
* fix(parallel): bound successful web-search JSON response reads
The Parallel web_search provider parsed its /v1/search success body with an
unbounded await res.json(). The body comes from an external web-search
upstream, so a hostile or malfunctioning endpoint streaming an unbounded JSON
payload could force the runtime to buffer the whole response before parsing,
creating memory pressure or a hang on the provider path.
Read the success body through the shared readProviderJsonResponse helper with a
16 MiB cap (matching the provider JSON cap from #95218); on overflow the stream
is cancelled and a bounded error is thrown. The error-body path was already
bounded (readResponseTextLimited, 8 KiB). Symmetric follow-up to the
#95103/#95108 response-limit campaign.
* docs(parallel): drop upstream PR ref from response-cap comment
Replace the PR-specific '#95218' annotation with a neutral description of
the shared provider JSON cap so the comment stays accurate independent of
upstream PR numbering.
(cherry picked from commit 6163b1977b4d8703c41fadc99f4ab9bc36a38772)
* fix(exa): bound untrusted search JSON response reads (#96038)
Exa search success responses were read via an unbounded `await
response.json()`, so a misbehaving or hostile endpoint could stream an
arbitrarily large body into memory before parsing. Read the success
body through the shared bounded reader (16 MiB cap, the same limit other
bundled providers use) and cancel the stream on overflow. This mirrors
the error-body bound already in place and the #95103/#95108 response
-limit campaign on the success-JSON side.
AI-assisted.
(cherry picked from commit 605aede38c10787e74303aec1eef696af6c1927d)
* fix(ollama): bound model-discovery JSON response reads (#96027)
* fix(ollama): bound model-discovery JSON response reads
The /api/tags and /api/show discovery reads in extensions/ollama/src/provider-models.ts
parsed their HTTP responses with an unbounded await response.json(). Ollama base URLs
are user-supplied and can point at remote/cloud endpoints, so a hostile or buggy server
(or one reachable via SSRF) could stream an unbounded or never-ending JSON body and drive
model discovery into OOM.
Route both reads through the shared @openclaw/media-core byte-bounded reader
(readResponseWithLimit, re-exported via openclaw/plugin-sdk/response-limit-runtime) under
a single 16 MiB cap before JSON.parse, cancelling the stream on overflow. Overflow throws a
bounded error that the existing fail-soft handlers swallow, so a capped endpoint degrades
gracefully: /api/tags returns { reachable: false, models: [] } and /api/show returns {}.
Symmetric counterpart to the #95103/#95108 response-limit campaign.
AI-assisted.
* fix(ollama): reuse shared bounded JSON reader for model discovery
Replace the local readOllamaDiscoveryJson helper with the shared
readProviderJsonResponse (from openclaw/plugin-sdk/provider-http), which
already enforces the 16 MiB cap, cancels the stream on overflow, and wraps
malformed JSON with the caller label. The /api/tags and /api/show discovery
reads now go through it directly while keeping the existing fail-soft
handlers ({ reachable: false, models: [] } and {}).
Add a focused regression test: when a discovery stream exceeds the JSON byte
cap, fetchOllamaModels returns { reachable: false, models: [] },
queryOllamaModelShowInfo returns {}, and the bounded reader cancels the body
mid-flight so less than the full advertised stream is read.
(cherry picked from commit d1c2934d0d17fe2c52912b05c320654ca9fb0242)
* fix(providers): bound self-hosted provider discovery JSON reads (#95244)
* fix(providers): bound self-hosted discovery JSON reads
discoverLlamaCppRuntimeContextTokens and discoverOpenAICompatibleLocalModels
parsed their HTTP responses via an unbounded await response.json(). Self-hosted
provider base URLs are user-supplied and untrusted (an endpoint reachable via
SSRF could stream an unbounded JSON body), so a hostile or buggy endpoint could
drive the setup wizard into OOM.
Route both reads through the shared byte-bounded reader (readResponseWithLimit
from @openclaw/media-core) under a single 4 MiB cap before JSON.parse, mirroring
the bound-stream hardening landed for Anthropic error bodies. Overflow cancels
the stream and is swallowed by the existing discovery error handling, so a
capped endpoint degrades gracefully (returns [] / skips the runtime context
probe) instead of buffering the whole body.
* tune self-hosted discovery cap
Signed-off-by: sallyom <[email protected]>
---------
Signed-off-by: sallyom <[email protected]>
Co-authored-by: sallyom <[email protected]>
(cherry picked from commit dad5ce64d4f1ba35e8f4cff73ddd3d704d4c5898)
* fix(providers): bound successful response reads
Backport of 0a14444924e34e031133c997b00d30573353c5a0; retains the target's existing provider-reader SDK baseline.
* fix(outbound): prevent partial-send recovery replay
(cherry picked from commit 210ea659f77f3b600043952a5686e640311846e3)
* fix(qwen): bound video success response (#96604)
(cherry picked from commit cc124d2921b88d241a567f17368bd55049d84f83)
* fix(byteplus): bound video-generation success response (#96606)
(cherry picked from commit 7b5ee739eb22b53022a5674a3bf674dc0e6c33d5)
* fix(voyage): bound embedding-batch status, error, and non-OK responses (#96608)
The batch status read (fetchVoyageBatchStatus) parsed its response with an
unbounded await res.json(), and the batch error-file read (readVoyageBatchError)
buffered the whole body via await res.text(). On top of that, the non-OK
(4xx/5xx) diagnostic body was still read unbounded: assertVoyageResponseOk did
await res.text() before throwing, and the non-OK output-file branch in
runVoyageEmbeddingBatches did the same. Voyage base URLs are user-supplied and
reachable via SSRF, so a misbehaving or hostile endpoint could stream an
unbounded body into memory on any of these paths before parsing.
Route the status JSON through the shared readProviderJsonResponse, the error
file through readResponseWithLimit, and now the non-OK diagnostic body through
readResponseWithLimit as well, all under a single 16 MiB cap, cancelling the
stream on overflow before decode/parse. assertVoyageResponseOk preserves its
original "${context}: ${status} ${text}" diagnostic shape for under-cap bodies
and throws a bounded "(error body exceeds <N> bytes)" on overflow; the non-OK
output-file branch now reuses it instead of a duplicate unbounded read. The
existing error-file fail-soft handling (formatUnavailableBatchError) is
preserved, so a capped endpoint degrades gracefully. The submit path already
bounds its body via postJsonWithRetry/maxResponseBytes and is left untouched.
Symmetric counterpart to the #96027/#96038 response-limit campaign.
(cherry picked from commit d3620da3e031b2b52414165d09315d78a13c6836)
* fix(github-copilot): bound usage response (#96607)
The Copilot usage read in extensions/github-copilot/usage.ts parsed its
HTTP response with an unbounded await res.json(). A hostile or buggy
api.github.com proxy (the proxy endpoint is derived from a user-supplied
token) could stream an unbounded JSON body and drive the usage snapshot
into OOM.
Route the read through the shared readProviderJsonResponse (from
openclaw/plugin-sdk/provider-http), which enforces the 16 MiB byte cap,
cancels the stream on overflow, and wraps malformed JSON with the caller
label. Same no-helper-import-to-bounded-reader shape as the #96027 /
#96038 response-limit work.
Add a focused regression test: when the usage stream exceeds the JSON
byte cap, fetchCopilotUsage rejects with a bounded-overflow error and the
reader cancels the body mid-flight instead of buffering the full
advertised stream. Existing parse/HTTP-error cases keep passing.
(cherry picked from commit 646e54ae3578b48259912d288d0cecfcb132a035)
* fix(openrouter): bound video catalog JSON reads (#96505)
(cherry picked from commit 5715b5500067e4af80ca40da10775de4b3648cea)
* fix(speech): bound TTS/STT voice-list and transcription JSON response reads (#96496)
Route success JSON reads through readProviderJsonResponse (16 MiB cap) in
azure-speech, elevenlabs, microsoft, minimax/tts, xai/stt, and
openrouter/media-understanding to prevent OOM from oversized or hostile
endpoint responses. Mirrors the response-limit campaign already applied to
other provider paths.
AI-assisted.
Co-authored-by: Cursor <[email protected]>
(cherry picked from commit 66e2fcc6f83eb6aef394401a19342d7af19b1478)
* fix(github-copilot): bound model discovery and embeddings JSON response (#96499)
* fix(github-copilot): bound model discovery and embeddings JSON response reads
The GitHub Copilot embeddings plugin already bounds its error response
bodies via readResponseTextLimited, but the success JSON reads for both
model discovery and the embeddings call used unbounded response.json().
Route both through readProviderJsonResponse (16 MiB cap).
Update isCopilotSetupError to recognise the new error label prefix so
auto-selection still falls through on malformed discovery responses.
Update tests to use proper Response objects and the new error messages.
AI-assisted.
Co-authored-by: Cursor <[email protected]>
* fix(github-copilot): use memory embedding response cap
Signed-off-by: sallyom <[email protected]>
---------
Signed-off-by: sallyom <[email protected]>
Co-authored-by: Cursor <[email protected]>
Co-authored-by: sallyom <[email protected]>
(cherry picked from commit 1aa7cafc35a1aaaf1cd2f9b905d6cca2603ba994)
* fix(image-gen): bound image generation provider JSON response reads (#96495)
* fix(image-gen): bound image generation provider JSON response reads
Route success JSON reads through readProviderJsonResponse (16 MiB cap)
in openrouter, google, fal, minimax, openai, and vydra image generation
providers to prevent OOM from oversized or hostile endpoint responses.
Mirrors the response-limit campaign already applied to other provider paths.
AI-assisted.
Co-authored-by: Cursor <[email protected]>
* fix(image-gen): size bounded JSON caps for inline image payloads
Signed-off-by: sallyom <[email protected]>
---------
Signed-off-by: sallyom <[email protected]>
Co-authored-by: Cursor <[email protected]>
Co-authored-by: sallyom <[email protected]>
(cherry picked from commit 527f8f0cbba1b5653dc990fd368c004f03803cf8)
* fix(google-media): bound JSON response reads (#96920)
* fix(google-media): bound JSON response reads
* test(google): relax media response cap assertion
---------
Co-authored-by: Vincent Koc <[email protected]>
(cherry picked from commit a7bfc06f4597ee946cbc066cb41750a7e8f59c52)
* fix(google): bound TTS success JSON response reads (#96984)
(cherry picked from commit 5ccfc97b319ee627bd84710ceb4cd1f81b0088f0)
* fix(clickclack): bound REST success JSON response reads (#96970)
* fix(clickclack): bound REST success JSON response reads
* test(clickclack): harden response cap proof
---------
Co-authored-by: Vincent Koc <[email protected]>
(cherry picked from commit f4fa10c2c5acae26156868fe50f01d52a464f4b1)
* Fix/discord bound probe getme json reads (#97278)
* fix(discord): bound probe getMe JSON response reads
* test(discord): add oversized probe getMe JSON regression
* test(discord): add loopback proof for bounded probe getMe reads
* fix(scripts): satisfy oxlint in discord probe proof script
* test(discord): keep probe proof in focused coverage
---------
Co-authored-by: NIO <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 7ba9212665a728993550a65ef5d8fdd235d4a160)
* Fix/zalo bound api json response reads (#97277)
* fix(zalo): bound Bot API JSON response reads via readProviderJsonResponse
* test(zalo): keep API proof in focused coverage
---------
Co-authored-by: NIO <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 38ddcef78f072d647136a1e28bf7383b0e203a37)
* fix(embedding): bound OpenAI-compatible embedding response reads (#96868)
* fix(embedding): bound OpenAI-compatible embedding response reads
* test(embedding): avoid loop-condition lint in stream proof
(cherry picked from commit f1e4980a9705dd0649946876c9a40b15d2809d24)
* fix(mattermost): bound successful REST JSON/text response reads (#96033)
* fix(mattermost): bound successful REST JSON/text response reads
The Mattermost REST client already bounds error bodies
(readResponseTextLimited) and streams guarded responses without buffering,
but the success path still called `await res.json()` / `await res.text()`,
reading the whole body into memory before parsing. A self-hosted or
compromised Mattermost server can return an arbitrarily large (or
never-terminating, content-length-less) JSON/text body and force the plugin
to buffer it unbounded.
Read successful JSON through the shared readProviderJsonResponse (16 MiB cap,
cancels the stream and throws a bounded error on overflow, same as the
provider HTTP path) and cap non-JSON success bodies with readResponseTextLimited.
uploadMattermostFile's file-info JSON is bounded the same way.
Symmetric follow-up to the #95103 / #95108 response-limit campaign.
AI-assisted.
* fix(mattermost): bound probe success JSON reads
* fix(mattermost): reject oversized success text bodies
(cherry picked from commit 9241b9701d9c14f4d3b3a176071d95e9c21de4ac)
* fix(minimax): bound video control response reads (#96889)
* fix(minimax): bound image/video success response reads
MiniMax image generation and video generation (task submit + status poll)
read their success responses through unbounded `await response.json()`, so
a misbehaving or hostile endpoint could stream an arbitrarily large body
into memory before parsing and exhaust the process. Read those success
bodies through the shared bounded reader (16 MiB cap, the same limit other
bundled providers and the sibling MiniMax web-search provider already use)
and cancel the stream on overflow. The error-body path is already bounded
via assertOkOrThrowHttpError; this closes the matching success-JSON gap.
MiniMax TTS is already bounded and is left unchanged.
AI-assisted.
* fix(minimax): bound video metadata response reads
* fix(minimax): leave image response sizing to image hardening
* fix(minimax): bound image/video success response reads
MiniMax image generation and video generation (task submit + status poll)
read their success responses through unbounded `await response.json()`, so
a misbehaving or hostile endpoint could stream an arbitrarily large body
into memory before parsing and exhaust the process. Read those success
bodies through the shared bounded reader (16 MiB cap, the same limit other
bundled providers and the sibling MiniMax web-search provider already use)
and cancel the stream on overflow. The error-body path is already bounded
via assertOkOrThrowHttpError; this closes the matching success-JSON gap.
MiniMax TTS is already bounded and is left unchanged.
AI-assisted.
* fix(minimax): bound video metadata response reads
(cherry picked from commit 25e184aeab644b3f1acbef7f00fdd9121fe6d1a4)
* fix(speech): bound TTS response reads (#96874)
(cherry picked from commit 2f851ecfe9df4486878305798775f7e8f04fdf92)
* fix(deepinfra): bound video generation JSON response reads (#97486)
(cherry picked from commit 0d59280131c003e547264c029d6ec4590ae6e108)
* fix(openrouter): bound generation-cost JSON response reads (#97490)
(cherry picked from commit c0883a531de936174cfec903d63e6746730fccd9)
* fix(openrouter): bound video response reads
Route OpenRouter video submit and poll success JSON through the shared bounded provider JSON reader, preserving malformed-response mapping and SSRF request policy coverage.
(cherry picked from commit 48f34b1d4df7755a19894f1e763011bb8bd328ea)
* fix(signal): bound GitHub release info JSON response with readProviderJsonResponse (#97536)
Replace bare `await response.json()` in `installSignalCliFromRelease` with
`readProviderJsonResponse` (16 MiB cap, stream cancel on overflow). The
external GitHub Releases endpoint can include a large `body` changelog field;
the error path was already guarded but the success path was unbounded.
The existing inner catch continues to convert overflow errors into the
graceful `{ ok: false, error: "Failed to parse signal-cli release info." }` path.
Adds a regression test verifying the stream is cancelled before all chunks are
read on an oversized 20 MiB streaming response.
Co-authored-by: NIO <[email protected]>
Co-authored-by: Cursor <[email protected]>
(cherry picked from commit 51064bda4def47da9864c63eb0bed4e2aa614afb)
* fix(openai): bound embedding-batch and realtime session JSON response reads (#97533)
(cherry picked from commit 4c477ee6321eb628db8231ad370c7b9159d467f0)
* fix(telegram): bound getChat Bot API response reads (#97274)
* fix(telegram): bound getChat Bot API response reads
* fix(telegram): repair getChat bound-read type and proof script lint
---------
Co-authored-by: NIO <[email protected]>
(cherry picked from commit b948c86b2a834701619fb738f5bf3d0aa954f106)
* fix(google): bound embedding-batch JSON response reads (#97535)
* fix(google): bound embedding-batch JSON response reads
* fix(google): repair embedding-batch test types and lint
---------
Co-authored-by: NIO <[email protected]>
(cherry picked from commit 91297bf420822bbfd8883af157fe9d1c77774dde)
* fix(ollama): bound cloud-auth 401 JSON response reads
(cherry picked from commit a82cff8892cd7c581585254308ef7c65f6e4f9c3)
* fix(xai): bound OAuth response reads to prevent OOM (#97615)
Replace unbounded response.text() in readResponseBody and
response.json() in the device-code polling loop with
readResponseWithLimit (16 MiB cap).
(cherry picked from commit d5aca1d6d2d78e821d06d6900ae3b005e2af8942)
* fix: bound APNs relay response body so an oversized relay reply can't exhaust gateway memory
Reviewed and accepted after live preflight: mergeable clean, checks passing, no unresolved review threads.
(cherry picked from commit 89b5a879090ae693153e50586d191654a0f60113)
* fix(runway): bound video create/poll response reads
Reviewed and accepted after live preflight: mergeable clean, checks passing, no unresolved review threads.
(cherry picked from commit 63b089383adf50be175322414166f57212cc34cc)
* fix(openai): bound video create-submit response reads
Reviewed and accepted after live preflight: mergeable clean, checks passing, no unresolved review threads.
(cherry picked from commit f0e2f7b4f5ae61cf3ec08521e1c46f462ee3e6a0)
* fix(together, pixverse): bound video response reads
Reviewed and accepted after live preflight: mergeable clean, checks passing, no unresolved review threads.
(cherry picked from commit ca1bc5875913f865388f365d9906e8f8e0a5d659)
* fix(fal): bound music/video generation response reads
Reviewed and accepted after live preflight: mergeable clean, checks passing, no unresolved review threads.
(cherry picked from commit ce1217a49ca619d6e4513ac803e4b2c71e892dba)
* fix(vydra): bound control response reads
Reviewed and accepted after live preflight: mergeable clean, checks passing, no unresolved review threads.
(cherry picked from commit 74a9beb83f515c805b41d12bdeddf33b7128490f)
* fix(video-generation): bound DashScope JSON response reads
(cherry picked from commit 238398e33147338865ac957f32d8b7dc32674830)
* fix(comfy): bound JSON response reads via readProviderJsonResponse
(cherry picked from commit bf66b4e1ea7ef85e4677af2e838933efba3442e4)
* fix(github-copilot): bound login JSON response reads
(cherry picked from commit 748bea34341678cda7e664a01ee821d7a301a181)
* fix(xai): bound video response body reads
(cherry picked from commit 46e119074ef0f953b82401d08dd76e62031cf78d)
* fix(provider-usage): bound usage response body reads
(cherry picked from commit db2786bde1055fcc27b0be1243c662fbd797efbc)
* fix(agents): bound WHAM usage probe JSON response reads
(cherry picked from commit 0ce10d779302bb12f3f287bb519299a11142fb5b)
* fix(discord): bound PluralKit and voice-message JSON reads
(cherry picked from commit 597a0ba43ca3bbc35b33216abefc37449ea279ec)
* fix(nextcloud-talk): bound bot preflight error reads (#97811)
Co-authored-by: Pick-cat <[email protected]>
(cherry picked from commit 09167523bf4092aba45ec7b28f4d7b1ea1d23c1b)
* fix(pdf): guard native provider requests (#97872)
* fix(pdf): guard native provider requests
* fix(pdf): preserve configured origin trust
* fix(pdf): preserve resolver compatibility
(cherry picked from commit b7b2e1f77eb4d2d58982db065642d70db50d4c8c)
* fix(cli): bound docs search API response reads with committed test (#98188)
(cherry picked from commit f284ce3b4df717dde2bbec22f840906c31bcb1f0)
* fix(moonshot): bound video description JSON response reads (#96502)
* fix(moonshot): bound video description JSON response reads
The Moonshot video description endpoint used an unbounded await res.json()
to parse the media understanding response. Route through
readProviderJsonResponse (16 MiB cap) to match the bound already in
place for other media understanding providers (xai, openrouter).
AI-assisted.
Co-authored-by: Cursor <[email protected]>
* test(moonshot): add bounds and malformed-JSON coverage for video description
---------
Co-authored-by: Cursor <[email protected]>
(cherry picked from commit 765d05c2e4a891873b782c969957c6eddc163405)
* fix(minimax): bound OAuth JSON response via shared provider reader (#96322)
Use readProviderJsonResponse (shared 16 MiB default cap) instead of
unbounded response.json() for MiniMax OAuth authorization code endpoint.
Signed-off-by: lsr911 <[email protected]>
Co-authored-by: Claude <[email protected]>
(cherry picked from commit 4a96c066154281f2a87bb399722e3e5183ec6c71)
* fix(openai): bound embedding batch file downloads (#98554)
* fix(openai): bound embedding batch file downloads
* fix(openai): bound batch output records
---------
Co-authored-by: Vincent Koc <[email protected]>
(cherry picked from commit ce4a259485f25e238929ba1cc0c17ffbdd393554)
* fix(memory): preserve UTF-8 when qmd output splits across pipe chunks (#107263)
* fix(memory): preserve UTF-8 across fragmented qmd output chunks
* fix(memory): decode qmd streams at UTF-8 boundary
Co-authored-by: wahaha1223 <[email protected]>
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 7f36f490528b1466dfad05a491bd253e9cbf03f5)
* fix(synology-chat): bound outbound NAS response bodies to prevent Gateway OOM (#105089)
* fix(synology-chat): settle user_list overflow without hanging
Cap reads at 1 MiB with Buffer concat. On overflow, finish the promise
before destroy() — bare destroy often skips end/error and hung the test.
* fix(synology-chat): share bounded user-list reader
Co-authored-by: zw-xysk <[email protected]>
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 30c257f6b45ea9002a70652fb0170ba33e3eb068)
* fix(extensions): prevent corrupted UTF-8 in api.exec output (#108365)
* fix(extensions): preserve split UTF-8 in api.exec
* test(agents): cover incomplete exec UTF-8 at EOF
Co-authored-by: zhang-guiping <[email protected]>
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 3b51889c3bbf6801e0d523e73f2437186831ff7c)
* fix(sessions): stop leaking file path as prompt content on read failure (#108546)
* fix(sessions): stop leaking file path as prompt content on read failure
When readFileSync fails for a valid file path, resolvePromptInput returns
the raw path string as prompt content instead of undefined. This injects
filesystem paths into the LLM context. The existing console.error warning
still fires; the caller already handles undefined returns correctly.
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
* test: cover unreadable prompt paths
* test: use tracked resource loader temp dirs
---------
Co-authored-by: Claude Sonnet 4.6 <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit c9248192926ac164fe4a91af3fe72555a7512c67)
* fix(clickclack): bound websocket handshake waits at 30s (#106485)
* fix(clickclack): bound websocket handshake waits at 30s
* test(clickclack): prove WebSocket handshake deadline
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 3eec404aab29e9dd78d2e69c9b4e2985f6a326fe)
* fix(memory-core): write MEMORY.md atomically during short-term promotion (#108397)
* fix(memory-core): write MEMORY.md atomically during short-term promotion
applyShortTermPromotions rewrote MEMORY.md with a single non-atomic
fs.writeFile, which truncates the file before streaming the new content.
An OS write failure part way through (for example EFBIG on a size-limited
or full volume) left MEMORY.md truncated to the bytes written before the
failure, permanently dropping user long-term memory. The dreaming cron
path invokes this writer automatically, and the recall store is only
updated after the write, so the promotion stays eligible and the next
run reads the already-truncated file.
Route the write through replaceFileAtomic (temp file, fsync, atomic
rename), the same durable-write helper the sibling DREAMS.md writer in
this extension already uses. On failure the temp file is discarded and
the existing MEMORY.md is left untouched; on success the content and the
existing file mode are preserved.
* fix(memory-core): harden atomic promotion durability
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 0317d7e628010d6e51a2a09f9d7e9af677216981)
* fix(agents): bound base64 image input before decode in tool-image sanitizer (#105086)
* fix(agents): bound base64 image input before decode in tool-image sanitizer
* fix(agents): lower input-size cap to 10MB for OOM headroom
* fix(agents): align tool-image input-cap comment with 10 MiB ceiling
* fix(agents): typecheck-safe access in tool-image input-cap test
* test(agents): exercise real tool image input cap
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit b85531c62f7565856219f652bf9fe6cfa1940b1f)
* fix(qqbot): bound tail log reads to actual bytes returned by fs.readSync (#108955)
* fix(qqbot): bound tail log reads to actual bytes returned by fs.readSync
* fix(qqbot): satisfy knip deadcode check for testing export
Add __testing re-export and test-api.ts barrel so knip traces the testing export through a recognized entry point.
* fix(qqbot): restore testing export alongside __testing re-export
Both exports are needed: testing for proof scripts, __testing for knip tracing.
* fix(qqbot): remove unused __testing re-export from log-helpers
test-api.ts already imports testing and re-exports as __testing. The extra re-export in log-helpers.ts was unused by production code.
* fix(qqbot): retry short log tail reads
* test(qqbot): keep short-read seam private
Co-authored-by: RileyJJY <[email protected]>
* test(qqbot): exercise short reads through log export
Co-authored-by: RileyJJY <[email protected]>
---------
Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: RileyJJY <[email protected]>
(cherry picked from commit 3f89aae98da9229ea7cf9bfc6215aaeae01a8796)
* fix(proxy-capture): guard body-less arrayBuffer reads against oversized responses (#101268)
* fix(proxy-capture): guard body-less arrayBuffer reads against oversized responses
* fix(proxy-capture): exercise body-less fallback in bounded read tests
New tests use mock clones with body: null plus arrayBuffer spies to
prove the content-length precheck guards the !body path. A real
Response clone exposes body.getReader in Node 24, so the prior test
only exercised the streaming branch and would stay green even if
the precheck were deleted.
* chore: retrigger CI
* fix(proxy-capture): reject non-safe content-length before arrayBuffer (#101268)
ClawSweeper P2: the body-less fallback used Number(content-length), so a
huge digit-only Content-Length value could overflow to Infinity, bypass the
Number.isFinite guard, and still call arrayBuffer() — leaving an OOM path in
the hardening PR.
Add declaredContentLengthExceedsCap, which accepts only plain digit strings,
treats any value longer than Number.MAX_SAFE_INTEGER as oversized, and
compares safe-integer parsed values against the cap. Non-numeric or malformed
values fall through to the post-read length check.
Adds a regression test for a 100-digit Content-Length that would previously
have bypassed the guard.
* fix(proxy-capture): normalize zero-padded Content-Length before digit-count guard
* fix(proxy-capture): fail closed without response streams
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 7cde0ac8c0a821e3641a3418bddad41dda6c4c7b)
* fix(lmstudio): cancel model discovery response body on non-ok (#109718)
* fix(lmstudio): cancel model discovery response body on non-ok
Wire the direct-fetch release hook to cancel unread bodies so failed
model discovery releases the TCP connection instead of leaving it open.
Co-authored-by: Cursor <[email protected]>
* refactor(lmstudio): unify response cleanup
Co-authored-by: Zeng Wen <[email protected]>
---------
Co-authored-by: Cursor <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: Zeng Wen <[email protected]>
(cherry picked from commit 1573c78f5b849d1fedf12a78aa029c069c44ffca)
* fix(msteams): cancel non-OK consent upload response body before throwing (#109701)
* fix(msteams): cancel non-OK consent upload response body before throwing
* fix(msteams): release all consent upload responses
Cancel unread response bodies after successful uploads as well as failed uploads, and fold the lifecycle assertions into the existing status-path tests.
Co-authored-by: Monkey-wusky <[email protected]>
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 9b238a792788474134513f7864c86dd6fd4dcd4f)
* fix(discord): honor caller abortSignal during 429 retry backoff (#109913)
* fix(discord): honor caller abortSignal during 429 retry backoff
* test(discord): prove 429 backoff abort through a real loopback server
* test(discord): make retry abort proof deterministic
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 40acbb05c9d7cf6783bb4cf4a99f332ef14cde0a)
* fix(auto-reply): treat U+2028/U+2029 as paragraph boundaries when chunking (#103518)
* fix(auto-reply): treat U+2028/U+2029 as paragraph boundaries when chunking
chunkByParagraph normalized only CR/CRLF before blank-line paragraph detection,
so model output using Unicode LINE/PARAGRAPH SEPARATOR (U+2028/U+2029) instead
of a blank line was not split at those boundaries and fell back to length-based
splitting. Normalize U+2028/U+2029 to \n alongside CR/CRLF, matching how the
Control UI markdown renderer handles them.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
* fix(auto-reply): normalize U+2028 as line break, U+2029 as blank-line paragraph boundary
Distinguish U+2028 (LINE SEPARATOR) from U+2029 (PARAGRAPH SEPARATOR):
U+2029 becomes \n\n (blank line — paragraph boundary) while U+2028
becomes \n (single newline — intra-paragraph line break).
The original fix mapped both to \n, so standalone U+2029 still
produced single-line text without a blank-line gap — paragraph
detection failed. The combined U+2028
input accidentally
produced the right blank-line sequence, which masked the bug.
Adds individual tests for lone U+2029 (splits at paragraph boundary),
lone U+2028 (stays within paragraph), and consecutive U+2028
(combined blank line — matches \n\n behavior).
* test(auto-reply): simplify Unicode separator cases
---------
Co-authored-by: Claude Opus 4.8 <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 3a4e2ef65f418d3fdc79cebcbbd698a7aa8b9344)
* fix(synology-chat): bound user_list fetches with a wall-clock deadline (#109111)
* fix(synology-chat): bound user_list fetches with a wall-clock deadline
* refactor(synology-chat): keep deadline internal
* style(synology-chat): format deadline proof
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit f7cc0ef8380efb0d5781239458f5f5fa6688ea41)
* fix(security): bound plugin manifest reads in audit deep scan (#101773)
(cherry picked from commit aa0c92186b67c55d6f43ec6611ff689b66b65fd6)
* fix(heartbeat): bound HEARTBEAT.md file read size (#101775)
* fix(heartbeat): bound HEARTBEAT.md file read size
* fix(heartbeat): follow symlinked HEARTBEAT.md while bounding reads
* fix(heartbeat): warn operators when oversized HEARTBEAT.md is skipped
(cherry picked from commit 993c975f5738dbcd17882db0fafcb9d1e403607e)
* fix(plugins): bound marketplace manifest file reads (#101774)
* fix(plugins): bound marketplace manifest file reads
* fix(plugins): distinguish oversized marketplace manifest from other read failures
* fix(plugins): follow symlinked marketplace manifests while bounding reads
* test(plugins): cover oversized symlinked marketplace manifest target
(cherry picked from commit 35754a63ccafc41122085bc9467fd3e1dbc8d4f3)
* fix(plugins): bound plugin manifest metadata file reads (#110036)
* fix(plugins): bound plugin manifest metadata file reads
* fix(plugins): use correct Error type check in oversized manifest catch
readRegularFileSync throws a plain Error (not RangeError) when the file
exceeds maxBytes. Change the catch-block type check from RangeError to
Error to properly detect oversized plugin manifests and emit the
subsystem warning.
* test(plugins): exercise valid oversized manifests
Co-authored-by: 陈宪彪0668000387 <[email protected]>
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 2e21d53c84ec88433dac587bb97f2796e63b20ca)
* fix(gateway): bound BOOT.md file read size (#101776)
* fix(gateway): bound BOOT.md file read size
* fix(gateway): treat non-regular BOOT.md as empty/missing and add coverage
* fix(gateway): preserve non-size BOOT.md failures while bounding oversized reads
* fix(gateway): preserve readable BOOT.md symlink behavior
* fix(gateway): treat dangling BOOT.md symlink as missing
* fix(gateway): report oversized BOOT files
* fix(gateway): preserve missing BOOT race behavior
Co-authored-by: 陈宪彪0668000387 <[email protected]>
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit e22c2dfaaa890d1d689f894a46c6cc0a4339d301)
* fix(agents): bound IDENTITY.md reads to prevent OOM (#101447)
* fix(agents): bound IDENTITY.md reads to prevent OOM
* fix(agents): reuse shared workspace bootstrap file size limit for IDENTITY.md
* chore: retrigger CI after cancelled gate run
* chore: retrigger CI after runner tooling flake
* chore: retrigger CI after main typecheck fix and runner brew flake
* fix(identity): bound explicit --identity-file imports through shared loader
* fix(agents): unexport parseIdentityMarkdown to satisfy production deadcode scan
* chore: retrigger CI after stuck previous run
* chore: retrigger CI after stuck checks-node-compact-large-4 run
* chore: retrigger CI after stuck checks-node-compact-large-4 and flaky small-9
* fix(agents): report oversized identity file size to the user
When `--identity-file` points at a file exceeding the size limit, the
`no identity data found` error is misleading. Re-throw the fs-safe
`exceeds` error with a human-readable message so the CLI surfaces the
actual cause.
* fix(agents): update test assertion for oversized identity diagnostic
* fix(agents): attach caught error as cause in oversized identity diagnostic
* fix(agents): preserve symlinked identity files
* fix(agents): classify identity size errors exactly
Co-authored-by: 陈宪彪0668000387 <[email protected]>
* fix(agents): preserve supported identity avatars
Co-authored-by: 陈宪彪0668000387 <[email protected]>
* fix(agents): keep identity limit private
Co-authored-by: 陈宪彪0668000387 <[email protected]>
---------
Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 80f6acc8def890c5f54c919d93dc5d79cadf09ea)
* fix(config): bound state-directory .env file reads with size limit (#109487)
* fix(config): bound state-directory .env file reads with size limit
Replace unbounded fs.readFileSync with readRegularFileSync capped at
1 MiB (MAX_STATE_DIR_DOTENV_BYTES) so an oversized .env file is
rejected before loading the entire file into memory.
Resolve symlinks via fs.realpathSync before the bounded read so
symlinked .env files keep working — matching the marketplace.ts
pattern for bounded manifest reads.
* fix(config): add diagnostic when oversized state .env is skipped
Log a warning when the state-directory .env file exceeds the 1 MiB
limit so operators know a configured file was skipped — matching the
pattern from #108200 (plugin catalog bounded read diagnostic).
* fix(config): bound global runtime dotenv file reads with size limit
Replace unbounded fs.readFileSync in readDotEnvFile with readRegularFileSync
capped at 1 MiB so CLI/Gateway startup dotenv loading also gets the bounded
read protection — not just the state-dir service-env path.
This addresses the P1 review finding that the original fix only capped the
helper-level reader while the shared readDotEnvFile used by
loadGlobalRuntimeDotEnvFiles was still unbounded.
(cherry picked from commit 0c221d2b4f7e1f310feb497c9c24cddfae48c181)
* fix(nostr): profile imports no longer crash on invalid fields (#110684)
* fix(nostr): profile imports no longer crash on invalid fields
* test(nostr): define invalid profile import policy
* test(nostr): cover invalid imported URL types
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 9fe92cf5ce918799ffa771e272faaae551b29b26)
* fix(tlon): preserve shutdown when body cancellation fails (#111106)
* fix(tlon): observe shutdown body cancellation failures
* test(tlon): streamline shutdown cleanup proof
* test(tlon): narrow shutdown fixtures
---------
Co-authored-by: ZengWen-DT <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 5bb969f7de6cb07747e746e90d6444bb935dcb8e)
* fix(qqbot): cancel non-OK direct-upload response body before throwing (#110008)
(cherry picked from commit 17643f385085d68d104d216eae1a08785da4b3ec)
* fix(tui): prevent memory growth during repeated selector searches (#109451)
* fix(tui): bound searchable select regex cache
* fix(tui): discard stale selector regexes
Co-authored-by: wahaha1223 <[email protected]>
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 80c16ecc8097793166e4c8418b6090fc09e3a90a)
* fix(tlon): bound Urbit auth response body drain to prevent OOM (#109697)
* fix(tlon): bound Urbit auth response body drain to prevent OOM
Replace the unbounded response.text() body drain (discarded after reading
to finalize set-cookie headers) with a streaming reader capped at 64 KiB.
When no body stream is available, fall back to text() for compatibility.
A hostile or misconfigured Urbit endpoint could previously stream an
arbitrarily large body into memory during login.
Co-Authored-By: Claude <[email protected]>
* fix(tlon): add curly braces to drain loop for lint compliance
* fix(tlon): remove unbounded text() fallback, cancel reader in finally
Remove the unbounded response.text() body-less fallback path. When no body
stream is available, there is nothing to drain — cookie headers are already
finalised. Move reader.cancel() into a finally block so the reader is
released even when read() throws.
Co-Authored-By: Claude <[email protected]>
---------
Co-authored-by: Claude <[email protected]>
(cherry picked from commit 4e9b1f4775b0724cc7f28cfe6db79baec8f7fa62)
* fix(tlon): cancel failed auth response bodies (#112059)
(cherry picked from commit e024aa38b9f706f910cc8235a9e8e7aaea9c2336)
* fix(memory-core): guard invalid timestamps in dreaming rankings (#110537)
(cherry picked from commit 1e4e588142fdb1bea797363c38621f293406d0aa)
* fix(security): restore filesystem API after bounded manifest read
Source: 95d632e644b3c826ca74b76494857f9e9a0fd4e8
Target adaptation: this release line does not yet have the skill-file audit path, so only restore the fs/promises import still required by its other deep audit helpers after d5b0218b7ec removed it.
* test(proxy-capture): adapt bounded capture coverage to release test harness
Source: 7cde0ac8c0a821e3641a3418bddad41dda6c4c7b
Target adaptation: import vi explicitly and model Buffer payload persistence so the null-body assertion exercises the shipped store contract.
* style: format backported provider response bounds
* fix: correct release-line backport adaptations
Retain the existing Synology client export and remove source-context imports/constants that have no caller on the .34 release line.
* fix(retry): support abortable operation backoff
Target adaptation for source 40acbb05c9d7cf6783bb4cf4a99f332ef14cde0a: the .34 retry utility predates the per-operation sleeper hook required by Discord's abortable 429 backoff.
* fix(clickclack): cap inbound WebSocket frames
Target adaptation for source 3eec404aab29e9dd78d2e69c9b4e2985f6a326fe: retain the source's 16 MiB ws cap alongside the handshake deadline; this release line predates its shared inbound JSON limit constant.
* fix(openai): bound blank streamed batch records
Target hardening for source ce4a259485f25e238929ba1cc0c17ffbdd393554: count blank JSONL records so newline-only responses cannot bypass the existing output record cap.
* fix(openai): complete blank batch record backport
* fix(browser): run mutation guard before JSON parsing (#104677)
* fix(browser): run mutation guard before JSON parsing
* test(browser): cover auth in mutation guard ordering
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 85a8f4ba8d9fe0fe9eec40173da28d4f59d51d01)
(cherry picked from commit 36ef64341bf8355c3832e56b8fb7ece3b4a0c26f)
* fix(tts-local-cli): handle stdout/stderr stream errors in speech provider (#102347)
* fix(tts-local-cli): handle stdout/stderr stream errors in speech provider
CLI TTS speech provider spawns a child process to generate audio and
registers stdout/stderr data listeners but omits stream error handlers.
stdout carries synthesized audio data. A pipe error mid-generation must
reject the promise so the caller does not silently receive truncated
audio when the child later exits zero. stderr carries diagnostic logs
only — errors there are benign and should not crash the provider.
Apply separate strategies matching vincentkoc's requirement:
- stdout (audio): error → reject(Promise) — surface the failure
- stderr (diagnostic): error → ignore — does not affect audio output
* fix lint: remove unused signal param from mock kill()
* fix(tts-local-cli): contain child stream failures
Co-authored-by: 赵旺0668001248 <[email protected]>
* chore(tts-local-cli): keep release notes in PR body
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 9fa913740d41bb6fdb546514202d52bfd7806e79)
(cherry picked from commit 66099c79c0e1d82b424c63af60d3060c08787db1)
* fix(tts-local-cli): preserve file output on stream errors
Co-authored-by: 赵旺0668001248 <[email protected]>
(cherry picked from commit 45d15aabf9e9b2ab89d33aeca3c650de984cd4d9)
(cherry picked from commit 0d836bb58024cae18b7fc46df40806950e27e63b)
* fix(azure-speech): add timeout to voices list request (#102984)
* fix(azure-speech): add timeout to voices list request
* test(azure-speech): simplify voice timeout proof
* test(azure-speech): mark voice keys as placeholders
---------
Co-authored-by: chengzhichao-xydt <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 1ed04910e2de695905431a64cb55f383252b9f8c)
(cherry picked from commit fa440cf51c95ad2ef4608f38c846e4c425f0ceee)
* fix(minimax): add timeouts to OAuth HTTP requests (#102862)
* fix(minimax): add timeouts to OAuth HTTP requests
* fix(minimax): remove duplicate OAuth abort signals
* refactor(minimax): keep OAuth timeout internal
* test(minimax): make OAuth timeout proof deterministic
---------
Co-authored-by: llagy009 <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 8f8aad9ae69253ecf91526a48f97dcb8d2d43acf)
(cherry picked from commit 3cc03752fd349668c418580389afcc0caaababca)
* fix(google-meet): handle stdout/stderr stream errors in local audio bridge (#101596)
* fix(google-meet): handle stdout/stderr stream errors in local audio bridge
* test(google-meet): prove command bridge stream errors
(cherry picked from commit 5fd5bf2aee1b803e95a8c985b90f117ced7a21e9)
(cherry picked from commit e61d2f9d37044d463e22691ee87bc5cb39bdfbf0)
* fix(google-meet): bound Calendar event lookups (#102157)
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 28bbbe4f603c17ca770399f044bd8f25c2c8685f)
(cherry picked from commit fe03932992ab65ca9d7d0f598aa31c0c8679e49c)
* fix(matrix): handle stdout/stderr stream errors in dependency commands (#101597)
* fix(matrix): handle stdout/stderr stream errors in dependency commands
* fix(matrix): type stream-error test process kill
* fix(matrix): harden dependency stream errors
* test(matrix): fix dependency stream test typings
(cherry picked from commit 35d5ea069ae90d9377df69dbdb5c636c05f58ecd)
(cherry picked from commit 141a2e76420dd593b2f3efdd7c9cb8aac2a89ef5)
* fix(matrix): handle event decryption errors during sync (#94416)
Co-authored-by: mushuiyu886 <[email protected]>
(cherry picked from commit 4200745a983534896ef30133af6e23aa00ae59b8)
(cherry picked from commit 663134e30c8b265f89ffd692f6f10f795c2b3735)
* fix(zalouser): clear probe timeout after auth resolves (#101649)
(cherry picked from commit ca8f6e1efd62ea98d4fa496a3e3663ed2d6eba52)
(cherry picked from commit b66d2abccd5ffe0a75f04bf8e51cdb99d89c4456)
* fix(msteams): lowercase content type so attachment classification is case-insensitive (#102431)
* fix(msteams): lowercase content type so attachment classification is case-insensitive
normalizeContentType only trimmed its input. MIME types are case-insensitive
(RFC 2045), and MS Teams relay payloads (SharePoint, OneDrive, Bot Framework CDN)
routinely emit mixed-case values such as "Image/PNG" or
"Application/Vnd.Microsoft.Teams.File.Download.Info". Every downstream
comparison in the attachments module assumes a lowercased value
(startsWith("image/"), === "application/vnd.microsoft.teams.file.download.info",
startsWith("text/html")), so a mixed-case attachment was silently misclassified:
images became documents, HTML bodies were skipped, and file-download candidates
were not resolved.
Lowercase in normalizeContentType so all six call sites match. The sibling
inferPlaceholder in the same file already lowercases via
normalizeLowercaseStringOrEmpty, so this aligns the two paths.
Co-Authored-By: Claude <[email protected]>
* fix(msteams): route HTML text extraction through normalizeContentType
extractTextFromHtmlAttachments guarded its loop with an exact
`attachment.contentType !== "text/html"` check, which is the same
case-sensitivity gap the rest of the PR closes via normalizeContentType.
A mixed-case "TEXT/HTML" attachment (common from Teams relays; MIME types are
case-insensitive per RFC 2045) was skipped, so a message whose only body text
lived in such an HTML attachment entered the agent path with empty text.
Route the guard through normalizeContentType so mixed-case HTML attachments
reach the body extractor. Export the function and add regression coverage for
mixed-case / whitespace-padded / object-content / non-HTML cases.
Co-Authored-By: Claude <[email protected]>
* fix(msteams): preserve MIME parameter case
---------
Co-authored-by: Claude <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit e6a2136c3a0b12f124fb3327518244a79d872818)
(cherry picked from commit bdaf9d91415815ec870236bd1261f5ad44759e10)
* fix(msteams): bound team group lookup cache (#102814)
Co-authored-by: sunlit-deng <[email protected]>
(cherry picked from commit f6b99012435391f18b701330c7b6f40248e6b61c)
(cherry picked from commit 1af683390d2502256eea35d157ea62015d8d2f28)
* fix(tlon): cap SSE payload JSON.parse at 16 MiB to prevent OOM (#101274)
* fix(tlon): cap SSE payload JSON.parse at 16 MiB to prevent OOM
* fix(tlon): cap SSE stream buffer and JSON.parse at 16 MiB to prevent OOM
* chore(tlon): add production-style SSE bounded proof script (#101274)
Adds extensions/tlon/proof-sse-bounded.mts which drives the real
UrbitSSEClient.processStream and processEvent against Node Readable streams
(not unit-test mocks) to demonstrate:
- normal SSE events are still delivered through the stream path;
- an unterminated stream that would grow beyond 16 MiB is rejected before
unbounded accumulation;
- a single SSE payload above 16 MiB is rejected before JSON.parse.
The script passes on this branch and fails 2/3 assertions when run against
origin/main's sse-client.ts, providing the before/after proof ClawSweeper
requested.
* chore(tlon): fix oxlint catch type in proof script (#101274)
* fix(tlon): reject oversized SSE chunk before buffer concatenation
Move the stream byte-limit check before buffer += chunkStr so a
single oversized chunk never lands in the pending buffer. The old
guard ran after concatenation, which still allowed the memory spike
this hardening is meant to prevent.
Add a single-oversized-chunk test to prove the guard fires before
the chunk is concatenated into the pending buffer.
Co-Authored-By: Claude Opus 4.7 <[email protected]>
* chore(tlon): remove PR-specific SSE bounded proof script
The proof script was review-only validation for #101274. Durable behavior
coverage lives in sse-client.test.ts (stream buffer bounding, oversized
chunk rejection before concatenation, 16 MiB boundary, normal delivery,
1000 small events). Per ClawSweeper P3 finding, drop the one-off script
from the plugin tree.
* fix(tlon): bound SSE event buffering safely
* test(tlon): avoid unsafe optional chaining
* fix(tlon): count split Unicode at SSE limit
* fix(tlon): parse split SSE delimiters at limit
---------
Co-authored-by: Claude Opus 4.7 <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 1710ccad2977f39d36e8c6a9aaa908bcd0ad785b)
(cherry picked from commit 938ba5d7fa21057b5be935b8a38a69b4ea0882cf)
* fix(inworld): add timeout to voices list request (#102965)
* fix(inworld): add timeout to voices list request
* refactor(inworld): reuse guarded timeout test helpers
* test(inworld): rely on harness timeout
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit a11449211a2c18b32c14173ff35f1eae7f714e03)
(cherry picked from commit 42e1ab25c9dab2151440d0afb2d985a365086e70)
* fix(voice-call): add timeout to guardedJsonApiRequest (#102884)
* fix(voice-call): add timeout to guardedJsonApiRequest
* fix(voice-call): bound provider JSON requests
---------
Co-authored-by: chengzhichao-xydt <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 5b916cb319f84cd3cda88f87bf0f2fff5231c7ba)
(cherry picked from commit 2de4b2d0708c46e451ca90bdcfeda329f9a3a318)
* fix(file-transfer): reject oversized inline file writes before node dispatch (#104556)
* fix(file-transfer): cap inline file write payloads
* fix(file-transfer): validate inline base64 before decoding
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit fdf581281746ecc28be6c58d608569313a9e31aa)
(cherry picked from commit 7fc1041e2737d43c38d18a7313678db774333e2d)
* fix(imessage): apply authoritative projection in anchorless recovery (#104218)
* fix(imessage): apply authoritative projection in anchorless recovery
Rebuild on latest main with imessage-only changes: authoritative history
projection (optional destination_caller_id), whole-path inbound proof tests,
and no unrelated restart.ts diff.
Co-authored-by: Cursor <[email protected]>
* fix(imessage): restore recovery cursor API and format tests
Co-authored-by: Cursor <[email protected]>
* test(imessage): add monitor whole-path L3 proof for #104136 recovery
Exercise issue synthetic payloads through monitorIMessageProvider for
authoritative remote reply routing and from-me suppression before dispatch.
Co-authored-by: Cursor <[email protected]>
* fix(imessage): clear stale destination_caller_id when history omits it
Exact-GUID history is authoritative for destination_caller_id. When the
history row omits that outgoing-only field, clear any stale notification
value instead of inheriting it into the recovered inbound projection.
Co-authored-by: Cursor <[email protected]>
---------
Co-authored-by: sm <[email protected]>
Co-authored-by: Cursor <[email protected]>
(cherry picked from commit 6ef3e87583eda04fc3c790b68af86e021e68733c)
(cherry picked from commit 184deb936f55f8137d0842067893f4fe7d57e18d)
* fix(imessage): narrow recovered projection before use (#106022)
(cherry picked from commit 8a2da4b1bf1555fe0bfaf705eb57300c673c81be)
(cherry picked from commit fa55df678fffa3cd716eb29e71be2cd516c54b96)
* fix(twitch): strip internal tool-trace banners from outbound text (#103109)
* fix(twitch): strip internal tool-trace banners from outbound text
Co-authored-by: Masato Hoshino <[email protected]>
* fix(twitch): strip internal tool-trace banners from outbound text
---------
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: Masato Hoshino <[email protected]>
(cherry picked from commit 90b68536c441a301ea8be08d53beb3486b50566b)
(cherry picked from commit afbd2caff18677c15564b51cce0a6b57d0ae6804)
* fix(synology-chat): strip internal tool-trace banners from outbound text (#102925)
* fix(synology-chat): strip internal tool-trace banners from outbound text
* fix(synology-chat): satisfy eslint curly rule
* fix(synology-chat): add sanitizeText to outbound type contract
* fix(synology-chat): use canonical outbound sanitizer type
---------
Co-authored-by: Pick-cat <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 7eb163d90582895150403fa320635a3ef85c81bd)
(cherry picked from commit bdc4440e2f48147a6dca84ae5a4a275a8aa7cdbe)
* fix(tlon): strip internal tool-trace banners from outbound text (#103450)
Route assistant-visible Tlon output through the shared sanitizer and prove the rendered Urbit poke payload for DMs, groups, and media captions.
Co-authored-by: masatohoshino <[email protected]>
(cherry picked from commit 1d205424494de6633857796ff56a3cc09f41552b)
(cherry picked from commit b8b5e9d72b30aadedfd591067d8918ccde6ef951)
* fix(nextcloud-talk): strip internal tool-trace banners from outbound text (#101712)
* fix(nextcloud-talk): strip internal tool-trace banners from outbound text
* fix(nextcloud-talk): sanitize inbound replies
Co-authored-by: liyuanbin <[email protected]>
* test(nextcloud-talk): prove low-level send text preservation
* test(nextcloud-talk): focus inbound sanitizer coverage
* fix(nextcloud-talk): report stripped replies as non-visible
* docs(changelog): note Nextcloud Talk reply sanitization
* chore: keep PR changelog-neutral
---------
Co-authored-by: Pick-cat <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: liyuanbin <[email protected]>
(cherry picked from commit 8a93d288e2f57db13251e7d3f059e72a411b228a)
(cherry picked from commit 3f1774653aefa225eea770b0491008a83e6a142c)
* fix(microsoft-foundry): reject malformed endpoints (#104796)
(cherry picked from commit f5a50db5691b828d830bd33b6ac11a0a99f50c05)
(cherry picked from commit 1bc1ec21b49ee1a1350ad5688fd2420f270acfb9)
* fix(google): bound realtime browser token requests (#106034)
* fix(google): bound realtime browser token requests
* fix(google): satisfy realtime timeout checks
* test(google): use placeholder browser key
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit d33254b72efc4a46824f218c9a43ff830804c96f)
(cherry picked from commit ac8e45955d567dd78e5cf0e02599cb58e008da07)
* fix(github-copilot): bound device flow requests (#103255)
* fix(github-copilot): bound device flow requests
* docs(changelog): note Copilot login timeout
* fix(github-copilot): bound device flow requests
* fix(github-copilot): bound device flow requests
* fix(github-copilot): bound device flow requests
---------
Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 1e3dea75d5690e36f135c39eb4f792815b87c19d)
(cherry picked from commit faa4cf7321ce62b48a5f2c03f198e1691030acf0)
* fix(openai): add timeout to realtime client-secret requests (#102860)
* fix(openai): add timeout to realtime client-secret requests
* test(openai): prove realtime timeout through real guard
* test(openai): route realtime timeout proof through guard
* fix(openai): bound realtime client-secret requests
Co-authored-by: llagy009 <[email protected]>
* fix(openai): align realtime secret timeout
---------
Co-authored-by: llagy009 <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 1836275810cb9cb3f7487cf66a8f7c2f0b16d853)
(cherry picked from commit f2e18c4250592d8dcfc8a7bad17531fb83c3db63)
* fix(memory-core): guard supplement lookup in resolveMemoryReadFailureResult with try-catch (fixes #101809) (#101902)
* fix(memory-core): guard supplement lookup in resolveMemoryReadFailureResult with try-catch (fixes #101809)
* fix(memory-core): preserve primary read errors
---------
Co-authored-by: Vincent Koc <[email protected]>
(cherry picked from commit 1aee742d230e5e50f6f580e19655fa22b21eefee)
(cherry picked from commit 7427f3ef171139edb693dec56aec6141222d293d)
* fix(browser): guard act hooks on current tab URL (#104095)
* fix(browser): guard act hooks on current tab URL
* test(browser): align navigation policy hook mock
* test(browser): exercise real hook navigation guard
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 4bf4cacb37a9c45be03dac105d86352a0e9a0a8f)
(cherry picked from commit 72e4a8b21cee6cb848e50b6a211f1380bd293c6c)
* fix(google-meet): bound Google API requests (#102149)
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 51b4e78c339de48614f5fc578e1d4685c2ca9d8b)
(cherry picked from commit 2bc883a7a23812ca9a610ae6c75119b63100fcf7)
* fix(browser): reject non-page json new targets (#104129)
* fix(browser): reject non-page json new targets
* fix(browser): adopt only validated raw CDP targets
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 7027d2c227281d814266311bebab7581b899d6dc)
(cherry picked from commit 7dea1a3cd7ac5643ec9e5c32f19fc041c5a7fc55)
* fix(agents): skip wham probe when oauth access token is locally expired
(cherry picked from commit e975d49238083091b265748cd6ffb54dc8f022bd)
(cherry picked from commit f5b234db3fc58b4275f4e6b0e65393f3631da659)
* fix(media): accept matching repeated content lengths (#102939)
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 3f68e1b5e3a7a4a66660722ac8fd10c256a63b40)
(cherry picked from commit 7693544cccc64ac359597555185fdc8f530556d0)
* fix: 429 errors without rate-limit wording skip the same-model retry (#99097)
* fix: 429 errors without rate-limit wording skip the same-model retry
Aggregated providers such as OpenRouter provider pools surface transient
upstream throttles as a bare "429 <generic text>" with no RPM/TPM wording
and no Retry-After header. resolveShortWindowRateLimitRetry required one
of those hints, so these errors bypassed the same-model retry ladder and
failed the turn on the first attempt.
Treat a status-prefixed 429 as short-window once the long-window guard
(quota, usage, billing wording) has filtered its phrasings, and let the
existing backoff ladder pace the retry.
* test(agents): streamline bare 429 coverage
---------
Co-authored-by: Altay <[email protected]>
(cherry picked from commit 9330ad86ffdaae640ff778572028644afe29d92a)
(cherry picked from commit f6db641108cd139f211cabeb6834f57916a4f2bf)
* fix(sdk): add prototype-pollution guard to migration config merge (#103059) (#106116)
* fix(sdk): add prototype-pollution guard to migration config merge
mergeMigrationConfigValue and writeMigrationConfigPath had no
isBlockedObjectKey guard, allowing __proto__/constructor/prototype
keys from imported config files to trigger prototype pollution.
Add the same guard used by the sibling config-path writer
(setConfigValueAtPath/parseConfigPath) to reject blocked object
keys before they reach a bracket assignment.
Fixes #103059
* fix(sdk): harden migration config patches
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit b6330edbe4bfd08167a13ff0862a3fcb42ba79d3)
(cherry picked from commit 4fe0cf4ddb1686fe0e824536d281fb4295150468)
* fix(session): swallow onRecordError throw to avoid unhandled rejection (#106951)
* fix(session): swall…
* fix(tlon): bound Urbit auth response body drain to prevent OOM Replace the unbounded response.text() body drain (discarded after reading to finalize set-cookie headers) with a streaming reader capped at 64 KiB. When no body stream is available, fall back to text() for compatibility. A hostile or misconfigured Urbit endpoint could previously stream an arbitrarily large body into memory during login. Co-Authored-By: Claude <[email protected]> * fix(tlon): add curly braces to drain loop for lint compliance * fix(tlon): remove unbounded text() fallback, cancel reader in finally Remove the unbounded response.text() body-less fallback path. When no body stream is available, there is nothing to drain — cookie headers are already finalised. Move reader.cancel() into a finally block so the reader is released even when read() throws. Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: Claude <[email protected]> (cherry picked from commit 4e9b1f4)
* fix(plugins): terminate git clone args so git: specs cannot inject options (#102398) * fix(plugins): terminate git clone args so git: specs cannot inject options A git: install spec whose base ends in .git or is scp-form was passed to git clone as a bare positional. A spec beginning with a dash, such as git:--upload-pack=/path/pwn.git, was parsed by git as an option rather than a repository, reaching a command-execution primitive. The sibling git switch --detach -- <ref> in the same files was already hardened; the clone sites were missed. Add a -- option terminator before the URL at both clone call sites (installPluginFromGitSpec and installSkillFromSource) and reject a leading-dash URL in isGitUrl as defense in depth. * test(plugins): prove git option rejection boundary Co-authored-by: yetval <[email protected]> --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 9706aae10aeec17c831d89727089e0af2bf6ebe0) * fix(gateway): validate exact custom browser origins (#38290) Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit fa0349aa440b49219889cb9cc59519f8f9e7e461) * fix(gateway): bound sessions.usage all-agent session discovery concurrency (#102013) * fix(gateway): bound sessions.usage all-agent session discovery concurrency * refactor(gateway): centralize usage agent tasks --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 34248e101fd323bb996d9ab265d1c0147c15aa7b) * fix(gateway): parse image data URLs linearly (#102825) Co-authored-by: WangYan <[email protected]> (cherry picked from commit 79d3daa09b57a9db0a50e424fec22f3921a6c3c0) * fix: redact diagnostics config with schema hints (#102426) (cherry picked from commit 436ed5f3085ba57b7baebb697e4bd7479b872a00) * fix(plugins): bound hosted catalog feed reads on non-streaming responses (#101000) Co-authored-by: NIO <[email protected]> Co-authored-by: Cursor <[email protected]> (cherry picked from commit 8cf88bfa121fbb51acd89318e881af38283549ea) * fix(gateway): demote startup close transport races (#104625) * fix(gateway): demote startup close transport races * fix(gateway): remove stale startup close import (cherry picked from commit 78fca7b0c4f6e18c666e47531b7280f5b007f5d9) * fix(sessions): prevent corrupted Unicode in persisted tool details (#104540) * fix(sessions): prevent corrupted Unicode in persisted tool details * test(sessions): consolidate UTF-16 persistence coverage * test(sessions): build redaction fixture from placeholder --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 4a0086d08565e074316883fe778f71892f5b7c66) * fix(models): redact synthetic auth credentials from models status --json (#104734) The provider auth overview passed the caller's synthetic-auth object through to the JSON payload. Status hands it the full runtime shape, which also carries the raw credential, so structural typing let live API keys/tokens ship in a diagnostic surface (#104713). Re-project to the declared value/source fields at the overview boundary. Fixes #104713 (cherry picked from commit 4cfe0077ff0a3079d210338bdd296baaea69d2ff) * fix(gateway): keep channels stopped during shutdown and reload (#104811) * fix(gateway): stop retired health monitor restarts * style(gateway): format health monitor regression * fix(gateway): stop retired monitor account scans * refactor(gateway): coordinate health monitor handoff --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 9b057036e3df8bdf3142a05c1bcb9797ec35c406) * fix(gateway): reject disallowed browser Origin before accepting auth.mode=none on HTTP (#102834) (#102881) * fix(gateway): reject disallowed browser Origin before accepting auth.mode=none on HTTP (#102834) * refactor(gateway): scope HTTP Origin checks to no-auth * fix(gateway): preserve trusted-proxy scan boundary --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 232de2315b0b5d7cde6ad97bb39ac1e3b5fd73c1) * fix(hooks): bound HOOK.md reads during hook install validation (#101469) * fix(hooks): bound HOOK.md reads during hook install validation * fix(hooks): remove unused fs import after switching to bounded reader * test(hooks): cover symlinked install metadata --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 5d34ea774a79cd6718298d8fdc9bbaea97c3605b) * fix(discord): retry reply session init conflicts to prevent silent message loss (#103562) * fix(discord): retry session conflicts without duplicate inbound work Co-authored-by: 陈宪彪0668000387 <[email protected]> * refactor(discord): split session retry policy * refactor(discord): keep retry error private --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 7abc6665dc813db05eaf8dfc4b963978bc33cc27) * fix(gateway): streamed OpenAI-compatible requests fail with a spurious draining error (#113514) * fix(gateway): retain root-work admission for streamed HTTP runs Streaming requests to /v1/chat/completions and /v1/responses dispatch the agent run from a detached `void (async () => {...})()` that intentionally outlives the HTTP handler. The handler itself runs inside runWithGatewayHttpWorkAdmission, which releases its root-work admission as soon as it returns. Because the detached run inherits that same AsyncLocalStorage store, it ends up holding a *released* lease. isGatewaySubordinateWorkAdmissionClosed() returns `current.released` for an inherited store, so every subordinate session/lane admission the run subsequently requests is refused with GatewayDrainingError - on a gateway that is not draining at all. Symptoms: streamed turns fail partway with "Gateway is draining; new tasks are not accepted", surfacing to OpenAI-compatible clients as a generic error chunk. Non-streaming requests are unaffected, because they await the run inside the handler's still-live admission. Fix: retain the admission across the handler boundary with retainGatewayRootWorkAdmissionContinuation() - the helper that already exists for exactly this case ("Transfers an admitted request root to work that intentionally outlives its handler") - and release it in the existing finally block so drain accounting stays balanced. * test(gateway): cover streamed HTTP admission lifetime * test(gateway): satisfy deferred timer lint --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit f78d958aca248fd6593b1f7304dd04ba1f4b073d) * fix(gateway): terminate failed Responses streams (#113629) Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit a653741c5bc860403433a611aeafd730eead8d30) * fix(delivery): apply correct outbound recovery retry delays (#113700) Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 49f223e190fe7379af7d60b60833c8b8cba9406f) * fix: preserve distinct imported session messages (#113703) Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 97c57585a1001552eb61060e36cb150fc958fb5f) * fix: repair tool-call transcripts when plugins block results (#113697) * fix: preserve tool-call pairing when message hooks block results * test: satisfy tool-result guard boolean lint --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit de916a4fe3f648b560c7ffa3891fad16bf4f78a3) * fix: reject escaped newline shell words (#114134) (cherry picked from commit 95f56b84cbd9e205ed0d05aa561eacf19a81eaa3) * fix(release): carry extended-stable Docker channel tooling * fix(release): add shared release version classifier * fix(release): align version preparation with classifier * fix(google-meet): keep Meet sessions on the agent that joined them (#102331) * fix(google-meet): preserve routed agent across session reuse * chore: defer google meet release note to release closeout --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit f85d438164eb954aecdf05b9e1c0102cf05346bf) * fix(mattermost): truncate inbound preview on code-point boundary (#101630) Co-authored-by: NIO <[email protected]> Co-authored-by: Cursor <[email protected]> (cherry picked from commit f77c2aafa09598cf378effc5bca7830f82cc2727) * fix(agents): keep steering metadata truncation UTF-16 safe (#101736) * fix(agents): keep steering metadata truncation UTF-16 safe Replace raw string slicing with truncateUtf16Safe in promptLiteral so emoji and CJK surrogate pairs in steering queue metadata are not split mid-pair at the 500-char MAX_METADATA_CHARS cap. Co-Authored-By: Claude Opus 4.8 <[email protected]> * test(agents): add emoji surrogate boundary regression for steering metadata Drive buildMergedAgentSteeringPrompt with a task label placing an emoji at the 500-char MAX_METADATA_CHARS boundary to prove truncateUtf16Safe preserves the surrogate pair instead of splitting it. Co-Authored-By: Claude Opus 4.8 <[email protected]> * test(agents): assert steering truncation output * test(agents): remove useless string concat in emoji boundary test --------- Co-authored-by: Alix-007 <[email protected]> Co-authored-by: Claude Opus 4.8 <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: chengzhichao-xydt <[email protected]> (cherry picked from commit e8bd3ae26a952eda29b16f979abab03ab7df3460) * fix(discord): prevent stale gateway error listeners after restart (#101617) * fix(discord): remove gateway error listener on dispose * fix(discord): preserve late gateway error guard * fix(discord): retain late gateway diagnostics --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 1017ea5bc8048dfee9aff0d6a4be4d7e80f342bf) * fix(discord): keep gateway close reasons UTF-16 safe (#102246) * fix(discord): keep gateway close reasons UTF-16 safe * test(discord): assert exact close reason truncation --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit e90bf318292759ff53a6bb35e3fee75242df1236) * fix(agents): keep truncation surrogate-safe (#102332) * fix(agents): keep truncation surrogate-safe * test(agents): tighten process label truncation coverage --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit b62c796e51d98f6b5dffab31e00b39306d2dc2f0) * fix(discord): split encoded video URLs from captions (#101815) * fix(discord): split encoded video URLs from captions Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> * refactor(discord): scope media filename decoding --------- Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 2cb482dd40ad59aae51234e80b51361780e2b771) * fix(gateway): keep session title and preview text truncation UTF-16 safe (#102090) * fix(gateway): keep session title and preview text truncation UTF-16 safe * test(gateway): cover session UTF-16 boundaries in place --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 9614129c2bfb877411780b3568c3a0bc7db0d099) * fix(acp): keep background-task summaries UTF-16 safe at truncation boundaries (#101976) The bounded task label and progress summary shown for child ACP background runs used raw String.slice, which can split a surrogate pair at the 160/240-char boundaries and surface U+FFFD in requester-facing task status. Part of the UTF-16 safety sweep. (cherry picked from commit 6e4670f9c14790264516f70acb5c20dab71eadd5) * fix(acp): keep session update text truncation surrogate-safe (#102378) * fix(acp): keep session update text truncation surrogate-safe acp-projector's truncateText function used String.prototype.slice(0, N) on session update text that is sent to AI providers in the prompt context. When the truncation boundary falls inside a UTF-16 surrogate pair (emoji, CJK extended), the resulting string contains a dangling surrogate that can corrupt the prompt. Replace .slice(0, maxChars-1) with truncateUtf16Safe(input, maxChars-1) so the truncation point always falls on a complete code-point boundary. * fix: make ACP projection truncation UTF-16 safe --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit ba5a212c8f078b93659b05ff14107030e8f05779) * fix(agents): keep chunkString and buildResumeMessage truncation UTF-16 safe (#102085) * fix(agents): keep chunkString and buildResumeMessage truncation UTF-16 safe * fix: preserve code points in agent output chunks --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 9b4cbe47589d3bd7ff90c0c80a8dcdadfceed373) * fix(google-meet): contain node host stream failures (#102105) Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 624dfa6cf6dc19d5f52553b45e503f1d4a4678c7) * fix(google-meet): bound Calendar event lookups (#102157) Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 28bbbe4f603c17ca770399f044bd8f25c2c8685f) * fix(matrix): keep HTTP error and tool-progress truncations UTF-16 safe (#102395) * fix(matrix): keep HTTP error and tool-progress truncations UTF-16 safe * test(matrix): prove UTF-16 truncation boundaries --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit acac359de64ee9510074c1a5ad4ae1a24663dd78) * fix(security): keep channel-metadata and install-policy truncation surrogate-safe (#102266) * fix(security): keep channel-metadata and install-policy truncation surrogate-safe channel-metadata.ts and install-policy.ts both had private truncateText functions using String.prototype.slice(0, N) on user-visible text. channel-metadata is explicitly user-controlled untrusted content that gets injected into LLM prompt context -- a dangling surrogate from unsafe truncation would corrupt the prompt with invalid Unicode, affecting token counting and potentially LLM response quality. Replace .slice(0, ...) with truncateUtf16Safe(...) in both files so the truncation point always falls on a complete code-point boundary. Add test coverage for buildUntrustedChannelMetadata with emoji at both the entry-level (400-char) and outer (800-char) truncation boundaries. * test(security): prove UTF-16 truncation boundaries --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit cc961001f3c5f05f4086b3573d9cf2bf6fc09502) * fix(telegram): keep DM topic auto-rename user message UTF-16 safe (#101781) * fix(telegram): keep DM topic auto-rename user message UTF-16 safe Add surrogate-boundary regression for auto-topic label input truncation. Co-authored-by: Cursor <[email protected]> * test(telegram): tighten topic label boundary proof --------- Co-authored-by: NIO <[email protected]> Co-authored-by: Cursor <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit a3f00d32c914ece43c0885d8c7eb26cc78ab612e) * fix: keep task title truncation UTF-16 safe in restart/diagnostic output (#101934) * fix: keep task title truncation UTF-16 safe in restart/diagnostic output Three private copies of formatTaskBlocker share the same pattern — task.title.slice(0, 80) — which can split surrogate pairs in task titles, producing broken U+FFFD in restart blocker diagnostics, gateway reload logs, and CLI run-loop output. Replace raw slice with truncateUtf16Safe in all three locations. Relevant files: - gateway/server-reload-handlers.ts:270 - infra/restart-coordinator.ts:73 - cli/gateway-cli/run-loop.ts:569 * refactor(tasks): centralize restart blocker formatting * fix(tasks): keep restart formatter side-effect free * refactor(tasks): tighten restart blocker ownership --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 7de325d06023ca1a679660b73785795fa00e2218) * fix(channels): keep inbound log previews UTF-16 safe (#102407) * fix(matrix): truncate inbound preview on UTF-16 code-point boundary The matrix inbound verbose preview used bodyText.slice(0, 200) before logging. When a supplementary-plane character (emoji, extended CJK) straddles the 200th code unit, the slice splits its surrogate pair and emits a lone surrogate into the verbose log line. Lone surrogates corrupt JSON log serialization, break terminal rendering, and crash UTF-8-validating log shippers. Use the shared truncateUtf16Safe helper (already used by the mattermost sibling monitor after #101630) to keep complete surrogate pairs intact. No behavior change for ASCII input; the preview is still capped at 200 code units. Co-Authored-By: Claude <[email protected]> * test(matrix): fix inbound-preview test for lint and lib target - Avoid String.prototype.isWellFormed (ES2024 lib): use the encodeURIComponent well-formedness probe instead, which works on the project's TS lib target. - Replace literal string concatenation with template strings to satisfy the no-useless-concat lint rule. No behavior change in the assertions. Co-Authored-By: Claude <[email protected]> * fix(channels): keep inbound log previews UTF-16 safe * test(line): type verbose preview fixtures --------- Co-authored-by: Claude <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 18e80760a70da0be87e976e32dd29a9c0ab7e098) * fix(agents): keep tool-result context guard truncation UTF-16 safe (#102466) * fix(agents): keep tool-result context guard truncation UTF-16 safe Replace the raw text.slice(0, cutPoint) in truncateTextToBudget with truncateUtf16Safe so oversized tool results do not emit lone surrogates when an emoji falls on the truncation boundary. Adds a regression test that places an emoji exactly at the legacy cut point and asserts the truncated output contains no lone surrogates. Co-Authored-By: Claude Opus 4.8 <[email protected]> * fix(agents): report surrogate-safe omitted count --------- Co-authored-by: chengzhichao-xydt <[email protected]> Co-authored-by: Claude Opus 4.8 <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit bc6a4bdd94ab71faa1fc782b70e4c1374c98d041) * fix(tool-policy-audit): use truncateUtf16Safe for audit field truncation (#102464) * fix(tool-policy-audit): use truncateUtf16Safe for audit field truncation Replace naive .slice(0, MAX) with truncateUtf16Safe() to prevent surrogate pair splitting in tool policy audit log output. Co-Authored-By: Claude <[email protected]> * test(agents): cover audit UTF-16 boundary --------- Co-authored-by: Claude <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 472e5167d38a370b8b9f61b19988dc913585ce95) * fix(native-hook-relay): use truncateUtf16Safe for hook display text truncation (#102467) * fix(tool-policy-audit): use truncateUtf16Safe for audit field truncation Replace naive .slice(0, MAX) with truncateUtf16Safe() to prevent surrogate pair splitting in tool policy audit log output. Co-Authored-By: Claude <[email protected]> * fix(native-hook-relay): use truncateUtf16Safe for hook display text truncation Replace naive .slice(0, N) truncation with truncateUtf16Safe() in: - truncateText() helper (covers 4 call sites for tool display text) - Inline hook result truncation (...[truncated] suffix) Prevents surrogate pair splitting in native hook relay display output (tool names, commands, descriptions shown to users). Co-Authored-By: Claude <[email protected]> * test(agents): cover hook relay UTF-16 boundaries --------- Co-authored-by: Claude <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 4fa3118049c1592c3a057b25ac4857fa08cfdc38) * fix(gateway): keep chat history display text truncation surrogate-safe (#102470) * fix(gateway): keep chat history display text truncation surrogate-safe truncateChatHistoryText uses slice(0, N) to truncate chat history text for the Control UI. When the truncation boundary falls inside a UTF-16 surrogate pair (emoji, CJK extended), the resulting string contains a dangling surrogate that browsers render as U+FFFD (�). Replace slice(0, maxChars) with truncateUtf16Safe(text, maxChars) so the truncation point always falls on a complete code-point boundary. * test(gateway): cover chat display UTF-16 boundary --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit a6d45c46de78fd1aa3fbacf39b6f2aa21821cb83) * fix(auto-reply,infra): keep startup context and heartbeat event text UTF-16 safe (#102483) * fix(auto-reply,infra): keep startup context and heartbeat event text UTF-16 safe * test: strengthen UTF-16 truncation coverage --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit f0cc5e500f6658b8dde9100c08588b60649b4c46) * fix(memory): snippets split emoji when truncated (#102478) * fix(memory): snippets split emoji when truncated * refactor(memory): reuse shared UTF-16 truncation --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit c3d567db95d0d17f36f484ad9b9c0d14800614b3) * fix(zalouser): clear probe timeout after auth resolves (#101649) (cherry picked from commit ca8f6e1efd62ea98d4fa496a3e3663ed2d6eba52) * fix(browser): bound Chrome launch stderr diagnostics (#101506) * fix(browser): bound Chrome launch stderr diagnostics * fix(browser): preserve chrome launch recovery diagnostics * refactor(browser): share bounded UTF-8 stderr tails * fix(browser): own bounded stderr storage --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit a522e4309cbb5491c941766922a910cc0a1bb5d6) * fix(gateway): keep live chat assistant buffer tail truncation UTF-16 safe (#102484) * fix(gateway): keep live chat assistant buffer tail truncation UTF-16 safe * test(gateway): cover UTF-16 tail cap through merge path --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit e5aefd5656e81fd2eef5ee609d19c1446ad856df) * fix(talk): use truncateUtf16Safe for LLM-prompt-facing text truncation (#102477) * fix(talk): use truncateUtf16Safe for snippet text truncation fast-context-runtime.ts normalizeSnippet and heartbeat-events-filter.ts buildExecEventPrompt used raw .slice(0, N), which can produce lone surrogates when truncation boundaries cross emoji surrogate pairs. * test(talk): cover UTF-16 snippet boundary --------- Co-authored-by: hailory <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit f0d4d4f2fccda02915cfa9d467e660f82ff9bb1d) * fix(agents): keep provider error detail truncation UTF-16 safe (#102496) * fix(agents): keep provider error detail truncation UTF-16 safe Replace the raw detail.slice(0, limit - 1) in truncateErrorDetail with truncateUtf16Safe so provider error previews do not emit lone surrogates when an emoji falls on the truncation boundary. Adds a regression test that places an emoji at the default truncation boundary and asserts the formatted detail contains no lone surrogates. Co-Authored-By: Claude Opus 4.8 <[email protected]> * test(agents): prove provider error UTF-16 boundary --------- Co-authored-by: chengzhichao-xydt <[email protected]> Co-authored-by: Claude Opus 4.8 <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 51bb5f684778c8f86f095249d0cd5ce69a631c85) * fix(mcp-runtime): use truncateUtf16Safe for MCP metadata text truncation (#102500) * fix(mcp-runtime): use truncateUtf16Safe for MCP metadata text truncation Replace naive .slice(0, N) with truncateUtf16Safe() to prevent surrogate pair splitting in MCP tool metadata descriptions shown to users through the bundle MCP runtime catalog. Co-Authored-By: Claude <[email protected]> * test(mcp-runtime): cover UTF-16 metadata boundary * style(mcp-runtime): keep imports grouped --------- Co-authored-by: Claude <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit d0c49a7ad422b12bede975294cf7ef8ccd34a1e8) * fix(compaction): use truncateUtf16Safe for post-compaction context text (#102515) * fix(compaction): use truncateUtf16Safe for post-compaction context text Replace naive .slice(0, maxContextChars) with truncateUtf16Safe() to prevent surrogate pair splitting in post-compaction context summaries sent to the model. Co-Authored-By: Claude <[email protected]> * test(compaction): prove context UTF-16 boundary --------- Co-authored-by: Claude <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 49a5b6a23575892774967d09d7a2847957942247) * fix(discord): use truncateUtf16Safe for deploy error body truncation (#102525) * fix(discord): use truncateUtf16Safe for deploy error body truncation * test(discord): cover utf16 deploy errors --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit ed9ce1c58438353a17cb7fb0a2213d202c5eb3b4) * fix(oc-path): use truncateUtf16Safe for error message path truncation (#102527) * fix(oc-path): use truncateUtf16Safe for error message path truncation Replace naive .slice(0, 80) with truncateUtf16Safe() at three error-reporting call sites to prevent surrogate pair splitting in oc:// path validation error messages. Co-Authored-By: Claude <[email protected]> * test(oc-path): cover utf16 error truncation --------- Co-authored-by: Claude <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 145b71f57efce9948a0615bb9e6793d78a0bcf82) * fix(nodes): restore Mac app allowlist execution (#102536) * fix(nodes): restore macOS app allowlist execution * chore: keep node fix out of release changelog (cherry picked from commit 8a7242461c37b15a6b3451517ed8952ad6781565) * fix(google-meet): bound Google API requests (#102149) Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 51b4e78c339de48614f5fc578e1d4685c2ca9d8b) * fix(memory-core): use truncateUtf16Safe for diary context truncation (#102524) * fix(memory-core): use truncateUtf16Safe for diary context truncation * test(memory-core): cover utf16 diary truncation * refactor(memory-core): use plugin sdk text runtime --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 6a3834d41d0c29b7cb8659552eb9a80fa2714ad9) * fix(web-fetch): report exact-limit response bodies as complete, not truncated [AI-assisted] (#102389) * fix(web-fetch): report exact-limit response bodies as complete, not truncated * fix(web-fetch): skip zero-byte chunks when confirming overflow past the byte cap * fix(web-fetch): keep uncertain capped bodies truncated --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 574f1315540a82f7ea53410ac9eb57138af91c8f) * fix: keep Gemini thinking disabled after clamp (#101832) * fix: keep Gemini thinking disabled after clamp * fix: preserve clamped Gemini thinking in wrapper * test(ai): cover generic Gemini clamp to off --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit f984209f54d5170efe29595a1308b7912d4fe321) * fix(agents): fall stale_run steer refusals through to direct delivery (cherry picked from commit eedeb1eccb318e7bc9cbc0f29e13f9e0549e9a90) * fix(agents): keep provider-class idle tiers under agent budgets and cron (cherry picked from commit 048f2096d2473df2a27d26164f6a6a40b5dce6f4) * fix(agents): extend live CLI no-output watchdog to the blocked-tool floor (cherry picked from commit 4af2ca0a4d780f29015ff3c9c33987335a6c08cc) * fix: installer removes temporary files after failed commands (#104049) * fix(installer): retain temp cleanup registrations * chore: keep installer release notes release-owned (cherry picked from commit f50293c9e73b7e9fce0a0c1123a7335d5d73a1e2) * fix(telegram): clean up split reasoning previews (#97828) Co-authored-by: ly-wang19 <[email protected]> (cherry picked from commit 780f8d6f62f50b4203fb951ef962c18329baba88) * fix(nextcloud-talk): add timeout to room info lookup (#102859) * fix(nextcloud-talk): add timeout to room info lookup * test(nextcloud-talk): assert room lookup deadline Co-authored-by: llagy009 <[email protected]> --------- Co-authored-by: llagy009 <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit c4f46baec3178be8c5036193ff813fdc2cdb7154) * fix(minimax): add timeouts to OAuth HTTP requests (#102862) * fix(minimax): add timeouts to OAuth HTTP requests * fix(minimax): remove duplicate OAuth abort signals * refactor(minimax): keep OAuth timeout internal * test(minimax): make OAuth timeout proof deterministic --------- Co-authored-by: llagy009 <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 8f8aad9ae69253ecf91526a48f97dcb8d2d43acf) * fix(voice-call): redact phone numbers in event logs via subsystem logger (#103547) * fix(voice-call): redact phone numbers in event logs via subsystem logger * fix(voice-call): add output-level privacy assertions that raw phone numbers are absent from event logs * test(voice-call): consolidate privacy assertions --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 964a83b363d7596c63eb274803d553218c8bad61) * fix(voice-call): consolidate webhook logs on the injected plugin logger and assert transcript privacy boundary (#103555) * fix(voice-call): redact transcript and AI response content from webhook logs * fix(voice-call): wrap catch error in record for subsystem logger meta param * fix(voice-call): consolidate webhook diagnostics on the injected logger and assert privacy boundary in tests * fix(voice-call): restore [voice-call] attribution on shared plugin logger wrapper * fix(voice-call): narrow optional debug callback before constructing wrapper * test(voice-call): consolidate privacy assertions * test(voice-call): share transcript privacy assertions --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 99ddde8726204ad22b0f544156e998d187bdf912) * fix: preserve runtime plugin assets after build (#104229) (cherry picked from commit 1e660ac7b2b8fb1c596b471e52c66ff650f4a8bd) * fix(agents): avoid retaining local service env values (cherry picked from commit 84393bea7a7be017c64ce5e79e2e98ea420b451a) * fix(inworld): add timeout to voices list request (#102965) * fix(inworld): add timeout to voices list request * refactor(inworld): reuse guarded timeout test helpers * test(inworld): rely on harness timeout --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit a11449211a2c18b32c14173ff35f1eae7f714e03) * fix(google-meet): validate chrome node policy params (#103752) (cherry picked from commit f8aa995856ecec703e7391e0f3818a16ac844847) * fix(agents): keep exec finalization suspension-safe (#104419) (cherry picked from commit c49e5c480dc20447ab6afc7d75fabe6f8d2023de) * fix(memory): skip blank search provider bootstrap (#103728) * fix(memory): skip blank search provider bootstrap * refactor(memory): simplify blank search preflight --------- Co-authored-by: Vincent Koc <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit cba9ffb177eca82121c39d1eb5cb644c0e41c2af) * fix(commitments): isolate extraction batches by agent (#104426) * fix(commitments): isolate extraction batches by agent * chore: leave release notes to release workflow (cherry picked from commit 5a26748c3eb6a6ee459d643832f68b2e7b961766) * fix(plugins): honor empty document extractor scope (#103731) * fix(plugins): honor empty document extractor scope * fix(plugins): honor empty document extractor scope --------- Co-authored-by: Vincent Koc <[email protected]> (cherry picked from commit 60364137663d9f2c6584e8bd5f5dc410b475e0aa) * fix(whatsapp): keep pre-connect recovery replayable (#104450) (cherry picked from commit 1285fd6db457f00363df64474378a0030420b8c7) * fix(gateway): cap history when numeric limit is huge (#104263) * fix(gateway): cap oversized history limits * refactor(gateway): simplify oversized history limits --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 3ed8143495223f19d572a64143e014ce376d9605) * fix(agents): truncate multibyte middleware details at byte limit (#104156) * fix(agents): bound multibyte middleware details by bytes * refactor(agents): bound middleware detail byte sizing --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 02560243f3caf7951cc2dab12d766449812c02c2) * fix(onboard): wait for gateway warnings before installing service (#104173) * fix(onboard): wait for gateway warnings before installing service * fix(onboard): show gateway warnings after plan errors * refactor(onboard): drain install warnings from queue --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit a66d2959e9564bbf899e519e465b4ca49e9ba7ab) * fix(agents): cancel pending bundle LSP requests (#104110) Co-authored-by: Vincent Koc <[email protected]> (cherry picked from commit f73c5541fe56196b8b34ab87c045a042ecf95391) * fix(agents): preserve UTF-16 boundaries in context pruning (#104404) Co-authored-by: Vincent Koc <[email protected]> (cherry picked from commit 13817a6108b3d838a408434c828e0e1024bdf12e) * fix(browser): reject hex click coordinates in act route (#104440) * fix(browser): reject hex click coordinates in act route * refactor(browser): use route parser for click coordinates --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 834c1469581c0eed9b001d506f37645e0029043f) * fix(voice-call): use sliceUtf16Safe for bounded child output tail cap (#104260) Co-authored-by: NIO <[email protected]> (cherry picked from commit ab9a1c9a84878497d8acad990cc02f978e3a281b) * fix(file-transfer): keep bounded stderr tail UTF-16 safe end-to-end (#104151) Co-authored-by: NIO <[email protected]> (cherry picked from commit a498fc511efaa1d96b2e5cc9f1b7f073539438e5) * fix(agents): keep scp stderr tail UTF-16 safe end-to-end (#104148) Co-authored-by: NIO <[email protected]> (cherry picked from commit 58ef98ec13117e891036c684138fdee0ef63a850) * fix(nodes): reject malformed media payloads when base64 is invalid (#104414) * fix(nodes): reject malformed media base64 payloads * fix(nodes): keep media base64 size preflight * refactor(nodes): reuse shared base64 boundary Co-authored-by: qingminlong <[email protected]> * docs(changelog): note node media validation * chore: leave changelog to release automation * test(nodes): cover empty invalid media payloads --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 183139f3edae9c4ea979d4d2d45b5d5b409524bf) * fix(file-transfer): reject oversized inline file writes before node dispatch (#104556) * fix(file-transfer): cap inline file write payloads * fix(file-transfer): validate inline base64 before decoding --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit fdf581281746ecc28be6c58d608569313a9e31aa) * fix(google): stream Gemini batch JSONL output instead of res.text() (#102974) * fix(google): stream Gemini batch JSONL output instead of res.text() * fix(google): avoid Promise executor return in batch stream test --------- Co-authored-by: NIO <[email protected]> (cherry picked from commit 18e8713b99c69b714f6ff0a71933f7a4ae351ca1) * fix(gateway): demote expected startup socket aborts (#104610) * fix(gateway): demote expected startup socket aborts * fix(gateway): retain queued-frame startup warnings (cherry picked from commit 7193d29c92a95695a779cdca2eea0df97dbf20f9) * fix(utils): use UTF-16 safe truncation for long URL timeout logs (#104301) * fix(utils): use UTF-16 safe truncation for long URL timeout logs * test(utils): cover UTF-16 timeout log boundaries --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 416d113a2c61f415248bcfa069a3dfb11b81c84a) * fix(zalo): bound stalled inbound media header waits (#104578) * fix(zalo): bound stalled inbound media header waits * test(zalo): type inbound media mock to runtime contract * test(zalo): return complete saved media metadata --------- Co-authored-by: NIO <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 9b430fd6f608dfe57013ddcae0ee72f54fffea42) * fix(slack): preserve unrelated action rows after interactions (#103445) * fix(slack): use endsWith instead of includes for _all_ action_id matching * fix(slack): codify bulk action IDs and add confirmation regressions Extract isSlackBulkActionId() with the documented _all suffix grammar, use it for bulk-row detection, and add whole-path chat.update tests for bulk-row cleanup plus deploy_all_services false-positive control. Co-authored-by: Cursor <[email protected]> * fix(slack): use OpenClaw bulk block marker instead of _all suffix Replace global endsWith("_all") bulk detection with an explicit openclaw:bulk: block_id prefix and closed action IDs, export a shared producer helper, and add live Slack chat.update proof for bulk-row removal and deploy_all_services preservation. Co-authored-by: Cursor <[email protected]> * fix(slack): keep bulk contract private and add legacy upgrade path Drop speculative bulk-action exports from the Slack plugin API, keep accepted ID collections private and immutable, and recognize legacy bare select_all/deselect_all rows while still rejecting deploy_all_services false positives. Co-authored-by: Cursor <[email protected]> * fix(slack): drop unsupported bare bulk compatibility branch Remove the legacy select_all/deselect_all classifier that overmatched single-ID and duplicate-ID rows, and add negative whole-path regressions preserving unrelated custom action rows. Co-authored-by: Cursor <[email protected]> * fix(slack): remove unsupported bulk-row cleanup heuristic Delete the undocumented bulk-row inference and namespaced replacement contract. Confirmation updates now replace only the selected actions row and preserve every other authored Block Kit row. * refactor(slack): tighten interaction confirmation fix * chore(changelog): preserve historical TTS entries * chore(slack): move release note to PR body --------- Co-authored-by: zw-xysk <[email protected]> Co-authored-by: Cursor <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit a4c1e22731260c62212d72d4d933d43271c00b76) * fix(gateway): retain detached hook admission (#104686) (cherry picked from commit a366218cf46bcfa301f00adf047320ae7d72544c) * fix(browser): run mutation guard before JSON parsing (#104677) * fix(browser): run mutation guard before JSON parsing * test(browser): cover auth in mutation guard ordering --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 85a8f4ba8d9fe0fe9eec40173da28d4f59d51d01) * fix(agents): preserve UTF-16 boundaries in bootstrap context (#104423) (cherry picked from commit b2702156acae708ff73e1a1b86f7d10a793dd7a7) * fix(write): report actual UTF-8 byte count in success message (#104560) * fix(write): report actual UTF-8 byte count in success message Replace string.length (UTF-16 code units) with Buffer.byteLength(content, 'utf8') so the reported byte count matches the actual bytes written to disk. For ASCII content the values are identical. For non-ASCII content (CJK, emoji), string.length underreports — e.g. '你好' reports as 2 bytes but is actually 6. * refactor(write): centralize success reporting * test(write): avoid shadowing recovery fixture --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 14b95c7552338b50be8f285a3c7f516c45116f17) * fix(attempt-execution): use truncateUtf16Safe for summary text truncation (#104454) * fix(attempt-execution): use truncateUtf16Safe for summary text truncation Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * test(agents): cover fallback summary UTF-16 boundary * test(agents): cross fallback summary truncation budget --------- Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 26e1b18a9b5372bb8f3361a4fe3709c4a60f405c) * fix(browser): apply profile proxy policy to tab list redaction (#104715) * fix(browser): apply profile proxy policy to tab list redaction * test(browser): cover proxy tab redaction route proof * test(browser): streamline proxy tab redaction coverage * fix(browser): scope proxy inference to managed profiles --------- Co-authored-by: llagy007 <[email protected]> (cherry picked from commit 5a6d684019d968f44d8be45e3241b13ef1afd426) * fix(ai): reject non-finite tool schema numbers (#104470) * fix(ai): reject non-finite tool schema numbers Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> * fix(ai): catch non-finite values from tool schema serializers Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> * test(ai): cover nested tool schema serializers Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> * fix(ai): satisfy schema projection lint Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> * fix(ai): satisfy schema projection lint Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> * fix(ai): preserve empty-key schema diagnostic paths * fix(ai): reject boxed non-finite schema numbers * fix(ai): ignore spoofed boxed-number tags * fix(ai): isolate boxed-number brand probes * refactor(ai): use intrinsic boxed-number detection --------- Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit f8c7f67bde400b2a2f60ea2e190c67486511d545) * fix(feishu): avoid logging raw duplicate card-action tokens (#104498) * fix(feishu): avoid logging raw duplicate card-action tokens Avoid writing the raw Feishu card-action callback token into duplicate callback diagnostics while preserving duplicate suppression behavior. Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> * test(feishu): use neutral callback token fixture * test(feishu): mark callback fixture as placeholder --------- Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit d5569a98dba2369903de1ab801c5a5257a6c839f) * fix(memory): scope cached managers by service host (cherry picked from commit a7f021d5a786690c7e5da6593be2976488e9ac12) * fix(gateway): reject incomplete usage date ranges (#113259) * fix(gateway): reject incomplete usage date ranges * fix(gateway): tighten usage range validation --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 1defbc54731ad97e07ce444deeac7f371bd7b019) * fix: doctor preserves locks owned by exact gateway process title (#112855) * fix(agents): recognize exact gateway process title * refactor(agents): reuse gateway argv recognition --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 1e04925e03b4c238ab6ff63ca3a86a04955cf365) * fix(gateway): return 404 for disabled OpenAI API routes (#113609) Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 5b4df5724840cf73e7f541550381932a7273bf64) * fix: route skill verification through the managed proxy (#113683) Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 4aeb426d2d146626147b616548139635492a6768) * fix: preserve child process signal exit codes (#113685) Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 89984a5082cea059ae792ebff00c17709986e369) * fix(xiaomi): reject malformed base64 audio in TTS responses (#113106) * fix(xiaomi): reject malformed TTS audio Co-authored-by: zenglingbiao <[email protected]> * fix(media): reject noncanonical base64 padding * style(xiaomi): format malformed audio test --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit cff22e83ca3e1f1ee3a022656812a0e303df69d5) * fix(volcengine): reject malformed TTS audio (#113109) Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit c459a1876b0542ccb0278894899f155006b60d45) * fix: recognize Bash completion installed in login profiles (#113790) * fix(cli): recognize Bash completion in login profiles * test: track Bash completion profile fixtures --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit a1cc41acbcdd285a7cdb423bdfe45ef06b2f97cb) * fix(models): preserve empty machine-readable model lists (#113897) (cherry picked from commit e3fc8527ce021ec47c5a34092c5419e1f9772b45) * fix(agents): retire completed session work lanes (#114051) (cherry picked from commit c4f148368aee115620c972b5f8c0c6b397e64966) * fix(gateway): anchor Control UI assets on deep routes (#114061) (cherry picked from commit 0c8f070c92a8bbc3a9d967415a9d031ee1212e69) * fix(gateway): settle account stops before failing (#114280) Co-authored-by: Qiong <[email protected]> (cherry picked from commit 6e4f2e1ec46f05d50083ef3342e4499d334d59bb) * fix: report unavailable system Node versions accurately (#114325) (cherry picked from commit ffec7731a4ac701eb2a13c5a37edfd77ee89fd7a) * fix(matrix): reverse-proxy path support for Matrix homeserver URLs (#93516) * feat(matrix): add configurable apiPrefix for non-standard homeserver API paths * fix(matrix): remove public apiPrefix config, keep transport path fix The apiPrefix config surface was incomplete: it was not carried through resolveMatrixConfigForAccount, MatrixAuth, shared client keying, or createMatrixClient, making it a no-op in normal runtime paths. Following ClawSweeper review direction, this narrow fix: - Removes apiPrefix from MatrixConfigSchema and MatrixConfig types - Keeps apiPrefix as a private internal constant in MatrixAuthedHttpClient for bare-path resolution (DEFAULT_API_PREFIX = /_matrix/client/v3) - Stops MatrixClient from accepting/passing apiPrefix - Retains the transport.ts normalizeEndpoint() fix for homeserver URLs behind reverse proxies (avoids losing path segments on trailing-slash mismatches) Test: 1393 tests pass across 121 matrix extension test files. * fix(matrix): ensure homeserver URL ends with slash for new URL() resolution Without a trailing slash, new URL(relPath, homeserver) treats the final path segment as a filename, losing the reverse-proxy prefix path. For example: new URL('_matrix/...', 'https://host/proxy') -> https://host/_matrix/... (wrong, 'proxy' dropped) With trailing slash: new URL('_matrix/...', 'https://host/proxy/') -> https://host/proxy/_matrix/... (correct) * test(matrix): add URL resolution coverage for path-prefixed homeservers * fix(matrix): preserve reverse-proxy homeserver paths --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 0680dfc6a9a920b835ba8b388f1534a3f2087a04) * fix(zalo): deliver text when optional media is blank (#114450) * fix(zalo): preserve text sends with blank media * test(zalo): compare serialized Bot API payload safely * test(zalo): prove message delivery over real HTTP (cherry picked from commit 36440de61dc421003758ef794f8d5138f600016f) * fix(cron): exclude queued lane waits from agent setup timeouts (#114512) Co-authored-by: hugin-bot <[email protected]> (cherry picked from commit 457a83a94672f4b144c8407fd04a5d9c21569308) * fix(model): report model change before its triggered thinking remap When a bare /model switch forces an unsupported stored thinking level to be remapped, the acknowledgement listed the thinking remap before the model change, announcing the consequence before its cause. Report the model line first in both directive-ack builders so the message reads cause-then-effect. Adds a regression test locking the model-before-thinking order. (cherry picked from commit a4e524fae3f8cdb20f3b8dfdd865d1f3b26fbff8) * fix(cron): prevent local model preflight socket leaks (#114540) Co-authored-by: hugenshen <[email protected]> (cherry picked from commit 5e4b0d3beaad09dd82a9b0bb4bf2cc0b0da3cf3f) * fix(auto-reply): normalize newline-delimited silent tokens (#114500) * fix(auto-reply): normalize newline-delimited silent tokens * fix(auto-reply): preserve punctuation-attached reply literals (cherry picked from commit ba5e1740776e6b5e79b51c31fb5477fe6c9a7151) * fix(session-delivery): propagate non-ENOENT retry persistence failures (#97024) * fix(session-delivery): propagate non-ENOENT retry persistence failures drainQueuedEntry swallowed a non-ENOENT error from failSessionDelivery as a clean "failed", so the retry metadata (retryCount/lastAttemptAt) never advanced and the entry was re-driven without progressing toward the max-retries terminal move. Re-throw non-ENOENT to match the sibling moveSessionDeliveryToFailed paths; ENOENT still maps to already-gone. * test(session-delivery): isolate real SQLite recovery proof --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 1e0a42432d0a6b6574316fed93fe9ff14e5c6230) * fix: debug proxy respects response backpressure (issue #105701) (#114076) * fix(proxy-capture): respect response backpressure * test(proxy-capture): avoid unbound prototype method lint * test(proxy-capture): stabilize backpressure regression * test(proxy-capture): fix backpressure write typing * test(proxy-capture): satisfy lint for method helper * fix(proxy-capture): settle forwarding only after downstream finish --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 445e262d26667bbe70216aa9cd19a147b1ed9790) * fix(ai): preserve root properties when flattening root-level anyOf tool schemas (#128799) * fix(ai): preserve root properties when flattening root-level anyOf tool schemas * test(agents): cover MCP root-union callability --------- Co-authored-by: Patrick Erichsen <[email protected]> (cherry picked from commit 5300c0d154ed6e0ff53657b98f23cc457d6b93ba) * fix(copilot): own BYOK response stream lifecycles (#131546) * fix(copilot): own BYOK response stream lifecycles Use a single pipeline to handle response errors and cancellation on both streams, reaching guarded-fetch cleanup without unhandled process errors. Add red/green regressions for upstream interruption, client disconnect, and proxy shutdown. Fixes #131544. Live before/after cancellation and actual Copilot SDK completion verified; request intake policy in #99064 remains separate. * test(copilot): capture the BYOK stream controller directly * docs(copilot): retain release notes in PR metadata Keep the BYOK stream crash fix release context in the PR and squash message; leave release-owned CHANGELOG.md generation to release automation. Runtime and regression tests are unchanged. (cherry picked from commit 2cbcd05a8ed0ad3c9d811ad228528d649f1d480e) * fix(line): preserve separators inside card data (#131195) Let LINE `/card` operators keep commas, pipes, and colons inside card data without changing unescaped commands. Use one escape-aware parser across action, buttons, list, receipt, and confirm values. Co-authored-by: 許元豪 <[email protected]> Co-authored-by: Ayaan Zaidi <[email protected]> (cherry picked from commit b0d40bf63651e9e7ae27201251fcb6992849994d) * fix(agents): keep dangling symlinks visible in ls listings (#131783) * fix(agents): keep dangling symlinks visible in ls listings Retain directory-entry names when optional target metadata is unavailable, preserving healthy directory-link suffixes and bounded output notices. Related: #131776 * test: simplify ls regression arguments (cherry picked from commit f4b2a50c9f69a56f4766e331476a2ccea86d2af7) * fix(line): preserve postback selections for agents (#132014) LINE returns picker and rich-menu selections separately from callback data. Preserve the raw callback token for command authorization while adding sorted nonblank selections to the agent-facing turn. Co-authored-by: xuyuanhao <[email protected]> Co-authored-by: Ayaan Zaidi <[email protected]> (cherry picked from commit ead8876ccf1043609da24fc5ea3038cd330d9512) * fix(handoff): skip orchestrator framing for solo agents without subagents (#102636) * fix(handoff): skip orchestrator framing for solo agents without subagents buildHierarchyReinforcementMessage unconditionally claimed 'You are the new LEADER (Orchestrator)' and showed 'ACTIVE SUBORDINATE UNITS: None active.' even when the agent had no subagents active. This reliably confused models (observed on Opus 4.7) into inventing subordinates or fabricating orchestrator context after quota-suspension/failover recovery. When activeSubagents is empty, the message now simply tells the model to review current state and continue the conversation. Fixes #102628 * fix(handoff): keep team instructions after state summary Restore the original prompt ordering for the team branch by placing INSTRUCTIONS after CURRENT STATE SUMMARY, matching current main behavior. The solo-agent branch skips orchestrator framing entirely. * test: cover solo and team recovery handoffs * style: format handoff summarizer test --------- Co-authored-by: Altay <[email protected]> (cherry picked from commit 7c61f7160005886038af8d50cb5cca15c78aca3e) * fix(plugins): keep compiled plugin aliases on the built runtime (#132545) (cherry picked from commit cf84b80e48101093915e2d2eb11193133c91ccde) * fix(release): align version helper imports * fix(release): keep legacy version tools on shared classifier * release: prepare 2026.7.33 package versions * docs(changelog): refresh 2026.7.33 notes * Revert "fix(gateway): terminate failed Responses streams (#113629)" This reverts commit f96f23fbf2ece7b7f2a537fd7c062cdebc92a2a0. * Revert "fix(gateway): streamed OpenAI-compatible requests fail with a spurious draining error (#113514)" This reverts commit e98a60c6ca68dd823b79129a2ac54d9785dd412b. * docs(changelog): refresh 2026.7.33 backport record * fix(release): carry Docker publication caller * fix(release): carry publication workflow dependencies * fix(release): adapt publisher to legacy setup action * fix(release): align npm publication child contracts * fix(release): preserve frozen workflow cache inputs * fix(release): carry publication workflow helpers * fix(release): complete publication helper closure * fix(release): complete workflow script dependency set * fix(release): carry release tool module closure * fix(release): forward extended-stable plugin tag * docs(changelog): finalize 2026.7.33 contribution record * Revert "fix(agents): extend live CLI no-output watchdog to the blocked-tool floor" This reverts commit 7c19b50b4610579f16e130313f62c501517ecf4a. * Revert "fix(agents): fall stale_run steer refusals through to direct delivery" This reverts commit 1a0f559497c188a9794244e0da8d21529436f5e0. * Revert "fix(gateway): retain detached hook admission (#104686)" This reverts commit aef993cf3f71f06ef7badce2a79922f54ac328b0. * Revert "fix(agents): keep exec finalization suspension-safe (#104419)" This reverts commit 01b280732524fc9328f9d642ac5a153e4de6efc7. * Revert "fix(agents): keep provider-class idle tiers under agent budgets and cron" This reverts commit b75945fb921b196fd785aadef4e5b53efcf4a07e. * fix(agents): keep finite LLM idle watchdog under unlimited run budgets (cherry picked from commit 215be4e4ee20a9b0010dd1f9c8529f8b6019046b) * fix(agents): keep provider-class idle tiers under agent budgets and cron (cherry picked from commit 048f2096d2473df2a27d26164f6a6a40b5dce6f4) * test: adapt retained backports to July support * docs(changelog): refresh repaired 2026.7.33 record * fix(agents): extend live CLI no-output watchdog to the blocked-tool floor (cherry picked from commit 4af2ca0a4d780f29015ff3c9c33987335a6c08cc) * fix(agents): adapt blocked-tool watchdog to July runtime * docs(changelog): record final CI repair head * Revert "fix(memory): scope cached managers by service host" This reverts commit b795b615b69f54af14e452a8ad9be704a6960880. * Revert "fix(zalo): bound stalled inbound media header waits (#104578)" This reverts commit ce0c7cc54ed01ec18ea6c405b99b3f8e22ddbbd3. * Revert "fix(whatsapp): keep pre-connect recovery replayable (#104450)" This reverts commit b530860847780628502023ee066ab5640799c21e. * fix(ci): pin July SwiftFormat contract * fix(release): complete frozen tooling compatibility * fix(deps): remediate extended-stable production advisories * docs(changelog): refresh repaired contribution record * fix(ci): align frozen dependency and docs inputs * docs(changelog): record dependency CI repair * fix(ci): adapt frozen validation to July toolchain * docs: complete frozen branch metadata * docs(changelog): record frozen CI compatibility repair * docs(changelog): bind final repair head * fix(ci): remove unused untrusted installer seam * docs(changelog): bind security repair head * fix(release): complete extended-stable CI closure * fix(release): complete worker packaging closure * test(release): align pinned tooling contracts * fix(ci): keep SwiftFormat config branch-compatible * fix(memory): preserve UTF-8 when qmd output splits across pipe chunks (#107263) * fix(memory): preserve UTF-8 across fragmented qmd output chunks * fix(memory): decode qmd streams at UTF-8 boundary Co-authored-by: wahaha1223 <[email protected]> --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 7f36f490528b1466dfad05a491bd253e9cbf03f5) * fix(sessions): stop leaking file path as prompt content on read failure (#108546) * fix(sessions): stop leaking file path as prompt content on read failure When readFileSync fails for a valid file path, resolvePromptInput returns the raw path string as prompt content instead of undefined. This injects filesystem paths into the LLM context. The existing console.error warning still fires; the caller already handles undefined returns correctly. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * test: cover unreadable prompt paths * test: use tracked resource loader temp dirs --------- Co-authored-by: Claude Sonnet 4.6 <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit c9248192926ac164fe4a91af3fe72555a7512c67) * fix(agents): bound base64 image input before decode in tool-image sanitizer (#105086) * fix(agents): bound base64 image input before decode in tool-image sanitizer * fix(agents): lower input-size cap to 10MB for OOM headroom * fix(agents): align tool-image input-cap comment with 10 MiB ceiling * fix(agents): typecheck-safe access in tool-image input-cap test * test(agents): exercise real tool image input cap --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit b85531c62f7565856219f652bf9fe6cfa1940b1f) * fix(qqbot): bound tail log reads to actual bytes returned by fs.readSync (#108955) * fix(qqbot): bound tail log reads to actual bytes returned by fs.readSync * fix(qqbot): satisfy knip deadcode check for testing export Add __testing re-export and test-api.ts barrel so knip traces the testing export through a recognized entry point. * fix(qqbot): restore testing export alongside __testing re-export Both exports are needed: testing for proof scripts, __testing for knip tracing. * fix(qqbot): remove unused __testing re-export from log-helpers test-api.ts already imports testing and re-exports as __testing. The extra re-export in log-helpers.ts was unused by production code. * fix(qqbot): retry short log tail reads * test(qqbot): keep short-read seam private Co-authored-by: RileyJJY <[email protected]> * test(qqbot): exercise short reads through log export Co-authored-by: RileyJJY <[email protected]> --------- Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: RileyJJY <[email protected]> (cherry picked from commit 3f89aae98da9229ea7cf9bfc6215aaeae01a8796) * fix(lmstudio): cancel model discovery response body on non-ok (#109718) * fix(lmstudio): cancel model discovery response body on non-ok Wire the direct-fetch release hook to cancel unread bodies so failed model discovery releases the TCP connection instead of leaving it open. Co-authored-by: Cursor <[email protected]> * refactor(lmstudio): unify response cleanup Co-authored-by: Zeng Wen <[email protected]> --------- Co-authored-by: Cursor <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: Zeng Wen <[email protected]> (cherry picked from commit 1573c78f5b849d1fedf12a78aa029c069c44ffca) * fix(heartbeat): bound HEARTBEAT.md file read size (#101775) * fix(heartbeat): bound HEARTBEAT.md file read size * fix(heartbeat): follow symlinked HEARTBEAT.md while bounding reads * fix(heartbeat): warn operators when oversized HEARTBEAT.md is skipped (cherry picked from commit 993c975f5738dbcd17882db0fafcb9d1e403607e) * fix(plugins): bound marketplace manifest file reads (#101774) * fix(plugins): bound marketplace manifest file reads * fix(plugins): distinguish oversized marketplace manifest from other read failures * fix(plugins): follow symlinked marketplace manifests while bounding reads * test(plugins): cover oversized symlinked marketplace manifest target (cherry picked from commit 35754a63ccafc41122085bc9467fd3e1dbc8d4f3) * fix(gateway): bound BOOT.md file read size (#101776) * fix(gateway): bound BOOT.md file read size * fix(gateway): treat non-regular BOOT.md as empty/missing and add coverage * fix(gateway): preserve non-size BOOT.md failures while bounding oversized reads * fix(gateway): preserve readable BOOT.md symlink behavior * fix(gateway): treat dangling BOOT.md symlink as missing * fix(gateway): report oversized BOOT files * fix(gateway): preserve missing BOOT race behavior Co-authored-by: 陈宪彪0668000387 <[email protected]> --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit e22c2dfaaa890d1d689f894a46c6cc0a4339d301) * fix(tlon): preserve shutdown when body cancellation fails (#111106) * fix(tlon): observe shutdown body cancellation failures * test(tlon): streamline shutdown cleanup proof * test(tlon): narrow shutdown fixtures --------- Co-authored-by: ZengWen-DT <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 5bb969f7de6cb07747e746e90d6444bb935dcb8e) * fix(qqbot): cancel non-OK direct-upload response body before throwing (#110008) (cherry picked from commit 17643f385085d68d104d216eae1a08785da4b3ec) * fix(tui): prevent memory growth during repeated selector searches (#109451) * fix(tui): bound searchable select regex cache * fix(tui): discard stale selector regexes Co-authored-by: wahaha1223 <[email protected]> --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 80c16ecc8097793166e4c8418b6090fc09e3a90a) * fix(tlon): bound Urbit auth response body drain to prevent OOM (#109697) * fix(tlon): bound Urbit auth response body drain to prevent OOM Replace the unbounded response.text() body drain (discarded after reading to finalize set-cookie headers) with a streaming reader capped at 64 KiB. When no body stream is available, fall back to text() for compatibility. A hostile or misconfigured Urbit endpoint could previous…
* release: extended-stable 2026.6.35 (#119942)
* fix(wiki): wiki_get and wiki compile miss nested source files (#96022)
* fix(wiki): discover nested source files in QUERY_DIRS
Two functions in the memory-wiki extension — listWikiMarkdownFiles
(wiki_get runtime lookup) and collectMarkdownFiles (wiki compile
indexing) — used fs.readdir without { recursive: true }. Nested
source files (e.g. sources/audi/car.md) were silently invisible to
both wiki_get and wiki compile.
Add recursive: true and adjust path construction using
entry.parentPath so nested .md files in all QUERY_DIRS are
discovered while preserving the index.md exclusion and backward
compatibility with flat vaults.
* fix(wiki): remove entry.path fallback, only parentPath is typed on Dirent
* fix(wiki): add recursive scan to status.ts and add nested-file regression tests
* fix(wiki): use toSorted instead of sort to pass lint
* style(memory-wiki): format recursive discovery fix
---------
Co-authored-by: Vincent Koc <[email protected]>
(cherry picked from commit 63ee4cd2405c932f338de269147ed0510910c0e8)
* fix(tools-manager): require clean exit in commandExists (#96361)
Summary:
- The PR changes the agent tools manager to treat spawned-but-nonzero fd/rg probes as missing and adds regression tests for non-zero and zero spawn status.
- PR surface: Source +3, Tests +27. Total +30 across 2 files.
- Reproducibility: yes. Current main ignores non-zero `spawnSync.status`, and a live Node probe confirms a spawned child can exit non-zero while leaving `error` unset.
Automerge notes:
- No ClawSweeper repair was needed after automerge opt-in.
Validation:
- ClawSweeper review passed for head 377d560effe8fbeaf464bcdf8f5892eab925475a.
- Required merge gates passed before the squash merge.
Prepared head SHA: 377d560effe8fbeaf464bcdf8f5892eab925475a
Review: https://github.com/openclaw/openclaw/pull/96361#issuecomment-4788071605
Co-authored-by: liyuanbin <[email protected]>
Co-authored-by: Claude <[email protected]>
Approved-by: takhoffman
(cherry picked from commit 380f2749becc001c4f949a922d9a0fd427e2b539)
* fix(lmstudio): bound model load success response body to prevent OOM (#96042)
The /api/v1/models/load success path read the response with an unbounded
await response.json(), so a misbehaving or compromised LM Studio server
could stream an arbitrarily large JSON body that is fully buffered into
memory before any size check. Read it through the shared byte-capped
readProviderJsonResponse helper instead (16 MiB provider-JSON cap, cancels
the stream on overflow, wraps malformed JSON), matching the discovery path
and the already-bounded error body.
Migrate the model fetch/load test mocks to real Response objects (the
bounded readers need a real body stream) and add a regression test that
streams an oversized success body and asserts a bounded error plus stream
cancellation.
Label: security
(cherry picked from commit 7844b0844568f8f71040008ef596bc715064657b)
* fix(parallel): bound successful web-search JSON response reads (#96035)
* fix(parallel): bound successful web-search JSON response reads
The Parallel web_search provider parsed its /v1/search success body with an
unbounded await res.json(). The body comes from an external web-search
upstream, so a hostile or malfunctioning endpoint streaming an unbounded JSON
payload could force the runtime to buffer the whole response before parsing,
creating memory pressure or a hang on the provider path.
Read the success body through the shared readProviderJsonResponse helper with a
16 MiB cap (matching the provider JSON cap from #95218); on overflow the stream
is cancelled and a bounded error is thrown. The error-body path was already
bounded (readResponseTextLimited, 8 KiB). Symmetric follow-up to the
#95103/#95108 response-limit campaign.
* docs(parallel): drop upstream PR ref from response-cap comment
Replace the PR-specific '#95218' annotation with a neutral description of
the shared provider JSON cap so the comment stays accurate independent of
upstream PR numbering.
(cherry picked from commit 6163b1977b4d8703c41fadc99f4ab9bc36a38772)
* fix(exa): bound untrusted search JSON response reads (#96038)
Exa search success responses were read via an unbounded `await
response.json()`, so a misbehaving or hostile endpoint could stream an
arbitrarily large body into memory before parsing. Read the success
body through the shared bounded reader (16 MiB cap, the same limit other
bundled providers use) and cancel the stream on overflow. This mirrors
the error-body bound already in place and the #95103/#95108 response
-limit campaign on the success-JSON side.
AI-assisted.
(cherry picked from commit 605aede38c10787e74303aec1eef696af6c1927d)
* fix(ollama): bound model-discovery JSON response reads (#96027)
* fix(ollama): bound model-discovery JSON response reads
The /api/tags and /api/show discovery reads in extensions/ollama/src/provider-models.ts
parsed their HTTP responses with an unbounded await response.json(). Ollama base URLs
are user-supplied and can point at remote/cloud endpoints, so a hostile or buggy server
(or one reachable via SSRF) could stream an unbounded or never-ending JSON body and drive
model discovery into OOM.
Route both reads through the shared @openclaw/media-core byte-bounded reader
(readResponseWithLimit, re-exported via openclaw/plugin-sdk/response-limit-runtime) under
a single 16 MiB cap before JSON.parse, cancelling the stream on overflow. Overflow throws a
bounded error that the existing fail-soft handlers swallow, so a capped endpoint degrades
gracefully: /api/tags returns { reachable: false, models: [] } and /api/show returns {}.
Symmetric counterpart to the #95103/#95108 response-limit campaign.
AI-assisted.
* fix(ollama): reuse shared bounded JSON reader for model discovery
Replace the local readOllamaDiscoveryJson helper with the shared
readProviderJsonResponse (from openclaw/plugin-sdk/provider-http), which
already enforces the 16 MiB cap, cancels the stream on overflow, and wraps
malformed JSON with the caller label. The /api/tags and /api/show discovery
reads now go through it directly while keeping the existing fail-soft
handlers ({ reachable: false, models: [] } and {}).
Add a focused regression test: when a discovery stream exceeds the JSON byte
cap, fetchOllamaModels returns { reachable: false, models: [] },
queryOllamaModelShowInfo returns {}, and the bounded reader cancels the body
mid-flight so less than the full advertised stream is read.
(cherry picked from commit d1c2934d0d17fe2c52912b05c320654ca9fb0242)
* fix(providers): bound self-hosted provider discovery JSON reads (#95244)
* fix(providers): bound self-hosted discovery JSON reads
discoverLlamaCppRuntimeContextTokens and discoverOpenAICompatibleLocalModels
parsed their HTTP responses via an unbounded await response.json(). Self-hosted
provider base URLs are user-supplied and untrusted (an endpoint reachable via
SSRF could stream an unbounded JSON body), so a hostile or buggy endpoint could
drive the setup wizard into OOM.
Route both reads through the shared byte-bounded reader (readResponseWithLimit
from @openclaw/media-core) under a single 4 MiB cap before JSON.parse, mirroring
the bound-stream hardening landed for Anthropic error bodies. Overflow cancels
the stream and is swallowed by the existing discovery error handling, so a
capped endpoint degrades gracefully (returns [] / skips the runtime context
probe) instead of buffering the whole body.
* tune self-hosted discovery cap
Signed-off-by: sallyom <[email protected]>
---------
Signed-off-by: sallyom <[email protected]>
Co-authored-by: sallyom <[email protected]>
(cherry picked from commit dad5ce64d4f1ba35e8f4cff73ddd3d704d4c5898)
* fix(providers): bound successful response reads
Backport of 0a14444924e34e031133c997b00d30573353c5a0; retains the target's existing provider-reader SDK baseline.
* fix(outbound): prevent partial-send recovery replay
(cherry picked from commit 210ea659f77f3b600043952a5686e640311846e3)
* fix(qwen): bound video success response (#96604)
(cherry picked from commit cc124d2921b88d241a567f17368bd55049d84f83)
* fix(byteplus): bound video-generation success response (#96606)
(cherry picked from commit 7b5ee739eb22b53022a5674a3bf674dc0e6c33d5)
* fix(voyage): bound embedding-batch status, error, and non-OK responses (#96608)
The batch status read (fetchVoyageBatchStatus) parsed its response with an
unbounded await res.json(), and the batch error-file read (readVoyageBatchError)
buffered the whole body via await res.text(). On top of that, the non-OK
(4xx/5xx) diagnostic body was still read unbounded: assertVoyageResponseOk did
await res.text() before throwing, and the non-OK output-file branch in
runVoyageEmbeddingBatches did the same. Voyage base URLs are user-supplied and
reachable via SSRF, so a misbehaving or hostile endpoint could stream an
unbounded body into memory on any of these paths before parsing.
Route the status JSON through the shared readProviderJsonResponse, the error
file through readResponseWithLimit, and now the non-OK diagnostic body through
readResponseWithLimit as well, all under a single 16 MiB cap, cancelling the
stream on overflow before decode/parse. assertVoyageResponseOk preserves its
original "${context}: ${status} ${text}" diagnostic shape for under-cap bodies
and throws a bounded "(error body exceeds <N> bytes)" on overflow; the non-OK
output-file branch now reuses it instead of a duplicate unbounded read. The
existing error-file fail-soft handling (formatUnavailableBatchError) is
preserved, so a capped endpoint degrades gracefully. The submit path already
bounds its body via postJsonWithRetry/maxResponseBytes and is left untouched.
Symmetric counterpart to the #96027/#96038 response-limit campaign.
(cherry picked from commit d3620da3e031b2b52414165d09315d78a13c6836)
* fix(github-copilot): bound usage response (#96607)
The Copilot usage read in extensions/github-copilot/usage.ts parsed its
HTTP response with an unbounded await res.json(). A hostile or buggy
api.github.com proxy (the proxy endpoint is derived from a user-supplied
token) could stream an unbounded JSON body and drive the usage snapshot
into OOM.
Route the read through the shared readProviderJsonResponse (from
openclaw/plugin-sdk/provider-http), which enforces the 16 MiB byte cap,
cancels the stream on overflow, and wraps malformed JSON with the caller
label. Same no-helper-import-to-bounded-reader shape as the #96027 /
#96038 response-limit work.
Add a focused regression test: when the usage stream exceeds the JSON
byte cap, fetchCopilotUsage rejects with a bounded-overflow error and the
reader cancels the body mid-flight instead of buffering the full
advertised stream. Existing parse/HTTP-error cases keep passing.
(cherry picked from commit 646e54ae3578b48259912d288d0cecfcb132a035)
* fix(openrouter): bound video catalog JSON reads (#96505)
(cherry picked from commit 5715b5500067e4af80ca40da10775de4b3648cea)
* fix(speech): bound TTS/STT voice-list and transcription JSON response reads (#96496)
Route success JSON reads through readProviderJsonResponse (16 MiB cap) in
azure-speech, elevenlabs, microsoft, minimax/tts, xai/stt, and
openrouter/media-understanding to prevent OOM from oversized or hostile
endpoint responses. Mirrors the response-limit campaign already applied to
other provider paths.
AI-assisted.
Co-authored-by: Cursor <[email protected]>
(cherry picked from commit 66e2fcc6f83eb6aef394401a19342d7af19b1478)
* fix(github-copilot): bound model discovery and embeddings JSON response (#96499)
* fix(github-copilot): bound model discovery and embeddings JSON response reads
The GitHub Copilot embeddings plugin already bounds its error response
bodies via readResponseTextLimited, but the success JSON reads for both
model discovery and the embeddings call used unbounded response.json().
Route both through readProviderJsonResponse (16 MiB cap).
Update isCopilotSetupError to recognise the new error label prefix so
auto-selection still falls through on malformed discovery responses.
Update tests to use proper Response objects and the new error messages.
AI-assisted.
Co-authored-by: Cursor <[email protected]>
* fix(github-copilot): use memory embedding response cap
Signed-off-by: sallyom <[email protected]>
---------
Signed-off-by: sallyom <[email protected]>
Co-authored-by: Cursor <[email protected]>
Co-authored-by: sallyom <[email protected]>
(cherry picked from commit 1aa7cafc35a1aaaf1cd2f9b905d6cca2603ba994)
* fix(image-gen): bound image generation provider JSON response reads (#96495)
* fix(image-gen): bound image generation provider JSON response reads
Route success JSON reads through readProviderJsonResponse (16 MiB cap)
in openrouter, google, fal, minimax, openai, and vydra image generation
providers to prevent OOM from oversized or hostile endpoint responses.
Mirrors the response-limit campaign already applied to other provider paths.
AI-assisted.
Co-authored-by: Cursor <[email protected]>
* fix(image-gen): size bounded JSON caps for inline image payloads
Signed-off-by: sallyom <[email protected]>
---------
Signed-off-by: sallyom <[email protected]>
Co-authored-by: Cursor <[email protected]>
Co-authored-by: sallyom <[email protected]>
(cherry picked from commit 527f8f0cbba1b5653dc990fd368c004f03803cf8)
* fix(google-media): bound JSON response reads (#96920)
* fix(google-media): bound JSON response reads
* test(google): relax media response cap assertion
---------
Co-authored-by: Vincent Koc <[email protected]>
(cherry picked from commit a7bfc06f4597ee946cbc066cb41750a7e8f59c52)
* fix(google): bound TTS success JSON response reads (#96984)
(cherry picked from commit 5ccfc97b319ee627bd84710ceb4cd1f81b0088f0)
* fix(clickclack): bound REST success JSON response reads (#96970)
* fix(clickclack): bound REST success JSON response reads
* test(clickclack): harden response cap proof
---------
Co-authored-by: Vincent Koc <[email protected]>
(cherry picked from commit f4fa10c2c5acae26156868fe50f01d52a464f4b1)
* Fix/discord bound probe getme json reads (#97278)
* fix(discord): bound probe getMe JSON response reads
* test(discord): add oversized probe getMe JSON regression
* test(discord): add loopback proof for bounded probe getMe reads
* fix(scripts): satisfy oxlint in discord probe proof script
* test(discord): keep probe proof in focused coverage
---------
Co-authored-by: NIO <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 7ba9212665a728993550a65ef5d8fdd235d4a160)
* Fix/zalo bound api json response reads (#97277)
* fix(zalo): bound Bot API JSON response reads via readProviderJsonResponse
* test(zalo): keep API proof in focused coverage
---------
Co-authored-by: NIO <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 38ddcef78f072d647136a1e28bf7383b0e203a37)
* fix(embedding): bound OpenAI-compatible embedding response reads (#96868)
* fix(embedding): bound OpenAI-compatible embedding response reads
* test(embedding): avoid loop-condition lint in stream proof
(cherry picked from commit f1e4980a9705dd0649946876c9a40b15d2809d24)
* fix(mattermost): bound successful REST JSON/text response reads (#96033)
* fix(mattermost): bound successful REST JSON/text response reads
The Mattermost REST client already bounds error bodies
(readResponseTextLimited) and streams guarded responses without buffering,
but the success path still called `await res.json()` / `await res.text()`,
reading the whole body into memory before parsing. A self-hosted or
compromised Mattermost server can return an arbitrarily large (or
never-terminating, content-length-less) JSON/text body and force the plugin
to buffer it unbounded.
Read successful JSON through the shared readProviderJsonResponse (16 MiB cap,
cancels the stream and throws a bounded error on overflow, same as the
provider HTTP path) and cap non-JSON success bodies with readResponseTextLimited.
uploadMattermostFile's file-info JSON is bounded the same way.
Symmetric follow-up to the #95103 / #95108 response-limit campaign.
AI-assisted.
* fix(mattermost): bound probe success JSON reads
* fix(mattermost): reject oversized success text bodies
(cherry picked from commit 9241b9701d9c14f4d3b3a176071d95e9c21de4ac)
* fix(minimax): bound video control response reads (#96889)
* fix(minimax): bound image/video success response reads
MiniMax image generation and video generation (task submit + status poll)
read their success responses through unbounded `await response.json()`, so
a misbehaving or hostile endpoint could stream an arbitrarily large body
into memory before parsing and exhaust the process. Read those success
bodies through the shared bounded reader (16 MiB cap, the same limit other
bundled providers and the sibling MiniMax web-search provider already use)
and cancel the stream on overflow. The error-body path is already bounded
via assertOkOrThrowHttpError; this closes the matching success-JSON gap.
MiniMax TTS is already bounded and is left unchanged.
AI-assisted.
* fix(minimax): bound video metadata response reads
* fix(minimax): leave image response sizing to image hardening
* fix(minimax): bound image/video success response reads
MiniMax image generation and video generation (task submit + status poll)
read their success responses through unbounded `await response.json()`, so
a misbehaving or hostile endpoint could stream an arbitrarily large body
into memory before parsing and exhaust the process. Read those success
bodies through the shared bounded reader (16 MiB cap, the same limit other
bundled providers and the sibling MiniMax web-search provider already use)
and cancel the stream on overflow. The error-body path is already bounded
via assertOkOrThrowHttpError; this closes the matching success-JSON gap.
MiniMax TTS is already bounded and is left unchanged.
AI-assisted.
* fix(minimax): bound video metadata response reads
(cherry picked from commit 25e184aeab644b3f1acbef7f00fdd9121fe6d1a4)
* fix(speech): bound TTS response reads (#96874)
(cherry picked from commit 2f851ecfe9df4486878305798775f7e8f04fdf92)
* fix(deepinfra): bound video generation JSON response reads (#97486)
(cherry picked from commit 0d59280131c003e547264c029d6ec4590ae6e108)
* fix(openrouter): bound generation-cost JSON response reads (#97490)
(cherry picked from commit c0883a531de936174cfec903d63e6746730fccd9)
* fix(openrouter): bound video response reads
Route OpenRouter video submit and poll success JSON through the shared bounded provider JSON reader, preserving malformed-response mapping and SSRF request policy coverage.
(cherry picked from commit 48f34b1d4df7755a19894f1e763011bb8bd328ea)
* fix(signal): bound GitHub release info JSON response with readProviderJsonResponse (#97536)
Replace bare `await response.json()` in `installSignalCliFromRelease` with
`readProviderJsonResponse` (16 MiB cap, stream cancel on overflow). The
external GitHub Releases endpoint can include a large `body` changelog field;
the error path was already guarded but the success path was unbounded.
The existing inner catch continues to convert overflow errors into the
graceful `{ ok: false, error: "Failed to parse signal-cli release info." }` path.
Adds a regression test verifying the stream is cancelled before all chunks are
read on an oversized 20 MiB streaming response.
Co-authored-by: NIO <[email protected]>
Co-authored-by: Cursor <[email protected]>
(cherry picked from commit 51064bda4def47da9864c63eb0bed4e2aa614afb)
* fix(openai): bound embedding-batch and realtime session JSON response reads (#97533)
(cherry picked from commit 4c477ee6321eb628db8231ad370c7b9159d467f0)
* fix(telegram): bound getChat Bot API response reads (#97274)
* fix(telegram): bound getChat Bot API response reads
* fix(telegram): repair getChat bound-read type and proof script lint
---------
Co-authored-by: NIO <[email protected]>
(cherry picked from commit b948c86b2a834701619fb738f5bf3d0aa954f106)
* fix(google): bound embedding-batch JSON response reads (#97535)
* fix(google): bound embedding-batch JSON response reads
* fix(google): repair embedding-batch test types and lint
---------
Co-authored-by: NIO <[email protected]>
(cherry picked from commit 91297bf420822bbfd8883af157fe9d1c77774dde)
* fix(ollama): bound cloud-auth 401 JSON response reads
(cherry picked from commit a82cff8892cd7c581585254308ef7c65f6e4f9c3)
* fix(xai): bound OAuth response reads to prevent OOM (#97615)
Replace unbounded response.text() in readResponseBody and
response.json() in the device-code polling loop with
readResponseWithLimit (16 MiB cap).
(cherry picked from commit d5aca1d6d2d78e821d06d6900ae3b005e2af8942)
* fix: bound APNs relay response body so an oversized relay reply can't exhaust gateway memory
Reviewed and accepted after live preflight: mergeable clean, checks passing, no unresolved review threads.
(cherry picked from commit 89b5a879090ae693153e50586d191654a0f60113)
* fix(runway): bound video create/poll response reads
Reviewed and accepted after live preflight: mergeable clean, checks passing, no unresolved review threads.
(cherry picked from commit 63b089383adf50be175322414166f57212cc34cc)
* fix(openai): bound video create-submit response reads
Reviewed and accepted after live preflight: mergeable clean, checks passing, no unresolved review threads.
(cherry picked from commit f0e2f7b4f5ae61cf3ec08521e1c46f462ee3e6a0)
* fix(together, pixverse): bound video response reads
Reviewed and accepted after live preflight: mergeable clean, checks passing, no unresolved review threads.
(cherry picked from commit ca1bc5875913f865388f365d9906e8f8e0a5d659)
* fix(fal): bound music/video generation response reads
Reviewed and accepted after live preflight: mergeable clean, checks passing, no unresolved review threads.
(cherry picked from commit ce1217a49ca619d6e4513ac803e4b2c71e892dba)
* fix(vydra): bound control response reads
Reviewed and accepted after live preflight: mergeable clean, checks passing, no unresolved review threads.
(cherry picked from commit 74a9beb83f515c805b41d12bdeddf33b7128490f)
* fix(video-generation): bound DashScope JSON response reads
(cherry picked from commit 238398e33147338865ac957f32d8b7dc32674830)
* fix(comfy): bound JSON response reads via readProviderJsonResponse
(cherry picked from commit bf66b4e1ea7ef85e4677af2e838933efba3442e4)
* fix(github-copilot): bound login JSON response reads
(cherry picked from commit 748bea34341678cda7e664a01ee821d7a301a181)
* fix(xai): bound video response body reads
(cherry picked from commit 46e119074ef0f953b82401d08dd76e62031cf78d)
* fix(provider-usage): bound usage response body reads
(cherry picked from commit db2786bde1055fcc27b0be1243c662fbd797efbc)
* fix(agents): bound WHAM usage probe JSON response reads
(cherry picked from commit 0ce10d779302bb12f3f287bb519299a11142fb5b)
* fix(discord): bound PluralKit and voice-message JSON reads
(cherry picked from commit 597a0ba43ca3bbc35b33216abefc37449ea279ec)
* fix(nextcloud-talk): bound bot preflight error reads (#97811)
Co-authored-by: Pick-cat <[email protected]>
(cherry picked from commit 09167523bf4092aba45ec7b28f4d7b1ea1d23c1b)
* fix(pdf): guard native provider requests (#97872)
* fix(pdf): guard native provider requests
* fix(pdf): preserve configured origin trust
* fix(pdf): preserve resolver compatibility
(cherry picked from commit b7b2e1f77eb4d2d58982db065642d70db50d4c8c)
* fix(cli): bound docs search API response reads with committed test (#98188)
(cherry picked from commit f284ce3b4df717dde2bbec22f840906c31bcb1f0)
* fix(moonshot): bound video description JSON response reads (#96502)
* fix(moonshot): bound video description JSON response reads
The Moonshot video description endpoint used an unbounded await res.json()
to parse the media understanding response. Route through
readProviderJsonResponse (16 MiB cap) to match the bound already in
place for other media understanding providers (xai, openrouter).
AI-assisted.
Co-authored-by: Cursor <[email protected]>
* test(moonshot): add bounds and malformed-JSON coverage for video description
---------
Co-authored-by: Cursor <[email protected]>
(cherry picked from commit 765d05c2e4a891873b782c969957c6eddc163405)
* fix(minimax): bound OAuth JSON response via shared provider reader (#96322)
Use readProviderJsonResponse (shared 16 MiB default cap) instead of
unbounded response.json() for MiniMax OAuth authorization code endpoint.
Signed-off-by: lsr911 <[email protected]>
Co-authored-by: Claude <[email protected]>
(cherry picked from commit 4a96c066154281f2a87bb399722e3e5183ec6c71)
* fix(openai): bound embedding batch file downloads (#98554)
* fix(openai): bound embedding batch file downloads
* fix(openai): bound batch output records
---------
Co-authored-by: Vincent Koc <[email protected]>
(cherry picked from commit ce4a259485f25e238929ba1cc0c17ffbdd393554)
* fix(memory): preserve UTF-8 when qmd output splits across pipe chunks (#107263)
* fix(memory): preserve UTF-8 across fragmented qmd output chunks
* fix(memory): decode qmd streams at UTF-8 boundary
Co-authored-by: wahaha1223 <[email protected]>
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 7f36f490528b1466dfad05a491bd253e9cbf03f5)
* fix(synology-chat): bound outbound NAS response bodies to prevent Gateway OOM (#105089)
* fix(synology-chat): settle user_list overflow without hanging
Cap reads at 1 MiB with Buffer concat. On overflow, finish the promise
before destroy() — bare destroy often skips end/error and hung the test.
* fix(synology-chat): share bounded user-list reader
Co-authored-by: zw-xysk <[email protected]>
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 30c257f6b45ea9002a70652fb0170ba33e3eb068)
* fix(extensions): prevent corrupted UTF-8 in api.exec output (#108365)
* fix(extensions): preserve split UTF-8 in api.exec
* test(agents): cover incomplete exec UTF-8 at EOF
Co-authored-by: zhang-guiping <[email protected]>
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 3b51889c3bbf6801e0d523e73f2437186831ff7c)
* fix(sessions): stop leaking file path as prompt content on read failure (#108546)
* fix(sessions): stop leaking file path as prompt content on read failure
When readFileSync fails for a valid file path, resolvePromptInput returns
the raw path string as prompt content instead of undefined. This injects
filesystem paths into the LLM context. The existing console.error warning
still fires; the caller already handles undefined returns correctly.
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
* test: cover unreadable prompt paths
* test: use tracked resource loader temp dirs
---------
Co-authored-by: Claude Sonnet 4.6 <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit c9248192926ac164fe4a91af3fe72555a7512c67)
* fix(clickclack): bound websocket handshake waits at 30s (#106485)
* fix(clickclack): bound websocket handshake waits at 30s
* test(clickclack): prove WebSocket handshake deadline
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 3eec404aab29e9dd78d2e69c9b4e2985f6a326fe)
* fix(memory-core): write MEMORY.md atomically during short-term promotion (#108397)
* fix(memory-core): write MEMORY.md atomically during short-term promotion
applyShortTermPromotions rewrote MEMORY.md with a single non-atomic
fs.writeFile, which truncates the file before streaming the new content.
An OS write failure part way through (for example EFBIG on a size-limited
or full volume) left MEMORY.md truncated to the bytes written before the
failure, permanently dropping user long-term memory. The dreaming cron
path invokes this writer automatically, and the recall store is only
updated after the write, so the promotion stays eligible and the next
run reads the already-truncated file.
Route the write through replaceFileAtomic (temp file, fsync, atomic
rename), the same durable-write helper the sibling DREAMS.md writer in
this extension already uses. On failure the temp file is discarded and
the existing MEMORY.md is left untouched; on success the content and the
existing file mode are preserved.
* fix(memory-core): harden atomic promotion durability
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 0317d7e628010d6e51a2a09f9d7e9af677216981)
* fix(agents): bound base64 image input before decode in tool-image sanitizer (#105086)
* fix(agents): bound base64 image input before decode in tool-image sanitizer
* fix(agents): lower input-size cap to 10MB for OOM headroom
* fix(agents): align tool-image input-cap comment with 10 MiB ceiling
* fix(agents): typecheck-safe access in tool-image input-cap test
* test(agents): exercise real tool image input cap
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit b85531c62f7565856219f652bf9fe6cfa1940b1f)
* fix(qqbot): bound tail log reads to actual bytes returned by fs.readSync (#108955)
* fix(qqbot): bound tail log reads to actual bytes returned by fs.readSync
* fix(qqbot): satisfy knip deadcode check for testing export
Add __testing re-export and test-api.ts barrel so knip traces the testing export through a recognized entry point.
* fix(qqbot): restore testing export alongside __testing re-export
Both exports are needed: testing for proof scripts, __testing for knip tracing.
* fix(qqbot): remove unused __testing re-export from log-helpers
test-api.ts already imports testing and re-exports as __testing. The extra re-export in log-helpers.ts was unused by production code.
* fix(qqbot): retry short log tail reads
* test(qqbot): keep short-read seam private
Co-authored-by: RileyJJY <[email protected]>
* test(qqbot): exercise short reads through log export
Co-authored-by: RileyJJY <[email protected]>
---------
Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: RileyJJY <[email protected]>
(cherry picked from commit 3f89aae98da9229ea7cf9bfc6215aaeae01a8796)
* fix(proxy-capture): guard body-less arrayBuffer reads against oversized responses (#101268)
* fix(proxy-capture): guard body-less arrayBuffer reads against oversized responses
* fix(proxy-capture): exercise body-less fallback in bounded read tests
New tests use mock clones with body: null plus arrayBuffer spies to
prove the content-length precheck guards the !body path. A real
Response clone exposes body.getReader in Node 24, so the prior test
only exercised the streaming branch and would stay green even if
the precheck were deleted.
* chore: retrigger CI
* fix(proxy-capture): reject non-safe content-length before arrayBuffer (#101268)
ClawSweeper P2: the body-less fallback used Number(content-length), so a
huge digit-only Content-Length value could overflow to Infinity, bypass the
Number.isFinite guard, and still call arrayBuffer() — leaving an OOM path in
the hardening PR.
Add declaredContentLengthExceedsCap, which accepts only plain digit strings,
treats any value longer than Number.MAX_SAFE_INTEGER as oversized, and
compares safe-integer parsed values against the cap. Non-numeric or malformed
values fall through to the post-read length check.
Adds a regression test for a 100-digit Content-Length that would previously
have bypassed the guard.
* fix(proxy-capture): normalize zero-padded Content-Length before digit-count guard
* fix(proxy-capture): fail closed without response streams
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 7cde0ac8c0a821e3641a3418bddad41dda6c4c7b)
* fix(lmstudio): cancel model discovery response body on non-ok (#109718)
* fix(lmstudio): cancel model discovery response body on non-ok
Wire the direct-fetch release hook to cancel unread bodies so failed
model discovery releases the TCP connection instead of leaving it open.
Co-authored-by: Cursor <[email protected]>
* refactor(lmstudio): unify response cleanup
Co-authored-by: Zeng Wen <[email protected]>
---------
Co-authored-by: Cursor <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: Zeng Wen <[email protected]>
(cherry picked from commit 1573c78f5b849d1fedf12a78aa029c069c44ffca)
* fix(msteams): cancel non-OK consent upload response body before throwing (#109701)
* fix(msteams): cancel non-OK consent upload response body before throwing
* fix(msteams): release all consent upload responses
Cancel unread response bodies after successful uploads as well as failed uploads, and fold the lifecycle assertions into the existing status-path tests.
Co-authored-by: Monkey-wusky <[email protected]>
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 9b238a792788474134513f7864c86dd6fd4dcd4f)
* fix(discord): honor caller abortSignal during 429 retry backoff (#109913)
* fix(discord): honor caller abortSignal during 429 retry backoff
* test(discord): prove 429 backoff abort through a real loopback server
* test(discord): make retry abort proof deterministic
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 40acbb05c9d7cf6783bb4cf4a99f332ef14cde0a)
* fix(auto-reply): treat U+2028/U+2029 as paragraph boundaries when chunking (#103518)
* fix(auto-reply): treat U+2028/U+2029 as paragraph boundaries when chunking
chunkByParagraph normalized only CR/CRLF before blank-line paragraph detection,
so model output using Unicode LINE/PARAGRAPH SEPARATOR (U+2028/U+2029) instead
of a blank line was not split at those boundaries and fell back to length-based
splitting. Normalize U+2028/U+2029 to \n alongside CR/CRLF, matching how the
Control UI markdown renderer handles them.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
* fix(auto-reply): normalize U+2028 as line break, U+2029 as blank-line paragraph boundary
Distinguish U+2028 (LINE SEPARATOR) from U+2029 (PARAGRAPH SEPARATOR):
U+2029 becomes \n\n (blank line — paragraph boundary) while U+2028
becomes \n (single newline — intra-paragraph line break).
The original fix mapped both to \n, so standalone U+2029 still
produced single-line text without a blank-line gap — paragraph
detection failed. The combined U+2028
input accidentally
produced the right blank-line sequence, which masked the bug.
Adds individual tests for lone U+2029 (splits at paragraph boundary),
lone U+2028 (stays within paragraph), and consecutive U+2028
(combined blank line — matches \n\n behavior).
* test(auto-reply): simplify Unicode separator cases
---------
Co-authored-by: Claude Opus 4.8 <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 3a4e2ef65f418d3fdc79cebcbbd698a7aa8b9344)
* fix(synology-chat): bound user_list fetches with a wall-clock deadline (#109111)
* fix(synology-chat): bound user_list fetches with a wall-clock deadline
* refactor(synology-chat): keep deadline internal
* style(synology-chat): format deadline proof
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit f7cc0ef8380efb0d5781239458f5f5fa6688ea41)
* fix(security): bound plugin manifest reads in audit deep scan (#101773)
(cherry picked from commit aa0c92186b67c55d6f43ec6611ff689b66b65fd6)
* fix(heartbeat): bound HEARTBEAT.md file read size (#101775)
* fix(heartbeat): bound HEARTBEAT.md file read size
* fix(heartbeat): follow symlinked HEARTBEAT.md while bounding reads
* fix(heartbeat): warn operators when oversized HEARTBEAT.md is skipped
(cherry picked from commit 993c975f5738dbcd17882db0fafcb9d1e403607e)
* fix(plugins): bound marketplace manifest file reads (#101774)
* fix(plugins): bound marketplace manifest file reads
* fix(plugins): distinguish oversized marketplace manifest from other read failures
* fix(plugins): follow symlinked marketplace manifests while bounding reads
* test(plugins): cover oversized symlinked marketplace manifest target
(cherry picked from commit 35754a63ccafc41122085bc9467fd3e1dbc8d4f3)
* fix(plugins): bound plugin manifest metadata file reads (#110036)
* fix(plugins): bound plugin manifest metadata file reads
* fix(plugins): use correct Error type check in oversized manifest catch
readRegularFileSync throws a plain Error (not RangeError) when the file
exceeds maxBytes. Change the catch-block type check from RangeError to
Error to properly detect oversized plugin manifests and emit the
subsystem warning.
* test(plugins): exercise valid oversized manifests
Co-authored-by: 陈宪彪0668000387 <[email protected]>
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 2e21d53c84ec88433dac587bb97f2796e63b20ca)
* fix(gateway): bound BOOT.md file read size (#101776)
* fix(gateway): bound BOOT.md file read size
* fix(gateway): treat non-regular BOOT.md as empty/missing and add coverage
* fix(gateway): preserve non-size BOOT.md failures while bounding oversized reads
* fix(gateway): preserve readable BOOT.md symlink behavior
* fix(gateway): treat dangling BOOT.md symlink as missing
* fix(gateway): report oversized BOOT files
* fix(gateway): preserve missing BOOT race behavior
Co-authored-by: 陈宪彪0668000387 <[email protected]>
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit e22c2dfaaa890d1d689f894a46c6cc0a4339d301)
* fix(agents): bound IDENTITY.md reads to prevent OOM (#101447)
* fix(agents): bound IDENTITY.md reads to prevent OOM
* fix(agents): reuse shared workspace bootstrap file size limit for IDENTITY.md
* chore: retrigger CI after cancelled gate run
* chore: retrigger CI after runner tooling flake
* chore: retrigger CI after main typecheck fix and runner brew flake
* fix(identity): bound explicit --identity-file imports through shared loader
* fix(agents): unexport parseIdentityMarkdown to satisfy production deadcode scan
* chore: retrigger CI after stuck previous run
* chore: retrigger CI after stuck checks-node-compact-large-4 run
* chore: retrigger CI after stuck checks-node-compact-large-4 and flaky small-9
* fix(agents): report oversized identity file size to the user
When `--identity-file` points at a file exceeding the size limit, the
`no identity data found` error is misleading. Re-throw the fs-safe
`exceeds` error with a human-readable message so the CLI surfaces the
actual cause.
* fix(agents): update test assertion for oversized identity diagnostic
* fix(agents): attach caught error as cause in oversized identity diagnostic
* fix(agents): preserve symlinked identity files
* fix(agents): classify identity size errors exactly
Co-authored-by: 陈宪彪0668000387 <[email protected]>
* fix(agents): preserve supported identity avatars
Co-authored-by: 陈宪彪0668000387 <[email protected]>
* fix(agents): keep identity limit private
Co-authored-by: 陈宪彪0668000387 <[email protected]>
---------
Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 80f6acc8def890c5f54c919d93dc5d79cadf09ea)
* fix(config): bound state-directory .env file reads with size limit (#109487)
* fix(config): bound state-directory .env file reads with size limit
Replace unbounded fs.readFileSync with readRegularFileSync capped at
1 MiB (MAX_STATE_DIR_DOTENV_BYTES) so an oversized .env file is
rejected before loading the entire file into memory.
Resolve symlinks via fs.realpathSync before the bounded read so
symlinked .env files keep working — matching the marketplace.ts
pattern for bounded manifest reads.
* fix(config): add diagnostic when oversized state .env is skipped
Log a warning when the state-directory .env file exceeds the 1 MiB
limit so operators know a configured file was skipped — matching the
pattern from #108200 (plugin catalog bounded read diagnostic).
* fix(config): bound global runtime dotenv file reads with size limit
Replace unbounded fs.readFileSync in readDotEnvFile with readRegularFileSync
capped at 1 MiB so CLI/Gateway startup dotenv loading also gets the bounded
read protection — not just the state-dir service-env path.
This addresses the P1 review finding that the original fix only capped the
helper-level reader while the shared readDotEnvFile used by
loadGlobalRuntimeDotEnvFiles was still unbounded.
(cherry picked from commit 0c221d2b4f7e1f310feb497c9c24cddfae48c181)
* fix(nostr): profile imports no longer crash on invalid fields (#110684)
* fix(nostr): profile imports no longer crash on invalid fields
* test(nostr): define invalid profile import policy
* test(nostr): cover invalid imported URL types
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 9fe92cf5ce918799ffa771e272faaae551b29b26)
* fix(tlon): preserve shutdown when body cancellation fails (#111106)
* fix(tlon): observe shutdown body cancellation failures
* test(tlon): streamline shutdown cleanup proof
* test(tlon): narrow shutdown fixtures
---------
Co-authored-by: ZengWen-DT <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 5bb969f7de6cb07747e746e90d6444bb935dcb8e)
* fix(qqbot): cancel non-OK direct-upload response body before throwing (#110008)
(cherry picked from commit 17643f385085d68d104d216eae1a08785da4b3ec)
* fix(tui): prevent memory growth during repeated selector searches (#109451)
* fix(tui): bound searchable select regex cache
* fix(tui): discard stale selector regexes
Co-authored-by: wahaha1223 <[email protected]>
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 80c16ecc8097793166e4c8418b6090fc09e3a90a)
* fix(tlon): bound Urbit auth response body drain to prevent OOM (#109697)
* fix(tlon): bound Urbit auth response body drain to prevent OOM
Replace the unbounded response.text() body drain (discarded after reading
to finalize set-cookie headers) with a streaming reader capped at 64 KiB.
When no body stream is available, fall back to text() for compatibility.
A hostile or misconfigured Urbit endpoint could previously stream an
arbitrarily large body into memory during login.
Co-Authored-By: Claude <[email protected]>
* fix(tlon): add curly braces to drain loop for lint compliance
* fix(tlon): remove unbounded text() fallback, cancel reader in finally
Remove the unbounded response.text() body-less fallback path. When no body
stream is available, there is nothing to drain — cookie headers are already
finalised. Move reader.cancel() into a finally block so the reader is
released even when read() throws.
Co-Authored-By: Claude <[email protected]>
---------
Co-authored-by: Claude <[email protected]>
(cherry picked from commit 4e9b1f4775b0724cc7f28cfe6db79baec8f7fa62)
* fix(tlon): cancel failed auth response bodies (#112059)
(cherry picked from commit e024aa38b9f706f910cc8235a9e8e7aaea9c2336)
* fix(memory-core): guard invalid timestamps in dreaming rankings (#110537)
(cherry picked from commit 1e4e588142fdb1bea797363c38621f293406d0aa)
* fix(security): restore filesystem API after bounded manifest read
Source: 95d632e644b3c826ca74b76494857f9e9a0fd4e8
Target adaptation: this release line does not yet have the skill-file audit path, so only restore the fs/promises import still required by its other deep audit helpers after d5b0218b7ec removed it.
* test(proxy-capture): adapt bounded capture coverage to release test harness
Source: 7cde0ac8c0a821e3641a3418bddad41dda6c4c7b
Target adaptation: import vi explicitly and model Buffer payload persistence so the null-body assertion exercises the shipped store contract.
* style: format backported provider response bounds
* fix: correct release-line backport adaptations
Retain the existing Synology client export and remove source-context imports/constants that have no caller on the .34 release line.
* fix(retry): support abortable operation backoff
Target adaptation for source 40acbb05c9d7cf6783bb4cf4a99f332ef14cde0a: the .34 retry utility predates the per-operation sleeper hook required by Discord's abortable 429 backoff.
* fix(clickclack): cap inbound WebSocket frames
Target adaptation for source 3eec404aab29e9dd78d2e69c9b4e2985f6a326fe: retain the source's 16 MiB ws cap alongside the handshake deadline; this release line predates its shared inbound JSON limit constant.
* fix(openai): bound blank streamed batch records
Target hardening for source ce4a259485f25e238929ba1cc0c17ffbdd393554: count blank JSONL records so newline-only responses cannot bypass the existing output record cap.
* fix(openai): complete blank batch record backport
* fix(browser): run mutation guard before JSON parsing (#104677)
* fix(browser): run mutation guard before JSON parsing
* test(browser): cover auth in mutation guard ordering
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 85a8f4ba8d9fe0fe9eec40173da28d4f59d51d01)
(cherry picked from commit 36ef64341bf8355c3832e56b8fb7ece3b4a0c26f)
* fix(tts-local-cli): handle stdout/stderr stream errors in speech provider (#102347)
* fix(tts-local-cli): handle stdout/stderr stream errors in speech provider
CLI TTS speech provider spawns a child process to generate audio and
registers stdout/stderr data listeners but omits stream error handlers.
stdout carries synthesized audio data. A pipe error mid-generation must
reject the promise so the caller does not silently receive truncated
audio when the child later exits zero. stderr carries diagnostic logs
only — errors there are benign and should not crash the provider.
Apply separate strategies matching vincentkoc's requirement:
- stdout (audio): error → reject(Promise) — surface the failure
- stderr (diagnostic): error → ignore — does not affect audio output
* fix lint: remove unused signal param from mock kill()
* fix(tts-local-cli): contain child stream failures
Co-authored-by: 赵旺0668001248 <[email protected]>
* chore(tts-local-cli): keep release notes in PR body
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 9fa913740d41bb6fdb546514202d52bfd7806e79)
(cherry picked from commit 66099c79c0e1d82b424c63af60d3060c08787db1)
* fix(tts-local-cli): preserve file output on stream errors
Co-authored-by: 赵旺0668001248 <[email protected]>
(cherry picked from commit 45d15aabf9e9b2ab89d33aeca3c650de984cd4d9)
(cherry picked from commit 0d836bb58024cae18b7fc46df40806950e27e63b)
* fix(azure-speech): add timeout to voices list request (#102984)
* fix(azure-speech): add timeout to voices list request
* test(azure-speech): simplify voice timeout proof
* test(azure-speech): mark voice keys as placeholders
---------
Co-authored-by: chengzhichao-xydt <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 1ed04910e2de695905431a64cb55f383252b9f8c)
(cherry picked from commit fa440cf51c95ad2ef4608f38c846e4c425f0ceee)
* fix(minimax): add timeouts to OAuth HTTP requests (#102862)
* fix(minimax): add timeouts to OAuth HTTP requests
* fix(minimax): remove duplicate OAuth abort signals
* refactor(minimax): keep OAuth timeout internal
* test(minimax): make OAuth timeout proof deterministic
---------
Co-authored-by: llagy009 <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 8f8aad9ae69253ecf91526a48f97dcb8d2d43acf)
(cherry picked from commit 3cc03752fd349668c418580389afcc0caaababca)
* fix(google-meet): handle stdout/stderr stream errors in local audio bridge (#101596)
* fix(google-meet): handle stdout/stderr stream errors in local audio bridge
* test(google-meet): prove command bridge stream errors
(cherry picked from commit 5fd5bf2aee1b803e95a8c985b90f117ced7a21e9)
(cherry picked from commit e61d2f9d37044d463e22691ee87bc5cb39bdfbf0)
* fix(google-meet): bound Calendar event lookups (#102157)
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 28bbbe4f603c17ca770399f044bd8f25c2c8685f)
(cherry picked from commit fe03932992ab65ca9d7d0f598aa31c0c8679e49c)
* fix(matrix): handle stdout/stderr stream errors in dependency commands (#101597)
* fix(matrix): handle stdout/stderr stream errors in dependency commands
* fix(matrix): type stream-error test process kill
* fix(matrix): harden dependency stream errors
* test(matrix): fix dependency stream test typings
(cherry picked from commit 35d5ea069ae90d9377df69dbdb5c636c05f58ecd)
(cherry picked from commit 141a2e76420dd593b2f3efdd7c9cb8aac2a89ef5)
* fix(matrix): handle event decryption errors during sync (#94416)
Co-authored-by: mushuiyu886 <[email protected]>
(cherry picked from commit 4200745a983534896ef30133af6e23aa00ae59b8)
(cherry picked from commit 663134e30c8b265f89ffd692f6f10f795c2b3735)
* fix(zalouser): clear probe timeout after auth resolves (#101649)
(cherry picked from commit ca8f6e1efd62ea98d4fa496a3e3663ed2d6eba52)
(cherry picked from commit b66d2abccd5ffe0a75f04bf8e51cdb99d89c4456)
* fix(msteams): lowercase content type so attachment classification is case-insensitive (#102431)
* fix(msteams): lowercase content type so attachment classification is case-insensitive
normalizeContentType only trimmed its input. MIME types are case-insensitive
(RFC 2045), and MS Teams relay payloads (SharePoint, OneDrive, Bot Framework CDN)
routinely emit mixed-case values such as "Image/PNG" or
"Application/Vnd.Microsoft.Teams.File.Download.Info". Every downstream
comparison in the attachments module assumes a lowercased value
(startsWith("image/"), === "application/vnd.microsoft.teams.file.download.info",
startsWith("text/html")), so a mixed-case attachment was silently misclassified:
images became documents, HTML bodies were skipped, and file-download candidates
were not resolved.
Lowercase in normalizeContentType so all six call sites match. The sibling
inferPlaceholder in the same file already lowercases via
normalizeLowercaseStringOrEmpty, so this aligns the two paths.
Co-Authored-By: Claude <[email protected]>
* fix(msteams): route HTML text extraction through normalizeContentType
extractTextFromHtmlAttachments guarded its loop with an exact
`attachment.contentType !== "text/html"` check, which is the same
case-sensitivity gap the rest of the PR closes via normalizeContentType.
A mixed-case "TEXT/HTML" attachment (common from Teams relays; MIME types are
case-insensitive per RFC 2045) was skipped, so a message whose only body text
lived in such an HTML attachment entered the agent path with empty text.
Route the guard through normalizeContentType so mixed-case HTML attachments
reach the body extractor. Export the function and add regression coverage for
mixed-case / whitespace-padded / object-content / non-HTML cases.
Co-Authored-By: Claude <[email protected]>
* fix(msteams): preserve MIME parameter case
---------
Co-authored-by: Claude <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit e6a2136c3a0b12f124fb3327518244a79d872818)
(cherry picked from commit bdaf9d91415815ec870236bd1261f5ad44759e10)
* fix(msteams): bound team group lookup cache (#102814)
Co-authored-by: sunlit-deng <[email protected]>
(cherry picked from commit f6b99012435391f18b701330c7b6f40248e6b61c)
(cherry picked from commit 1af683390d2502256eea35d157ea62015d8d2f28)
* fix(tlon): cap SSE payload JSON.parse at 16 MiB to prevent OOM (#101274)
* fix(tlon): cap SSE payload JSON.parse at 16 MiB to prevent OOM
* fix(tlon): cap SSE stream buffer and JSON.parse at 16 MiB to prevent OOM
* chore(tlon): add production-style SSE bounded proof script (#101274)
Adds extensions/tlon/proof-sse-bounded.mts which drives the real
UrbitSSEClient.processStream and processEvent against Node Readable streams
(not unit-test mocks) to demonstrate:
- normal SSE events are still delivered through the stream path;
- an unterminated stream that would grow beyond 16 MiB is rejected before
unbounded accumulation;
- a single SSE payload above 16 MiB is rejected before JSON.parse.
The script passes on this branch and fails 2/3 assertions when run against
origin/main's sse-client.ts, providing the before/after proof ClawSweeper
requested.
* chore(tlon): fix oxlint catch type in proof script (#101274)
* fix(tlon): reject oversized SSE chunk before buffer concatenation
Move the stream byte-limit check before buffer += chunkStr so a
single oversized chunk never lands in the pending buffer. The old
guard ran after concatenation, which still allowed the memory spike
this hardening is meant to prevent.
Add a single-oversized-chunk test to prove the guard fires before
the chunk is concatenated into the pending buffer.
Co-Authored-By: Claude Opus 4.7 <[email protected]>
* chore(tlon): remove PR-specific SSE bounded proof script
The proof script was review-only validation for #101274. Durable behavior
coverage lives in sse-client.test.ts (stream buffer bounding, oversized
chunk rejection before concatenation, 16 MiB boundary, normal delivery,
1000 small events). Per ClawSweeper P3 finding, drop the one-off script
from the plugin tree.
* fix(tlon): bound SSE event buffering safely
* test(tlon): avoid unsafe optional chaining
* fix(tlon): count split Unicode at SSE limit
* fix(tlon): parse split SSE delimiters at limit
---------
Co-authored-by: Claude Opus 4.7 <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 1710ccad2977f39d36e8c6a9aaa908bcd0ad785b)
(cherry picked from commit 938ba5d7fa21057b5be935b8a38a69b4ea0882cf)
* fix(inworld): add timeout to voices list request (#102965)
* fix(inworld): add timeout to voices list request
* refactor(inworld): reuse guarded timeout test helpers
* test(inworld): rely on harness timeout
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit a11449211a2c18b32c14173ff35f1eae7f714e03)
(cherry picked from commit 42e1ab25c9dab2151440d0afb2d985a365086e70)
* fix(voice-call): add timeout to guardedJsonApiRequest (#102884)
* fix(voice-call): add timeout to guardedJsonApiRequest
* fix(voice-call): bound provider JSON requests
---------
Co-authored-by: chengzhichao-xydt <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 5b916cb319f84cd3cda88f87bf0f2fff5231c7ba)
(cherry picked from commit 2de4b2d0708c46e451ca90bdcfeda329f9a3a318)
* fix(file-transfer): reject oversized inline file writes before node dispatch (#104556)
* fix(file-transfer): cap inline file write payloads
* fix(file-transfer): validate inline base64 before decoding
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit fdf581281746ecc28be6c58d608569313a9e31aa)
(cherry picked from commit 7fc1041e2737d43c38d18a7313678db774333e2d)
* fix(imessage): apply authoritative projection in anchorless recovery (#104218)
* fix(imessage): apply authoritative projection in anchorless recovery
Rebuild on latest main with imessage-only changes: authoritative history
projection (optional destination_caller_id), whole-path inbound proof tests,
and no unrelated restart.ts diff.
Co-authored-by: Cursor <[email protected]>
* fix(imessage): restore recovery cursor API and format tests
Co-authored-by: Cursor <[email protected]>
* test(imessage): add monitor whole-path L3 proof for #104136 recovery
Exercise issue synthetic payloads through monitorIMessageProvider for
authoritative remote reply routing and from-me suppression before dispatch.
Co-authored-by: Cursor <[email protected]>
* fix(imessage): clear stale destination_caller_id when history omits it
Exact-GUID history is authoritative for destination_caller_id. When the
history row omits that outgoing-only field, clear any stale notification
value instead of inheriting it into the recovered inbound projection.
Co-authored-by: Cursor <[email protected]>
---------
Co-authored-by: sm <[email protected]>
Co-authored-by: Cursor <[email protected]>
(cherry picked from commit 6ef3e87583eda04fc3c790b68af86e021e68733c)
(cherry picked from commit 184deb936f55f8137d0842067893f4fe7d57e18d)
* fix(imessage): narrow recovered projection before use (#106022)
(cherry picked from commit 8a2da4b1bf1555fe0bfaf705eb57300c673c81be)
(cherry picked from commit fa55df678fffa3cd716eb29e71be2cd516c54b96)
* fix(twitch): strip internal tool-trace banners from outbound text (#103109)
* fix(twitch): strip internal tool-trace banners from outbound text
Co-authored-by: Masato Hoshino <[email protected]>
* fix(twitch): strip internal tool-trace banners from outbound text
---------
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: Masato Hoshino <[email protected]>
(cherry picked from commit 90b68536c441a301ea8be08d53beb3486b50566b)
(cherry picked from commit afbd2caff18677c15564b51cce0a6b57d0ae6804)
* fix(synology-chat): strip internal tool-trace banners from outbound text (#102925)
* fix(synology-chat): strip internal tool-trace banners from outbound text
* fix(synology-chat): satisfy eslint curly rule
* fix(synology-chat): add sanitizeText to outbound type contract
* fix(synology-chat): use canonical outbound sanitizer type
---------
Co-authored-by: Pick-cat <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 7eb163d90582895150403fa320635a3ef85c81bd)
(cherry picked from commit bdc4440e2f48147a6dca84ae5a4a275a8aa7cdbe)
* fix(tlon): strip internal tool-trace banners from outbound text (#103450)
Route assistant-visible Tlon output through the shared sanitizer and prove the rendered Urbit poke payload for DMs, groups, and media captions.
Co-authored-by: masatohoshino <[email protected]>
(cherry picked from commit 1d205424494de6633857796ff56a3cc09f41552b)
(cherry picked from commit b8b5e9d72b30aadedfd591067d8918ccde6ef951)
* fix(nextcloud-talk): strip internal tool-trace banners from outbound text (#101712)
* fix(nextcloud-talk): strip internal tool-trace banners from outbound text
* fix(nextcloud-talk): sanitize inbound replies
Co-authored-by: liyuanbin <[email protected]>
* test(nextcloud-talk): prove low-level send text preservation
* test(nextcloud-talk): focus inbound sanitizer coverage
* fix(nextcloud-talk): report stripped replies as non-visible
* docs(changelog): note Nextcloud Talk reply sanitization
* chore: keep PR changelog-neutral
---------
Co-authored-by: Pick-cat <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: liyuanbin <[email protected]>
(cherry picked from commit 8a93d288e2f57db13251e7d3f059e72a411b228a)
(cherry picked from commit 3f1774653aefa225eea770b0491008a83e6a142c)
* fix(microsoft-foundry): reject malformed endpoints (#104796)
(cherry picked from commit f5a50db5691b828d830bd33b6ac11a0a99f50c05)
(cherry picked from commit 1bc1ec21b49ee1a1350ad5688fd2420f270acfb9)
* fix(google): bound realtime browser token requests (#106034)
* fix(google): bound realtime browser token requests
* fix(google): satisfy realtime timeout checks
* test(google): use placeholder browser key
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit d33254b72efc4a46824f218c9a43ff830804c96f)
(cherry picked from commit ac8e45955d567dd78e5cf0e02599cb58e008da07)
* fix(github-copilot): bound device flow requests (#103255)
* fix(github-copilot): bound device flow requests
* docs(changelog): note Copilot login timeout
* fix(github-copilot): bound device flow requests
* fix(github-copilot): bound device flow requests
* fix(github-copilot): bound device flow requests
---------
Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 1e3dea75d5690e36f135c39eb4f792815b87c19d)
(cherry picked from commit faa4cf7321ce62b48a5f2c03f198e1691030acf0)
* fix(openai): add timeout to realtime client-secret requests (#102860)
* fix(openai): add timeout to realtime client-secret requests
* test(openai): prove realtime timeout through real guard
* test(openai): route realtime timeout proof through guard
* fix(openai): bound realtime client-secret requests
Co-authored-by: llagy009 <[email protected]>
* fix(openai): align realtime secret timeout
---------
Co-authored-by: llagy009 <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 1836275810cb9cb3f7487cf66a8f7c2f0b16d853)
(cherry picked from commit f2e18c4250592d8dcfc8a7bad17531fb83c3db63)
* fix(memory-core): guard supplement lookup in resolveMemoryReadFailureResult with try-catch (fixes #101809) (#101902)
* fix(memory-core): guard supplement lookup in resolveMemoryReadFailureResult with try-catch (fixes #101809)
* fix(memory-core): preserve primary read errors
---------
Co-authored-by: Vincent Koc <[email protected]>
(cherry picked from commit 1aee742d230e5e50f6f580e19655fa22b21eefee)
(cherry picked from commit 7427f3ef171139edb693dec56aec6141222d293d)
* fix(browser): guard act hooks on current tab URL (#104095)
* fix(browser): guard act hooks on current tab URL
* test(browser): align navigation policy hook mock
* test(browser): exercise real hook navigation guard
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 4bf4cacb37a9c45be03dac105d86352a0e9a0a8f)
(cherry picked from commit 72e4a8b21cee6cb848e50b6a211f1380bd293c6c)
* fix(google-meet): bound Google API requests (#102149)
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 51b4e78c339de48614f5fc578e1d4685c2ca9d8b)
(cherry picked from commit 2bc883a7a23812ca9a610ae6c75119b63100fcf7)
* fix(browser): reject non-page json new targets (#104129)
* fix(browser): reject non-page json new targets
* fix(browser): adopt only validated raw CDP targets
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 7027d2c227281d814266311bebab7581b899d6dc)
(cherry picked from commit 7dea1a3cd7ac5643ec9e5c32f19fc041c5a7fc55)
* fix(agents): skip wham probe when oauth access token is locally expired
(cherry picked from commit e975d49238083091b265748cd6ffb54dc8f022bd)
(cherry picked from commit f5b234db3fc58b4275f4e6b0e65393f3631da659)
* fix(media): accept matching repeated content lengths (#102939)
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 3f68e1b5e3a7a4a66660722ac8fd10c256a63b40)
(cherry picked from commit 7693544cccc64ac359597555185fdc8f530556d0)
* fix: 429 errors without rate-limit wording skip the same-model retry (#99097)
* fix: 429 errors without rate-limit wording skip the same-model retry
Aggregated providers such as OpenRouter provider pools surface transient
upstream throttles as a bare "429 <generic text>" with no RPM/TPM wording
and no Retry-After header. resolveShortWindowRateLimitRetry required one
of those hints, so these errors bypassed the same-model retry ladder and
failed the turn on the first attempt.
Treat a status-prefixed 429 as short-window once the long-window guard
(quota, usage, billing wording) has filtered its phrasings, and let the
existing backoff ladder pace the retry.
* test(agents): streamline bare 429 coverage
---------
Co-authored-by: Altay <[email protected]>
(cherry picked from commit 9330ad86ffdaae640ff778572028644afe29d92a)
(cherry picked from commit f6db641108cd139f211cabeb6834f57916a4f2bf)
* fix(sdk): add prototype-pollution guard to migration config merge (#103059) (#106116)
* fix(sdk): add prototype-pollution guard to migration config merge
mergeMigrationConfigValue and writeMigrationConfigPath had no
isBlockedObjectKey guard, allowing __proto__/constructor/prototype
keys from imported config files to trigger prototype pollution.
Add the same guard used by the sibling config-path writer
(setConfigValueAtPath/parseConfigPath) to reject blocked object
keys before they reach a bracket assignment.
Fixes #103059
* fix(sdk): harden migration config patches
---------
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit b6330edbe4bfd08167a13ff0862a3fcb42ba79d3)
(cherry picked from commit 4fe0cf4ddb1686fe0e824536d281fb4295150468)
* fix(session): swallow onRecordError throw …
AI-assisted: yes. I reviewed and understand the change.
What Problem This Solves
The Urbit login flow in the Tlon extension reads the entire response body via
response.text()solely to flush the stream so thatset-cookieheaders finalize. The body content is discarded. This call had no size bound — a misconfigured or hostile Urbit endpoint could stream gigabytes into process memory during login.Why This Change Was Made
Replace the unbounded
response.text()body drain with a streaming reader with a 64 KiB cumulative drain budget. When the body stream is available (Node 18+, Bun, Deno), the reader accumulates chunks in a bounded loop until the total drained bytes reach the threshold, then the reader is cancelled in afinallyblock so it is released even whenread()throws. The 64 KiB value is an accounting threshold —reader.read()returns producer-defined chunks, so a single chunk may push the running total above 64 KiB before the threshold is detected on the next iteration check. This prevents unbounded accumulation.No unbounded fallback: When no body stream is available, there is no body to drain — cookie headers are already finalised. The previous
response.text()fallback was removed entirely so both code paths are bounded.User Impact
Urbit login no longer risks OOM from an oversized response body. Normal login flows (small JSON responses) are completely unaffected. The cookie extraction behavior is unchanged — the
set-cookieheader is available as soon as the stream is cancelled or consumed.Evidence
node scripts/run-vitest.mjs extensions/tlon/src/urbit/auth.ssrf.test.ts --run: 5/5 passed.git diff --check: passed.Real behavior proof (loopback HTTP with production authenticate())
Two loopback HTTP servers, exercising the real production
authenticate()function:{"case":"real-loopback-small-body","cookie":"urbauth-~zod=proof-token-789; Path=/; HttpOnly","result":"cookie_extracted_successfully"} {"case":"real-loopback-oversized-body","cookie":"urbauth-~zod=oversized-drain; Path=/; HttpOnly","result":"cookie_extracted_after_bounded_drain"}The proof uses the full production path:
authenticate()→urbitFetch()→ SSRF guard → streaming drain → cookie header access. Realnode:httpservers, no stubs.🤖 Generated with Claude Code