Commit e79461c
fix(e2e): unconditionally skip Telegram reachability probe for fake-token tests (#4555)
## Summary
Fixes #4556
Three nightly E2E jobs (`messaging-providers-e2e`,
`channels-stop-start-e2e`,
`token-rotation-e2e`) failed in [run
26668952264](https://github.com/NVIDIA/NemoClaw/actions/runs/26668952264)
because commit b13e4f4 introduced `checkTelegramReachability()` which
validates
the Telegram bot token via HTTP before onboarding.
The E2E scripts use **fake** tokens. On GitHub Actions runners
`api.telegram.org` is reachable, so the existing conditional guard
(`if ! curl … api.telegram.org`) never fires. The new probe sends the
fake
token, receives HTTP 401, and silently drops Telegram from onboard —
breaking every assertion that expects Telegram to be configured.
### Root cause
| File | Issue |
|---|---|
| `src/lib/onboard/telegram-reachability.ts` (line 65-69) | HTTP 401/404
→ `{skipped: true}` removes Telegram from `found` channels |
| `src/lib/onboard.ts` (`setupMessagingChannels`) | Filters Telegram out
of `found` when `reachability.skipped` is true |
| `test/e2e/test-messaging-providers.sh` (line 567-572) | Guard checks
host reachability, not token validity |
| `test/e2e/test-channels-stop-start.sh` (line 422-427) | Same guard
pattern |
| `test/e2e/test-token-rotation.sh` | No guard at all |
### Fix
Export `NEMOCLAW_SKIP_TELEGRAM_REACHABILITY=1` unconditionally in all
three
test scripts so the probe is always bypassed when running with fake
tokens.
This is the correct layer: the workflow YAML already passes fake tokens
as
env vars, and the scripts know they are running with fake credentials.
## Changes
- `test/e2e/test-messaging-providers.sh` — replace conditional
curl-reachability check with unconditional export
- `test/e2e/test-channels-stop-start.sh` — same
- `test/e2e/test-token-rotation.sh` — add unconditional export before
first token assignment
## Validation
> **Note:** The automation token lacks `actions:write` / `workflows`
scope,
> so a validation `workflow_dispatch` could not be triggered
automatically.
> A maintainer should trigger:
> ```
> gh workflow run nightly-e2e.yaml --repo NVIDIA/NemoClaw \
> --ref fix/nightly-e2e-telegram-probe-fake-token-a5e7e63 \
> -f
jobs="messaging-providers-e2e,channels-stop-start-e2e,token-rotation-e2e"
> ```
## Test plan
- [ ] Trigger `nightly-e2e.yaml` on this branch with the three affected
jobs
- [ ] Verify `messaging-providers-e2e` passes (Telegram channel
configured)
- [ ] Verify `channels-stop-start-e2e` passes (Telegram stop/start
works)
- [ ] Verify `token-rotation-e2e` passes (Telegram token rotation
detected)
- [ ] Confirm no regressions in unrelated nightly jobs
Signed-off-by: Hung Le <hple@nvidia.com>
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Tests**
* E2E test setups now skip the Telegram reachability probe only when
configured tokens appear to be fake, avoiding network-dependent failures
for fake-token runs.
* Removed reliance on an external host-reachability check, making test
behavior deterministic for fake-token scenarios.
<!-- review_stack_entry_start -->
[](https://app.coderabbit.ai/change-stack/NVIDIA/NemoClaw/pull/4555?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)
<!-- review_stack_entry_end -->
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Signed-off-by: Hung Le <hple@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Co-authored-by: San Dang <sdang@nvidia.com>
Co-authored-by: Carlos Villela <cvillela@nvidia.com>1 parent d4d1f9a commit e79461c
3 files changed
Lines changed: 35 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
369 | 369 | | |
370 | 370 | | |
371 | 371 | | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
372 | 379 | | |
373 | 380 | | |
374 | 381 | | |
| |||
419 | 426 | | |
420 | 427 | | |
421 | 428 | | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
427 | 434 | | |
428 | 435 | | |
429 | 436 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
671 | 671 | | |
672 | 672 | | |
673 | 673 | | |
674 | | - | |
675 | | - | |
676 | | - | |
677 | | - | |
678 | | - | |
679 | | - | |
680 | | - | |
681 | | - | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
682 | 682 | | |
683 | 683 | | |
684 | 684 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
153 | 160 | | |
154 | 161 | | |
155 | 162 | | |
| |||
158 | 165 | | |
159 | 166 | | |
160 | 167 | | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
161 | 176 | | |
162 | 177 | | |
163 | 178 | | |
| |||
0 commit comments