fix(onboard): revert Telegram non-interactive skip#4561
Conversation
📝 WalkthroughWalkthroughcheckTelegramReachability was changed to return void and gained an optional exit dependency; onboarding now awaits the probe without disabling the "telegram" channel on a skipped outcome. Tests were updated to assert exit/prompt behaviors and logging for various probe results. ChangesTelegram reachability changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Comment |
PR Review AdvisorFindings: 0 needs attention, 5 worth checking, 0 nice ideas Review findings🛠️ Needs attention
🔎 Worth checking
🌱 Nice ideas
Since last review detailsCurrent findings:
This is an automated advisory review. A human maintainer must make the final merge decision. |
E2E Advisor RecommendationRequired E2E: Dispatch hint: Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
Dispatch hint
|
E2E Scenario Advisor RecommendationRequired scenario E2E: Dispatch required scenario E2E:
Full scenario advisor summaryE2E Scenario AdvisorBase: Required scenario E2E
Optional scenario E2E
Relevant changed files
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/lib/onboard.ts`:
- Around line 5581-5638: The checkTelegramReachability implementation was
inlined and inflated the onboard file; extract this logic into a small helper
module (e.g., a telegram reachability helper) and replace the inlined code with
a call to that helper to keep semantics identical. Specifically, move the
TELEGRAM_NETWORK_CURL_CODES constant and the body of checkTelegramReachability
(including the runCurlProbe call, the checks for result.ok, result.httpStatus
401/404, the curlStatus set membership, the interactive prompt via
promptYesNoOrDefault and isNonInteractive, and the final warning branches using
result.message) into the new helper function (e.g.,
checkTelegramReachabilityInHost or checkTelegramReachabilityProbe) and export
it; then import and invoke that helper from the onboard file so
checkTelegramReachability in the onboard file delegates to the extracted
function without changing behavior or logging.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: db95fe1f-df74-4d94-8113-36ecc98afd59
📒 Files selected for processing (3)
src/lib/onboard.tssrc/lib/onboard/telegram-reachability.test.tssrc/lib/onboard/telegram-reachability.ts
💤 Files with no reviewable changes (2)
- src/lib/onboard/telegram-reachability.test.ts
- src/lib/onboard/telegram-reachability.ts
Move the reverted Telegram probe behavior out of src/lib/onboard.ts so the entrypoint stays under the growth guardrail and the fake-token behavior is covered by focused unit tests. Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Selective E2E Results — ✅ All requested jobs passedRun: 26675957926
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/lib/onboard.ts (1)
5606-5610: Run the onboarding E2E slice before merge.This change is small, but it sits directly on the Telegram gating path in core onboarding. I’d still run
cloud-e2e,channels-stop-start-e2e, andmessaging-compatible-endpoint-e2eon this branch before merge.As per coding guidelines,
src/lib/onboard.ts"contains core onboarding logic" and the recommended E2E jobs includecloud-e2e,channels-stop-start-e2e, andmessaging-compatible-endpoint-e2e.Also applies to: 5735-5739
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/lib/onboard.ts` around lines 5606 - 5610, This change touches the Telegram gating path in core onboarding: when getValidatedMessagingTokenByEnvKey(...) returns a token the code calls checkTelegramReachability(...), so before merging run the recommended E2E slices to validate behavior; specifically execute the cloud-e2e, channels-stop-start-e2e, and messaging-compatible-endpoint-e2e jobs (they cover the onboarding flows involving getValidatedMessagingTokenByEnvKey and checkTelegramReachability) and confirm no regressions in the onboarding flows referenced around the checkTelegramReachability and surrounding onboarding logic (also verify the same checks at the second occurrence noted in the comment).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/lib/onboard.ts`:
- Around line 5606-5610: This change touches the Telegram gating path in core
onboarding: when getValidatedMessagingTokenByEnvKey(...) returns a token the
code calls checkTelegramReachability(...), so before merging run the recommended
E2E slices to validate behavior; specifically execute the cloud-e2e,
channels-stop-start-e2e, and messaging-compatible-endpoint-e2e jobs (they cover
the onboarding flows involving getValidatedMessagingTokenByEnvKey and
checkTelegramReachability) and confirm no regressions in the onboarding flows
referenced around the checkTelegramReachability and surrounding onboarding logic
(also verify the same checks at the second occurrence noted in the comment).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 3ea826ba-dc0f-4e73-8440-d497db423196
📒 Files selected for processing (3)
src/lib/onboard.tssrc/lib/onboard/telegram-reachability.test.tssrc/lib/onboard/telegram-reachability.ts
|
Closing in preference of #4555 |
Summary
Reverts #4307 because the non-interactive Telegram reachability skip caused fake-token E2E scenarios to drop Telegram during onboarding. The nightly full E2E run then failed Telegram provider, registry, channel-list, and token-rotation assertions that expect the configured Telegram channel to remain present.
Related Issue
Reverts #4307.
Changes
src/lib/onboard/telegram-reachability.tssosrc/lib/onboard.tsstays net-smaller under the growth guardrail.NEMOCLAW_SKIP_TELEGRAM_REACHABILITY.Type of Change
Verification
npx prek run --all-filespassesnpm testpassesnpm run docsbuilds without warnings (doc changes only)Signed-off-by: Carlos Villela cvillela@nvidia.com
Summary by CodeRabbit
Refactor
Bug Fixes / Behavior
Tests