fix(telegram): disable autoSelectFamily by default on Node 22+#24259
fix(telegram): disable autoSelectFamily by default on Node 22+#24259Vaibhavee89 wants to merge 2 commits intoopenclaw:mainfrom
Conversation
Additional Comments (6)
Prompt To Fix With AIThis is a comment left during a code review.
Path: src/telegram/fetch.test.ts
Line: 119-135
Comment:
these tests reference `dnsResultOrder` which was removed in this PR - they will fail
```suggestion
// DNS result order tests removed - feature was removed in this PR
```
How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix With AIThis is a comment left during a code review.
Path: src/telegram/fetch.test.ts
Line: 6
Comment:
`setDefaultResultOrder` is no longer used since `dnsResultOrder` was removed
```suggestion
// setDefaultResultOrder removed - dnsResultOrder feature was removed
```
How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix With AIThis is a comment left during a code review.
Path: src/telegram/fetch.test.ts
Line: 16-22
Comment:
this mock is no longer needed since `dnsResultOrder` was removed
```suggestion
// dns mock removed - dnsResultOrder feature was removed
```
How can I resolve this? If you propose a fix, please make it concise.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time! Prompt To Fix With AIThis is a comment left during a code review.
Path: src/telegram/fetch.test.ts
Line: 29
Comment:
`setDefaultResultOrder` mock reset is no longer needed
```suggestion
// setDefaultResultOrder removed - dnsResultOrder feature was removed
```
<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>
How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix With AIThis is a comment left during a code review.
Path: src/config/types.telegram.ts
Line: 28-34
Comment:
`dnsResultOrder` implementation was removed but type definition remains - should be removed or marked deprecated
How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix With AIThis is a comment left during a code review.
Path: src/config/zod-schema.providers-core.ts
Line: 163
Comment:
`dnsResultOrder` validation should be removed since the feature was removed
How can I resolve this? If you propose a fix, please make it concise. |
|
Fixed all the leftover ✅ Removed The PR now cleanly removes the |
The Happy Eyeballs algorithm (autoSelectFamily) can cause long timeouts when IPv6 is misconfigured. Users with broken IPv6 setups can explicitly enable this via config or OPENCLAW_TELEGRAM_ENABLE_AUTO_SELECT_FAMILY. This reverts the default behavior introduced in an earlier fix to address Node 22 network stability issues. Instead of enabling autoSelectFamily by default, we now disable it by default and let users opt in when needed. Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
Removes all references to the removed dnsResultOrder feature: - Removed dnsResultOrder mock and tests from fetch.test.ts - Removed dnsResultOrder type definition from types.telegram.ts - Removed dnsResultOrder validation from zod schema These were left behind when the dnsResultOrder feature was removed from the implementation. Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
490ef4c to
f5a957b
Compare
|
Rebased on latest |
|
The |
|
This pull request has been automatically marked as stale due to inactivity. |
|
Closing due to inactivity. |
Summary
Disables
autoSelectFamily(Happy Eyeballs) by default on Node 22+ for Telegram API connections to avoid long timeouts when IPv6 is misconfigured.This addresses the Telegram polling regression while allowing users with broken IPv6 setups to explicitly enable the feature via config or
OPENCLAW_TELEGRAM_ENABLE_AUTO_SELECT_FAMILYenvironment variable.Changes
autoSelectFamilybehavior fromtruetofalseon Node 22+Test Plan
Related
Split from #20050 per review feedback to separate Telegram networking fixes from thinking block safety fixes.
🤖 Generated with Claude Code
Greptile Summary
Changed default
autoSelectFamilyfromtruetofalseon Node 22+ to prevent Happy Eyeballs timeout issues when IPv6 is misconfigured with Telegram API. RemoveddnsResultOrderDNS prioritization feature and WSL2-specific handling.autoSelectFamilynow defaults tofalseinstead oftruednsResultOrderimplementation and WSL2 detection logicnetwork-config.test.tsto match new defaultsfetch.test.tsstill contains orphaned tests for removeddnsResultOrderfeature (lines 6, 16-22, 29, 119-135) that will failtypes.telegram.ts,zod-schema.providers-core.ts) still reference removeddnsResultOrderpropertyConfidence Score: 1/5
dnsResultOrdertests infetch.test.ts. The PR removes the implementation but leaves 4 test cases that reference the removed feature, which will cause test failures. Additionally, type definitions and zod schema still reference the removed property, creating inconsistency.src/telegram/fetch.test.tswhich contains tests for removed features that will failLast reviewed commit: d8bb817
(4/5) You can add custom instructions or style guidelines for the agent here!