Commit Graph

24 Commits

Author SHA1 Message Date
Alix-007 ab74723229 fix(discord): prevent credentials from appearing in non-JSON errors (#119536)
* fix(discord): redact non-JSON API error details

* fix(discord): redact JSON API error details
2026-08-05 20:38:17 -07:00
xingzhou 4fde85fc31 fix(discord): reject malformed UTF-8 API responses (#115918) 2026-07-29 23:18:26 +08:00
chengzhichao-xydt 40acbb05c9 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 <steipete@gmail.com>
2026-07-18 00:09:43 +01:00
Alix-007 bfb4557c83 fix(discord): add timeouts to directory lookup requests (#104290) 2026-07-12 11:54:14 -04:00
Peter Steinberger 7bf80dc2c6 chore(tooling): enforce formatting and refresh TypeScript checks (#104239)
* chore(tooling): enforce current formatter and refresh checks

* chore(tooling): keep release changelog formatter-owned

* chore(tooling): retain compatible Node type surface

* ci: enforce formatting for docs-only changes

* ci: isolate docs formatter check

* chore(tooling): apply updated lint and format rules

* chore(tooling): satisfy updated switch lint

* style(ui): apply Linux formatter layout

* test(doctor): match quiet local audio contribution

* test(doctor): assert quiet output only

* test(doctor): follow restored information contract
2026-07-11 01:09:51 -07:00
lsr911 050e1f3b5c fix(discord): guard JSON.parse against malformed API response bodies (#97889)
* fix(discord): guard JSON.parse against malformed API response bodies

Wrap JSON.parse(text) in requestDiscord with try/catch to prevent a malformed Discord API response body from throwing an unhandled SyntaxError and crashing the process. On parse failure, throw a DiscordApiError with a descriptive message so the caller can handle it gracefully.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: lsr911 <liao.shirong@xydigit.com>

* fix(clawsweeper): address review for automerge-openclaw-openclaw-97889 (validation-1)

* chore: trigger CI re-run for flaky checks-node-compact-small-whole-2

Signed-off-by: lsr911 <liao.shirong@xydigit.com>

* chore: trigger CI re-run for flaky runtime-inventory-drift-check

Signed-off-by: lsr911 <liao.shirong@xydigit.com>

* chore: trigger CI re-run for flaky checks-node-compact-large-whole-1

Signed-off-by: lsr911 <liao.shirong@xydigit.com>

* fix(discord): guard JSON.parse against malformed API response bodies

* fix(discord): guard JSON.parse against malformed API response bodies

---------

Signed-off-by: lsr911 <liao.shirong@xydigit.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
2026-07-01 17:50:01 -07:00
Alix-007 fca15641db fix(discord): bound requestDiscord happy-path response reads to prevent OOM (#97693)
* fix(discord): bound happy-path API response reads to prevent OOM

Replace the unbounded res.text() call in requestDiscord's success path with
readResponseTextLimited capped at 4 MiB. Discord channel message lists and
attachment payloads can accumulate to large sizes; without a cap the process
can exhaust available memory. The error path already used readResponseTextLimited
with DISCORD_API_ERROR_BODY_LIMIT_BYTES — this applies the same guard to the
happy path using a separate DISCORD_API_RESPONSE_BODY_LIMIT_BYTES constant
sized appropriately for valid API payloads.

* test(discord): upgrade to real HTTP server proof for bound requestDiscord

* fix(discord): remove unnecessary type assertion in bound test
2026-06-30 17:46:51 -07:00
Vincent Koc 698efb23a6 fix(discord): bound api error bodies 2026-06-19 15:21:07 +02:00
Peter Steinberger 23716de446 docs: document discord extension sources 2026-06-04 22:06:01 -04:00
Peter Steinberger 4b9a80d895 fix(discord): cap request timeout signals 2026-05-29 16:03:39 -04:00
Peter Steinberger fb37811b65 fix(discord): reject unsafe retry-after delays 2026-05-29 10:58:36 -04:00
Peter Steinberger 5eee488d93 fix: parse discord api retry headers strictly 2026-05-28 14:12:33 -04:00
Peter Steinberger d456dd1bd3 test: tighten command extension helper assertions 2026-05-08 20:50:06 +01:00
Shakker 6451000229 test: tighten discord api request assertion 2026-05-08 18:58:56 +01:00
Peter Steinberger 77a50db9ea feat(qa): add Mantis Discord status reaction scenario (#76747)
* feat(qa): add Mantis Discord status reaction scenario

* fix(qa): retry Discord rate limits in Mantis runs

* refactor(qa): reuse Discord API retry helper

* fix(qa): import Discord API through package surface

* fix(ci): generate Discord boundary declarations

* fix(ci): keep xai boundary overrides stable
2026-05-03 17:00:06 +01:00
Peter Steinberger 950a9b5500 fix(discord): cool down Cloudflare 429 responses 2026-04-30 01:47:02 +01:00
Peter Steinberger f34b41f198 refactor: split plugin sdk test helpers 2026-04-28 01:14:19 +01:00
Vincent Koc eecb36eff4 fix(ci): stabilize zero-delay retry and slack interaction tests 2026-04-04 03:52:07 +09:00
Vincent Koc 6366010884 fix(ci): route extension test helpers through public sdk seams 2026-04-04 00:03:48 +09:00
Peter Steinberger 8e0ab35b0e refactor(plugins): decouple bundled plugin runtime loading 2026-03-29 09:10:38 +01:00
Peter Steinberger b393effba6 test: harden channel suite isolation 2026-03-23 12:57:43 +00:00
Peter Steinberger f9588da3e0 refactor: split plugin testing seam from bundled extension helpers 2026-03-17 01:05:09 -07:00
Peter Steinberger f6868b7e42 refactor: dedupe channel entrypoints and test bridges 2026-03-16 23:52:23 -07:00
scoootscooob 5682ec37fa refactor: move Discord channel implementation to extensions/ (#45660)
* refactor: move Discord channel implementation to extensions/discord/src/

Move all Discord source files from src/discord/ to extensions/discord/src/,
following the extension migration pattern. Source files in src/discord/ are
replaced with re-export shims. Channel-plugin files from
src/channels/plugins/*/discord* are similarly moved and shimmed.

- Copy all .ts source files preserving subdirectory structure (monitor/, voice/)
- Move channel-plugin files (actions, normalize, onboarding, outbound, status-issues)
- Fix all relative imports to use correct paths from new location
- Create re-export shims at original locations for backward compatibility
- Delete test files from shim locations (tests live in extension now)
- Update tsconfig.plugin-sdk.dts.json rootDir from "src" to "." to accommodate
  extension files outside src/
- Update write-plugin-sdk-entry-dts.ts to match new declaration output paths

* fix: add importOriginal to thread-bindings session-meta mock for extensions test

* style: fix formatting in thread-bindings lifecycle test
2026-03-14 02:53:57 -07:00