Skip to content

fix(simplex): send() returns failure when WebSocket absent instead of silent success - #99091

Closed
salch-cred wants to merge 2 commits into
NousResearch:mainfrom
salch-cred:fix/simplex-send-ws-absent-error
Closed

salch-cred wants to merge 2 commits into
NousResearch:mainfrom
salch-cred:fix/simplex-send-ws-absent-error

Conversation

@salch-cred

Copy link
Copy Markdown
Contributor

send() returned success=True when _ws was absent because _send_ws() silently drops. Add guard: check _ws before sending, return failure if absent. Fixes #98949.

Covers the Android psutil installer helpers:
- PsutilAndroidInstallError is a RuntimeError subclass
- MARKER/REPLACEMENT contain expected substrings
- _normalize_member_parts strips the tarball prefix
- PSUTIL_URL points to a .tar.gz for psutil
…t absent

send() routed text through _send_ws(), which silently drops the write
when self._ws is None and returns None.  send() then returned
SendResult(success=True) regardless, giving callers a false positive —
the message was never delivered (NousResearch#98949, repro 1).

Add a guard at the top of the content-send path: if _ws is absent,
log a warning and return SendResult(success=False) immediately so the
gateway can surface the delivery failure rather than silently swallowing
it.  Media-only paths (already guarded by send_document/send_voice
returning their own SendResult) are unaffected.

Fixes NousResearch#98949
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/plugins Plugin system and bundled plugins duplicate This issue or pull request already exists sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages labels Aug 31, 2026
@alt-glitch

Copy link
Copy Markdown
Contributor

This was generated by AI during triage.

Duplicate of #27628. That open PR already makes unavailable and failed SimpleX WebSocket sends return a failed SendResult; this branch implements the absent-socket subset.

@salch-cred

Copy link
Copy Markdown
Contributor Author

Closing — duplicate of #27628 which covers the full unavailable/failed send surface.

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

Labels

comp/plugins Plugin system and bundled plugins duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SimpleX adapter: correlated delivery results, stable IDs, long messages, and listener readiness

2 participants