Skip to content

fix(simplex): make polling fallback reliable - #27775

Closed
Zoffka wants to merge 1 commit into
NousResearch:mainfrom
Zoffka:zofka/fix-simplex-polling-reliability
Closed

fix(simplex): make polling fallback reliable#27775
Zoffka wants to merge 1 commit into
NousResearch:mainfrom
Zoffka:zofka/fix-simplex-polling-reliability

Conversation

@Zoffka

@Zoffka Zoffka commented May 18, 2026

Copy link
Copy Markdown

Summary

  • Adds a dedicated SimpleX polling fallback that seeds seen items, uses per-chat seen keys, and persists them across restarts.
  • Keeps the gateway responsive by dispatching polled messages back to the main loop without blocking the poller.
  • Marks inbound SimpleX items read from the polling path so sender-visible read receipts are not delayed behind agent work.
  • Avoids noisy WebSocket reconnect loops when polling remains healthy.
  • Adds an opt-in active-session hard timeout for polling transports so stale turns do not block fresh SimpleX messages indefinitely.

Test plan

  • python -m pytest tests/gateway/test_simplex_plugin.py tests/gateway/test_platform_base.py -q -o 'addopts=' → 133 passed
  • python -m pytest tests/gateway -q -o 'addopts=' → 5531 passed / 10 failed / 7 skipped; failures are from live environment/config leakage (API server host/model/CORS, Matrix E2EE mock, Signal env), not this SimpleX patch.

@Zoffka

Zoffka commented May 18, 2026

Copy link
Copy Markdown
Author

Closing this PR because it was opened prematurely. I will only reopen/package upstream changes when explicitly requested.

@Zoffka Zoffka closed this May 18, 2026
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/gateway Gateway runner, session dispatch, delivery comp/plugins Plugin system and bundled plugins labels May 18, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Likely supersedes #27415 (v2) and closed #27360 (v1) — same author, same SimpleX polling fallback work stream. Also overlaps open #26480 (WS reliability) and #26433 (3 SimpleX bugs).

Reviewers: please close #27415 if this PR is the preferred version.

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

Labels

comp/gateway Gateway runner, session dispatch, delivery comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants