Skip to content

fix(telegram): add httpTimeoutMs config for health probe timeout control#2

Open
z0650115 wants to merge 6 commits into
mainfrom
fix/telegram-http-timeout-ms-v2
Open

fix(telegram): add httpTimeoutMs config for health probe timeout control#2
z0650115 wants to merge 6 commits into
mainfrom
fix/telegram-http-timeout-ms-v2

Conversation

@z0650115

@z0650115 z0650115 commented May 4, 2026

Copy link
Copy Markdown
Owner

Summary

Expose httpTimeoutMs in Telegram network config (similar to Feishu implementation) to allow users to reduce the probe timeout for faster fail-fast when Telegram is unreachable due to IPv6 issues or high latency.

Problem

When Telegram health probe (getMe) encounters IPv6 blackhole issues or high latency, it can block the gateway event loop for 10-15 seconds, causing dashboard menus to freeze. This is a regression that affects all users with Telegram health monitoring enabled.

Solution

Added httpTimeoutMs option to channels.telegram.network config:

channels:
  telegram:
    network:
      # Set to 5000ms for faster fail-fast (default: 15000ms)
      httpTimeoutMs: 5000

When configured, this limits each HTTP request in the probe to the specified timeout instead of the full probe budget. This allows probes to fail quickly when Telegram is unreachable, preventing gateway event loop blocking.

Changes

  1. Type definition (src/config/types.telegram.ts): Added httpTimeoutMs?: number to TelegramNetworkConfig
  2. Zod schema (src/config/zod-schema.providers-core.ts): Added validation for httpTimeoutMs (positive integer, max 60000ms)
  3. Probe implementation (extensions/telegram/src/probe.ts): Modified to use httpTimeoutMs from network config for per-request timeout
  4. Tests (extensions/telegram/src/probe.test.ts): Added two tests for httpTimeoutMs behavior

Fixes

Fixes openclaw#77060

vincentkoc and others added 6 commits May 3, 2026 20:10
Expose httpTimeoutMs in Telegram network config (similar to Feishu implementation)
to allow users to reduce the probe timeout for faster fail-fast when Telegram is
unreachable due to IPv6 issues or high latency.

Users can now configure:
  channels.telegram.network.httpTimeoutMs: 5000  # 5 second timeout

This prevents the gateway event loop from blocking for 10-15 seconds when the
Telegram health probe encounters IPv6 blackhole issues.

Fixes openclaw#77060
Fix for issue openclaw#77012 - WebChat session transcript overwritten every turn.

The migration function was not idempotent - running it multiple times
would regenerate IDs for entries that already had valid IDs, breaking
the parent chain and causing entries to become orphaned.

The root cause was that existingIds was an empty Set at the start of
each migration run. When processing entries, if an entry already had
an ID but that ID wasn't in existingIds (because existingIds was empty),
a new ID would be generated. This would break the parentId chain since
the parentId would still point to the old ID.

Fix by:
1. First pass: collect all existing IDs from the file
2. Initialize existingIds with these IDs so they're preserved
3. Only assign new IDs to entries that don't have valid existing IDs

This ensures that running migration multiple times produces the same
result, preventing orphaned entries and broken parent chains.
Fixes issue openclaw#77054:

1. Bug 1 - read tool output not rendered:
   - extractToolText() only handled item.text and item.content as strings
   - Modern tool results have item.content as array: [{ type: 'text', text: '...' }]
   - Added array content block handling to extract text from nested blocks

2. Bug 2 - exec output text clipped:
   - .chat-tool-card had overflow:hidden which clipped long content
   - Changed to overflow:auto to allow scrolling when content exceeds max-height

Added tests for extractToolCards with array content blocks.
Fixes issue openclaw#77063: lossless-claw selected and enabled but not registered
as context engine after plugin cache restore.

Root cause: When a cached plugin registry is reused, the cached state
restoration restores agent harnesses, commands, compaction providers, and
memory embedding providers, but NOT registered context engines. This causes
context engines registered by plugins (like lossless-claw) to be lost when
the plugin loader uses cached state.

Changes:
- src/context-engine/registry.ts: Add RegisteredContextEngineEntry type,
  listRegisteredContextEngines(), and restoreRegisteredContextEngines()
  functions for cache snapshot/restore support
- src/plugins/loader.ts: Add contextEngines field to CachedPluginState,
  call restoreRegisteredContextEngines() when using cached state, and
  save contextEngines to cache when storing registry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: "Communications", "AI & Agents", and "Automation" Menus Extremely Slow / Freezing the Control UI (Related to #45698)

2 participants