Repository navigation
fix(discord): preserve webhook timeout errors on stalled responses - #116155
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 29, 2026, 10:08 PM ET / July 30, 2026, 02:08 UTC. ClawSweeper reviewWhat this changesThe PR makes Discord webhook error-body reads use the webhook request timeout so a stalled non-success response preserves the request-timeout error instead of reporting a generic Discord response error. Merge readinessKeep this PR open for ordinary maintainer review. The supplied current-main reproduction, focused Discord webhook change, and prior ClawSweeper cycles support the bug premise; the member-authored PR also carries the protected Priority: P1 Review scores
Verification
How this fits togetherThe Discord channel plugin sends outbound webhook messages and parses non-success HTTP responses before returning an error to the operator. This change controls the response-body read timeout so the final reported error reflects the webhook operation deadline. flowchart LR
A[Discord webhook send] --> B[HTTP response]
B --> C{Success status?}
C -->|No| D[Read limited error body]
D --> E[Apply webhook deadline]
E --> F[Classify Discord error]
F --> G[Operator-visible timeout or API error]
Decision needed
Why: The protected Before merge
Agent review detailsSecurityNone. PR surfaceSource +2, Tests -1. Total +1 across 2 files. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the narrow Discord-plugin timeout fix if the refreshed merge result still preserves the operation-level timeout and the focused regression coverage remains green. Do we have a high-confidence way to reproduce the issue? Yes, with medium confidence: the PR records a focused current-main reproduction in Is this the best way to solve the issue? Yes, with medium confidence: applying the existing Discord webhook deadline to the existing limited error-body reader is narrower than changing the shared reader default and retains the plugin's timeout contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 82af1bf7d403. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
4b6ec5f to
0ccc7a4
Compare
0ccc7a4 to
2fba70b
Compare
|
ClawSweeper rank-up move handled: the refreshed head has a successful exact |
|
Merged via squash.
|
* origin/main: fix(macos): stop canceled voice wake timers (openclaw#116189) fix(macos): coalesce location permission requests (openclaw#116183) fix(macos): guard remote tunnel restart ownership (openclaw#116172) fix(agents): throw CompactionError when summarization fails (openclaw#115500) fix(test): isolate ACP startup output stream (openclaw#116076) fix(agents): deny all tools when scheduled authority names a removed account (openclaw#115932) fix(test): stop collecting Vydra test helpers (openclaw#116139) fix(discord): preserve webhook deadline errors (openclaw#116155) fix(test): isolate Google embedding batch timeout (openclaw#116161) fix(cron): stop replaying old schedule slots after a cron job is edited (openclaw#115779) fix(plugins): report request timeouts for stalled response bodies (openclaw#116166)
What Problem This Solves
Fixes an issue where Discord webhook sends could report a generic Discord response error instead of the request timeout when an error response body stalled.
Why This Change Was Made
The webhook request deadline now also bounds error-body idle reads, so the shared shorter body-reader default cannot preempt Discord's operation-level timeout contract. The timeout test observes timer advancement and rejection concurrently to keep failures deterministic.
User Impact
Operators now receive the correct timeout error when Discord returns headers but stalls while streaming an error body.
Evidence
main:send.webhook.timeout.test.tsreturnedDiscordErrorand emittedPromiseRejectionHandledWarning.node scripts/run-vitest.mjs extensions/discord/src/send.webhook.timeout.test.ts extensions/discord/src/send.webhook-activity.test.ts extensions/discord/src/send.webhook.chunk-limit.test.ts(3 files, 7 tests passed)../node_modules/.bin/oxfmt --check extensions/discord/src/send.webhook.ts extensions/discord/src/send.webhook.timeout.test.tspassed.git diff --check origin/main...HEADpassed.AI-assisted: yes. I understand and verified the change.