Skip to content

fix(whatsapp): remove dead watchdog timeout clamp - #95706

Merged
vincentkoc merged 1 commit into
mainfrom
maint/replacement-93330
Jun 22, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
maint/replacement-93330

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What Problem This Solves

WhatsApp's app-silence watchdog computed Math.max(messageTimeoutMs, messageTimeoutMs * 4), although the second term always wins for valid positive timeouts. The dead clamp obscured the intended four-times silence window.

Why This Change Was Made

This maintainer replacement is based on contributor PR #93330 and cherry-picks its original commit (f0c6cab75359e38371834c4aae3a425ddfe324e4) onto current main. It keeps the change narrow: one production expression and one focused regression test. The original author and Co-Authored-By trailer are preserved.

User Impact

Fresh WhatsApp connections keep the intended messageTimeoutMs * 4 app-silence window, with no transport-timeout behavior change.

Evidence

  • node node_modules/vitest/vitest.mjs run --config test/vitest/vitest.extension-whatsapp.config.ts extensions/whatsapp/src/connection-controller.test.ts — 18/18 passed.
  • autoreview --mode branch --base origin/main — clean; no accepted/actionable findings.
  • Current diff against origin/main is limited to extensions/whatsapp/src/connection-controller.ts and its colocated test.
  • Original contributor PR: fix(whatsapp): remove dead Math.max in watchdog app-silence formula #93330

Credit

Original implementation by @rushindrasinha. This replacement preserves the original commit author and Co-Authored-By metadata.

@openclaw-barnacle openclaw-barnacle Bot added channel: whatsapp-web Channel integration: whatsapp-web size: S maintainer Maintainer-authored PR labels Jun 22, 2026
@vincentkoc
vincentkoc force-pushed the maint/replacement-93330 branch 2 times, most recently from 79eb0c2 to 76e8474 Compare June 22, 2026 09:25
appSilenceTimeoutMs was computed as Math.max(x, x*4) which always
resolves to x*4 — the Math.max call was dead code. Simplify to
messageTimeoutMs * 4 directly and add a regression test that pins
the 4x multiplier as the silence window for fresh connections.

Co-Authored-By: Dr Rushindra Sinha <[email protected]>
(cherry picked from commit f0c6cab)
@vincentkoc
vincentkoc force-pushed the maint/replacement-93330 branch from 76e8474 to 0b17b1f Compare June 22, 2026 09:36
@vincentkoc
vincentkoc merged commit 89eb493 into main Jun 22, 2026
86 checks passed
@vincentkoc
vincentkoc deleted the maint/replacement-93330 branch June 22, 2026 09:47
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

Thanks @vincentkoc!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: whatsapp-web Channel integration: whatsapp-web maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants