Skip to content

feat(messaging): telegram channels-status health probe#6887

Open
hunglp6d wants to merge 15 commits into
mainfrom
feat/telegram-channels-status-health
Open

feat(messaging): telegram channels-status health probe#6887
hunglp6d wants to merge 15 commits into
mainfrom
feat/telegram-channels-status-health

Conversation

@hunglp6d

@hunglp6d hunglp6d commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a live health probe for the Telegram messaging channel to nemoclaw <sandbox> channels status --channel telegram, mirroring the existing WhatsApp probe: it classifies the channel into a verdict (healthy / idle / unreachable / token_rejected / not_started) by reading the OpenClaw gateway's own log breadcrumbs, so a Telegram bridge that cannot reach Telegram or has a rejected token no longer renders as all-[ok]. The default channels status summary now prints an honest Runtime health: not checked pointer for probe-capable channels instead of a silent all-green, and --channel telegram merges the existing non-secret config comparison with the health signals.

Related Issue

Closes #6888
Addresses the "Telegram configuration state and health diagnostics are misleading" item of the DGX Spark/Station VDR checklist #6743 (Parts of #6743).

Changes

  • New pure evaluator src/lib/sandbox/telegram-diagnostics.ts (verdict + hints, fixture-testable, no I/O) and host-side probe src/lib/actions/sandbox/telegram-probe.ts (tails /tmp/gateway.log + pgrep); the probe never issues its own getMe, so the resolved bot token stays inside the gateway.
  • Generalize the diagnostics deepProbe marker from "in-sandbox-qr" to "in-sandbox-qr" | "log-tail", derived from a new declarative manifest field ChannelManifest.diagnosticsProbe. Current consumer: Telegram only (declares diagnosticsProbe: "log-tail"); a hardcoded channel check is insufficient because Slack/Discord/WeChat also ship bridge-health hooks and must not be mis-routed to the Telegram evaluator. Dispatch uses a LOG_TAIL_EVALUATORS channel→evaluator map, gated to OpenClaw (the only agent with the breadcrumb producer). Protected by messaging/diagnostics.test.ts and the channel-status dispatch/Hermes-fallback tests.
  • Extract shared DiagnosticSeverity/DiagnosticSignal into src/lib/sandbox/diagnostic-signal.ts so the WhatsApp and Telegram report union uses one type (WhatsApp re-exports for existing importers).
  • --channel telegram merges the existing config-value comparison (group policy / mention mode / allowed IDs) with the health signals and exits non-zero when the channel is unhealthy (was previously always exit 0).
  • Recency-aware breadcrumb parsing: the tailed lines are chronological, so the latest evidence wins (a bridge that recovered after a blocked start reports healthy; one blocked again reports unreachable). Recognizes OpenClaw's own Inbound message telegram: / isolated polling ingress started and Network request … failed / UND_ERR_SOCKET lines, since the preload does not reliably emit its positive breadcrumbs.
  • Hermes Telegram sandboxes fall back to the basic config report (no OpenClaw breadcrumb producer exists for Hermes).
  • Docs: docs/reference/commands.mdx channels status section documents the Telegram probe, verdicts, exit code, and summary pointer.

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with doc updates
  • Doc only (prose changes, no code sample modifications)
  • Doc only (includes code sample changes)

Quality Gates

  • Tests added or updated for changed behavior
  • Existing tests cover changed behavior — justification:
  • Tests not applicable — justification:
  • Docs updated for user-facing behavior changes
  • Docs not applicable — justification:
  • Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging)
  • Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification:
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue:

Verification

  • PR description includes a Signed-off-by: line and every commit appears as Verified in GitHub
  • Normal pre-commit, commit-msg, and pre-push hooks passed, or npm run check:diff passed when hooks were skipped or unavailable
  • Targeted behavior tests pass for the current change set, or tests are marked not applicable above — command/result or justification:
  • Applicable broad gate passed — npm test for broad runtime/test-harness changes; npm run check for repo-wide validation/coverage changes — command/result:
  • Quality Gates section completed with required justifications or waivers
  • No secrets, API keys, or credentials committed
  • npm run docs builds without warnings (doc changes only)
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

Signed-off-by: Hung Le hple@nvidia.com

Summary by CodeRabbit

  • New Features
    • Added host-side “log-tail” Telegram channel diagnostics for supported OpenClaw setups, including runtime, connectivity, auth, startup, and delivery signals with actionable hints.
    • Improved per-channel status reporting, including a clearer “Runtime health” message for paused channels.
  • Documentation
    • Updated channel status reference to explain summary-view probe behavior (no live probing unless targeting a channel), Telegram breadcrumb/log-driven diagnostics, and updated --json exit behavior when verdicts are not healthy/unknown.

@copy-pr-bot

copy-pr-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Telegram diagnostics now use gateway log breadcrumbs and bounded sandbox probes to produce structured runtime verdicts for OpenClaw. Summary views avoid live probing, Hermes falls back to configuration reporting, and detailed status supports Telegram-specific health results.

Changes

Telegram health diagnostics

Layer / File(s) Summary
Diagnostic and probe contracts
src/lib/sandbox/diagnostic-signal.ts, src/lib/messaging/manifest/types.ts, src/lib/messaging/diagnostics.ts, src/lib/messaging/channels/telegram/manifest.ts, src/lib/actions/sandbox/channel-status.ts
Adds shared diagnostic signal types, Telegram report support, and the log-tail diagnostic probe mode.
Telegram breadcrumb evaluation
src/lib/sandbox/telegram-diagnostics.ts, src/lib/sandbox/telegram-diagnostics.test.ts
Parses Telegram gateway evidence, computes signals and verdicts, and tests failure, recovery, precedence, and hint behavior.
Sandbox probe and status integration
src/lib/actions/sandbox/telegram-probe.ts, src/lib/actions/sandbox/channel-status.ts, docs/reference/commands.mdx
Runs bounded OpenClaw log/process probes, combines Telegram health with configuration signals, and documents summary and detailed status behavior.
Status behavior validation
src/lib/actions/sandbox/*test*
Updates test wiring and assertions for nested reports, Telegram probing, paused channels, OpenClaw status, and Hermes configuration-only fallback.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Operator
  participant ChannelStatus
  participant Sandbox
  participant TelegramDiagnostics
  Operator->>ChannelStatus: Request detailed Telegram status
  ChannelStatus->>Sandbox: Execute bounded gateway log/process probe
  Sandbox-->>ChannelStatus: Return sentinel results and matched signals
  ChannelStatus->>TelegramDiagnostics: Evaluate probe input
  TelegramDiagnostics-->>ChannelStatus: Return verdict and diagnostic signals
  ChannelStatus-->>Operator: Render Telegram health report
Loading

Suggested labels: area: sandbox

Suggested reviewers: cv, sandl99

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 12.50% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding a Telegram channels-status health probe.
Linked Issues check ✅ Passed The PR adds live Telegram runtime diagnostics, distinguishes failure modes, and adjusts summary behavior as requested in #6888.
Out of Scope Changes check ✅ Passed The changes are narrowly focused on Telegram status probing, diagnostics plumbing, tests, and docs, with no obvious unrelated additions.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/telegram-channels-status-health

Comment @coderabbitai help to get the list of available commands.

@hunglp6d hunglp6d changed the title Feat/telegram channels status health feat(messaging): telegram channels-status health probe Jul 14, 2026
@github-code-quality

github-code-quality Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage remains at 96%, unchanged from the branch.

TypeScript / code-coverage/cli

The overall coverage in the branch is 80%. The coverage in the branch is 79%.

Show a code coverage summary of the most impacted files.
File 8599fc7 3784010 +/-
src/lib/adapter...ocker/volume.ts 85% 70% -15%
src/lib/shields/audit.ts 97% 92% -5%
src/lib/adapter...shell/client.ts 85% 83% -2%
src/lib/security/redact-url.ts 97% 99% +2%
src/lib/adapter.../docker/pull.ts 83% 86% +3%
src/lib/messagi...nes/template.ts 95% 100% +5%
src/lib/messagi...onfig-parser.ts 93% 100% +7%
src/lib/messagi...ate-resolver.ts 82% 94% +12%
src/lib/actions...legram-probe.ts 0% 96% +96%
src/lib/sandbox...-diagnostics.ts 0% 97% +97%

Updated July 15, 2026 03:34 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@github-actions

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — Informational

Advisor assessment: Informational / high confidence
Next action: No advisor follow-up needed.
Findings: 0 blockers · 0 warnings · 0 suggestions
Status: No actionable findings remain in the canonical review ledger.

Model lanes

  • GPT-5.6 Terra (primary): Completed · high confidence · 0 blockers · 0 warnings · 0 suggestions
  • Nemotron 3 Ultra (second opinion): Completed · high confidence · 0 blockers · 0 warnings · 0 suggestions
  • Model comparison: normalized findings match; normalized E2E selections differ; severity counts match.

Nemotron output stays in workflow artifacts and does not change the assessment above.

E2E guidance

Advisory only. E2E / PR Gate selects and runs jobs independently.

Recommended E2E: channels-add-remove, channels-stop-start, onboard-repair, onboard-resume

1 optional E2E recommendation
  • diagnostics

Workflow run details

This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge.

@hunglp6d hunglp6d self-assigned this Jul 14, 2026
@hunglp6d hunglp6d added VRDC Issues and PRs submitted by NVIDIA VRDC test team. area: cli Command line interface, flags, terminal UX, or output area: messaging Messaging channels, bridges, manifests, or channel lifecycle labels Jul 14, 2026
@wscurran wscurran added feature PR adds or expands user-visible functionality integration: telegram Telegram integration or channel behavior labels Jul 14, 2026
@hunglp6d hunglp6d marked this pull request as ready for review July 14, 2026 21:21
@prekshivyas prekshivyas added the v0.0.84 Release target label Jul 14, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (3)
src/lib/actions/sandbox/telegram-probe.test.ts (1)

33-33: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use a behavior-oriented suite title.

buildTelegramProbeInput is an implementation name rather than test behavior.

Suggested change
-describe("buildTelegramProbeInput", () => {
+describe("when collecting Telegram runtime probe evidence", () => {

As per coding guidelines, “Use behavior-oriented test titles.”

🤖 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/actions/sandbox/telegram-probe.test.ts` at line 33, Rename the test
suite described by the describe block around buildTelegramProbeInput to a
behavior-oriented title that states what the Telegram probe input-building
behavior does, rather than naming the implementation function.

Source: Coding guidelines

src/lib/sandbox/telegram-diagnostics.ts (1)

260-267: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

pickVerdict re-derives config/policy state via signal-label string matching instead of reading input directly.

input.channelEnabledInRegistry and input.presetInRegistry/presetOnGateway are already booleans on TelegramProbeInput; matching against signals by label === "Channel registration" couples pickVerdict to the exact label strings used in configCoverageSignal/policyCoverageSignal, so a future label rename silently breaks verdict classification with no type error.

♻️ Suggested simplification
 function pickVerdict(signals: DiagnosticSignal[], input: TelegramProbeInput): TelegramVerdict {
   if (!input.probeReachable) return "probe_failed";
-  if (signals.some((s) => s.label === "Channel registration" && s.severity === "fail")) {
-    return "config_gap";
-  }
-  if (signals.some((s) => s.label === "Policy coverage" && s.severity === "fail")) {
-    return "policy_gap";
-  }
+  if (!input.channelEnabledInRegistry) return "config_gap";
+  if (!input.presetInRegistry) return "policy_gap";
   ...
🤖 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/sandbox/telegram-diagnostics.ts` around lines 260 - 267, Update
pickVerdict to classify config_gap and policy_gap from TelegramProbeInput’s
boolean fields directly: use channelEnabledInRegistry for configuration status
and the presetInRegistry/presetOnGateway values for policy coverage. Remove the
signal label/severity matching from verdict selection while preserving the
existing probe_failed precedence and remaining verdict behavior.
src/lib/actions/sandbox/telegram-probe.ts (1)

94-100: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Remove the redundant try/catch around deps.getGatewayPresets()

getGatewayPresets() already returns null for gateway failures, so this wrapper only adds another path to reason about. Handle the null case directly unless an injected dependency is expected to throw.

🤖 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/actions/sandbox/telegram-probe.ts` around lines 94 - 100, Remove the
try/catch surrounding deps.getGatewayPresets in the gateway preset lookup, and
assign presetOnGateway directly from its null-aware result. Preserve null when
getGatewayPresets returns null and check for "telegram" only for non-null preset
lists.

Source: Learnings

🤖 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/actions/sandbox/channel-status.ts`:
- Around line 542-551: Thread a paused-channel indicator through
buildBasicChannelReport and its paused-channel call site so the Runtime health
signal reflects the actual request context. For paused single-channel detail
requests, avoid saying “not checked in summary view” and do not suggest
rerunning the same --channel command; preserve the existing summary-view message
and hint for non-paused summary reports.

In `@src/lib/sandbox/telegram-diagnostics.ts`:
- Around line 206-213: Update the parser’s startupHttpError handling alongside
providerReady and tokenRejected so it participates in the same latest-evidence
winner block rather than being assigned unconditionally. Ensure later
provider-ready/inbound evidence clears or supersedes an earlier HTTP error,
allowing reachabilitySignal to report the current healthy state; add a
regression test covering stale HTTP 502/503 evidence followed by provider-ready
evidence.

---

Nitpick comments:
In `@src/lib/actions/sandbox/telegram-probe.test.ts`:
- Line 33: Rename the test suite described by the describe block around
buildTelegramProbeInput to a behavior-oriented title that states what the
Telegram probe input-building behavior does, rather than naming the
implementation function.

In `@src/lib/actions/sandbox/telegram-probe.ts`:
- Around line 94-100: Remove the try/catch surrounding deps.getGatewayPresets in
the gateway preset lookup, and assign presetOnGateway directly from its
null-aware result. Preserve null when getGatewayPresets returns null and check
for "telegram" only for non-null preset lists.

In `@src/lib/sandbox/telegram-diagnostics.ts`:
- Around line 260-267: Update pickVerdict to classify config_gap and policy_gap
from TelegramProbeInput’s boolean fields directly: use channelEnabledInRegistry
for configuration status and the presetInRegistry/presetOnGateway values for
policy coverage. Remove the signal label/severity matching from verdict
selection while preserving the existing probe_failed precedence and remaining
verdict behavior.
🪄 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: c1d86ef7-c4b4-4513-91de-a964bdf15a60

📥 Commits

Reviewing files that changed from the base of the PR and between 45b1cb5 and e56b931.

📒 Files selected for processing (16)
  • docs/reference/commands.mdx
  • src/lib/actions/sandbox/channel-status-config-core.test.ts
  • src/lib/actions/sandbox/channel-status-summary.test.ts
  • src/lib/actions/sandbox/channel-status-telegram-policy.test.ts
  • src/lib/actions/sandbox/channel-status.test-helpers.ts
  • src/lib/actions/sandbox/channel-status.ts
  • src/lib/actions/sandbox/telegram-probe.test.ts
  • src/lib/actions/sandbox/telegram-probe.ts
  • src/lib/messaging/channels/telegram/manifest.ts
  • src/lib/messaging/diagnostics.test.ts
  • src/lib/messaging/diagnostics.ts
  • src/lib/messaging/manifest/types.ts
  • src/lib/sandbox/diagnostic-signal.ts
  • src/lib/sandbox/telegram-diagnostics.test.ts
  • src/lib/sandbox/telegram-diagnostics.ts
  • src/lib/sandbox/whatsapp-diagnostics.ts

Comment thread src/lib/actions/sandbox/channel-status.ts
Comment on lines +206 to +213
if (bc.startupHttpError !== null) {
return {
label: "Bot API reachability",
severity: "warn",
detail: `Telegram startup probe returned HTTP ${bc.startupHttpError}`,
hint: "check `nemoclaw <sandbox> logs --follow`",
};
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Stale startupHttpError breaks the documented "latest evidence wins" guarantee.

The parser's own comment (lines 360-369) promises the most recent breadcrumb evidence wins, but startupHttpError (line 381) is set unconditionally on every match rather than through the winner-take-all block (391-415) that governs providerReady/tokenRejected/etc. Result: a stale HTTP-error line followed by a later provider ready + inbound line yields verdict "healthy" (correct, since pickVerdict never reads startupHttpError), but reachabilitySignal (206) still reports a warn signal with the stale HTTP code because it checks startupHttpError !== null before providerReady. The report's own verdict and signal list then contradict each other — exactly the stale/misleading-diagnostic failure mode this PR is meant to eliminate.

🐛 Proposed fix: track startupHttpError with the same latest-evidence semantics
   let lastReached = -1;
   let lastNetworkFail = -1;
   let lastBridgeNotStarted = -1;
   let lastTokenRejected = -1;
   let lastCredentialUnresolved = -1;
+  let lastHttpError = -1;
+  let lastHttpErrorCode: number | null = null;
   telegramLines.forEach((line, index) => {
     const httpErr = /startup probe returned HTTP\s+(\d{3})/i.exec(line);
-    if (httpErr) bc.startupHttpError = Number(httpErr[1]);
+    if (httpErr) {
+      lastHttpError = index;
+      lastHttpErrorCode = Number(httpErr[1]);
+    }
     if (/inbound update received|inbound message telegram/i.test(line)) bc.inboundReceived = true;
     if (REACHED.test(line)) lastReached = index;
     if (NETWORK_FAIL.test(line)) lastNetworkFail = index;
     if (/bridge did not start within/i.test(line)) lastBridgeNotStarted = index;
     if (/rejected startup probe with HTTP\s+(401|404)/i.test(line)) lastTokenRejected = index;
     if (/credential placeholder.*(missing|mismatch|unresolved)/i.test(line)) {
       lastCredentialUnresolved = index;
     }
   });
   const lastCause = Math.max(lastTokenRejected, lastCredentialUnresolved, lastNetworkFail);
-  const lastEvidence = Math.max(lastReached, lastCause, lastBridgeNotStarted);
+  const lastEvidence = Math.max(lastReached, lastCause, lastBridgeNotStarted, lastHttpError);
   if (lastReached !== -1 && lastReached >= lastEvidence) {
     bc.providerReady = true;
   } else if (...) {
     ...
   } else if (lastNetworkFail !== -1) {
     bc.startupFailedNetwork = true;
   } else if (lastBridgeNotStarted !== -1) {
     bc.bridgeNotStarted = true;
+  } else if (lastHttpError !== -1) {
+    bc.startupHttpError = lastHttpErrorCode;
   }

Worth adding a regression test mirroring the existing #6887 stale-401 tests but for a stale HTTP 502/503 followed by a later provider ready.

Also applies to: 379-415

🤖 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/sandbox/telegram-diagnostics.ts` around lines 206 - 213, Update the
parser’s startupHttpError handling alongside providerReady and tokenRejected so
it participates in the same latest-evidence winner block rather than being
assigned unconditionally. Ensure later provider-ready/inbound evidence clears or
supersedes an earlier HTTP error, allowing reachabilitySignal to report the
current healthy state; add a regression test covering stale HTTP 502/503
evidence followed by provider-ready evidence.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/lib/sandbox/telegram-diagnostics.ts (1)

403-424: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Honor a later HTTP failure over earlier failure breadcrumbs.

lastHttpError is included in lastEvidence, but the token/network branches never compare their timestamps to it. A 401 at index 0 followed by an HTTP 502 at index 1 still sets tokenRejected, hiding the latest non-auth reachability failure.

Proposed fix
   if (lastReached !== -1 && lastReached >= lastEvidence) {
     bc.providerReady = true;
+  } else if (lastHttpError === lastEvidence) {
+    bc.startupHttpError = lastHttpErrorCode;
   } else if (
     Math.max(lastTokenRejected, lastCredentialUnresolved) !== -1 &&
     Math.max(lastTokenRejected, lastCredentialUnresolved) >= lastNetworkFail
@@
   } else if (lastBridgeNotStarted !== -1) {
     bc.bridgeNotStarted = true;
-  } else if (lastHttpError !== -1) {
-    bc.startupHttpError = lastHttpErrorCode;
   }

Add a regression case for rejected-token evidence followed by HTTP 502.

🤖 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/sandbox/telegram-diagnostics.ts` around lines 403 - 424, Update the
verdict selection around lastEvidence so a later non-auth HTTP failure takes
precedence over earlier token, credential, or network failure breadcrumbs.
Ensure the token/network branches only set their flags when their evidence is at
least as recent as lastHttpError, while preserving reached and bridge
precedence; add a regression case covering rejected-token evidence followed by
HTTP 502.
🤖 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.

Outside diff comments:
In `@src/lib/sandbox/telegram-diagnostics.ts`:
- Around line 403-424: Update the verdict selection around lastEvidence so a
later non-auth HTTP failure takes precedence over earlier token, credential, or
network failure breadcrumbs. Ensure the token/network branches only set their
flags when their evidence is at least as recent as lastHttpError, while
preserving reached and bridge precedence; add a regression case covering
rejected-token evidence followed by HTTP 502.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 4a9f685e-f681-468d-a959-404146f4aa3f

📥 Commits

Reviewing files that changed from the base of the PR and between e56b931 and 3784010.

📒 Files selected for processing (4)
  • src/lib/actions/sandbox/channel-status.test.ts
  • src/lib/actions/sandbox/channel-status.ts
  • src/lib/sandbox/telegram-diagnostics.test.ts
  • src/lib/sandbox/telegram-diagnostics.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/lib/sandbox/telegram-diagnostics.test.ts
  • src/lib/actions/sandbox/channel-status.ts

@sandl99

sandl99 commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

add new hooks type -> channel status health check -> call getMeReachability.
Then Channel status code will run the hooks of telegram health check status

@sandl99 sandl99 removed the v0.0.84 Release target label Jul 15, 2026
@sandl99 sandl99 self-requested a review July 15, 2026 03:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cli Command line interface, flags, terminal UX, or output area: messaging Messaging channels, bridges, manifests, or channel lifecycle feature PR adds or expands user-visible functionality integration: telegram Telegram integration or channel behavior VRDC Issues and PRs submitted by NVIDIA VRDC test team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[All Platforms][CLI&UX] channels status shows Telegram as all-[ok] while the bridge is unreachable — no runtime health probe for Telegram

5 participants