feat(messaging): telegram channels-status health probe - #6887
Conversation
Signed-off-by: Hung Le <hple@nvidia.com>
Signed-off-by: Hung Le <hple@nvidia.com>
…channels-status-health
Signed-off-by: Hung Le <hple@nvidia.com>
…channels-status-health
…state Signed-off-by: Hung Le <hple@nvidia.com>
…channels-status-health
Signed-off-by: Hung Le <hple@nvidia.com>
…channels-status-health
|
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. |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughTelegram channel status now supports OpenClaw log-tail health probes, structured verdicts, runtime signal reporting, paused-channel handling, and Hermes config-only fallback behavior. Shared status-hook infrastructure, tests, and documentation were updated. ChangesTelegram health diagnostics
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant CLI
participant ChannelStatus
participant StatusRunner
participant TelegramHook
participant Sandbox
participant Evaluator
CLI->>ChannelStatus: request detailed Telegram status
ChannelStatus->>StatusRunner: run status hooks
StatusRunner->>TelegramHook: pass probe inputs
TelegramHook->>Sandbox: inspect gateway log and processes
Sandbox-->>TelegramHook: bounded probe markers and breadcrumbs
TelegramHook->>Evaluator: evaluate Telegram evidence
Evaluator-->>ChannelStatus: health report and configuration signals
ChannelStatus-->>CLI: render verdict
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage remains at 96%, unchanged from the TypeScript / code-coverage/cliThe overall coverage in the Show a code coverage summary of the most impacted files.
Updated |
|
🌿 Preview your docs: https://nvidia-preview-pr-6887.docs.buildwithfern.com/nemoclaw |
PR Review Advisor — InformationalAdvisor assessment: Informational / high confidence Model lanes
Nemotron output stays in workflow artifacts and does not change the assessment above. E2E guidanceAdvisory only. E2E / PR Gate selects and runs jobs independently. Recommended E2E: 2 optional E2E recommendations
1 warning · 0 suggestionsWarningsWarnings do not block.
|
Signed-off-by: Hung Le <hple@nvidia.com>
…t-side Signed-off-by: Hung Le <hple@nvidia.com>
…channels-status-health
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (3)
src/lib/actions/sandbox/telegram-probe.test.ts (1)
33-33: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse a behavior-oriented suite title.
buildTelegramProbeInputis 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
pickVerdictre-derives config/policy state via signal-label string matching instead of readinginputdirectly.
input.channelEnabledInRegistryandinput.presetInRegistry/presetOnGatewayare already booleans onTelegramProbeInput; matching againstsignalsbylabel === "Channel registration"couplespickVerdictto the exact label strings used inconfigCoverageSignal/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 valueRemove the redundant
try/catcharounddeps.getGatewayPresets()
getGatewayPresets()already returnsnullfor gateway failures, so this wrapper only adds another path to reason about. Handle thenullcase 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
📒 Files selected for processing (16)
docs/reference/commands.mdxsrc/lib/actions/sandbox/channel-status-config-core.test.tssrc/lib/actions/sandbox/channel-status-summary.test.tssrc/lib/actions/sandbox/channel-status-telegram-policy.test.tssrc/lib/actions/sandbox/channel-status.test-helpers.tssrc/lib/actions/sandbox/channel-status.tssrc/lib/actions/sandbox/telegram-probe.test.tssrc/lib/actions/sandbox/telegram-probe.tssrc/lib/messaging/channels/telegram/manifest.tssrc/lib/messaging/diagnostics.test.tssrc/lib/messaging/diagnostics.tssrc/lib/messaging/manifest/types.tssrc/lib/sandbox/diagnostic-signal.tssrc/lib/sandbox/telegram-diagnostics.test.tssrc/lib/sandbox/telegram-diagnostics.tssrc/lib/sandbox/whatsapp-diagnostics.ts
There was a problem hiding this comment.
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 winHonor a later HTTP failure over earlier failure breadcrumbs.
lastHttpErroris included inlastEvidence, but the token/network branches never compare their timestamps to it. A401at index 0 followed by an HTTP502at index 1 still setstokenRejected, 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
📒 Files selected for processing (4)
src/lib/actions/sandbox/channel-status.test.tssrc/lib/actions/sandbox/channel-status.tssrc/lib/sandbox/telegram-diagnostics.test.tssrc/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
|
add new hooks type -> channel status health check -> call getMeReachability. |
…channels-status-health
Signed-off-by: Hung Le <hple@nvidia.com>
…s-status Signed-off-by: Hung Le <hple@nvidia.com>
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/lib/messaging/channels/telegram/hooks/status-health-eval.ts (1)
388-416: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winInclude HTTP errors in the final evidence winner.
lastHttpErrorparticipates inlastEvidence, but the followingelse ifchain never compares it when a prior token, network, or bridge marker exists. For example, a token rejection followed by HTTP 502 still returnstokenRejected, and a bridge timeout followed by HTTP 502 still returnsbridgeNotStarted, despite the HTTP error being newer.Update each failure branch to require its index to be at least
lastHttpError, and add regression coverage for a latest 5xx after each prior failure type.🐛 Suggested precedence fix
+ const lastAuthFailure = Math.max(lastTokenRejected, lastCredentialUnresolved); const lastEvidence = Math.max(lastReached, lastCause, lastBridgeNotStarted, lastHttpError); if (lastReached !== -1 && lastReached >= lastEvidence) { bc.providerReady = true; } else if ( - Math.max(lastTokenRejected, lastCredentialUnresolved) !== -1 && - Math.max(lastTokenRejected, lastCredentialUnresolved) >= lastNetworkFail + lastAuthFailure !== -1 && + lastAuthFailure >= Math.max(lastNetworkFail, lastHttpError) ) { ... - } else if (lastNetworkFail !== -1) { + } else if ( + lastNetworkFail !== -1 && + lastNetworkFail >= Math.max(lastBridgeNotStarted, lastHttpError) + ) { bc.startupFailedNetwork = true; - } else if (lastBridgeNotStarted !== -1) { + } else if (lastBridgeNotStarted !== -1 && lastBridgeNotStarted >= lastHttpError) { bc.bridgeNotStarted = true; } else if (lastHttpError !== -1) {🤖 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/messaging/channels/telegram/hooks/status-health-eval.ts` around lines 388 - 416, Update the failure precedence logic in the status-health evaluation chain around lastCause and lastEvidence so token/credential, network, and bridge-not-started branches only apply when their evidence index is at least lastHttpError; retain the existing reached precedence and ensure the HTTP-error branch wins when its 5xx evidence is newer. Add regression coverage for a latest 5xx following each prior failure type.
🧹 Nitpick comments (1)
src/lib/messaging/hooks/builtins.ts (1)
26-28: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDoc comment overstates scope of
statusHealthwiring.The comment says this is
"threaded into every channel'sphase:"status"health hook"
, but only the Telegram registration (Line 44-47) actually receiveswithStatusHealthOptions. Discord/Slack/Teams/Wechat registrations don't. Harmless today (Telegram is the onlylog-tailprobe channel) but misleading for the next channel that adds a status-health hook and assumes this is already generic.✏️ Suggested comment fix
- // Host capability threaded into every channel's `phase:"status"` health hook, - // so a status caller enables live probing without naming a specific channel. + // Host capability threaded into channels whose registration opts in via + // `withStatusHealthOptions` (currently Telegram's `phase:"status"` health + // hook), so a status caller enables live probing without naming a channel. readonly statusHealth?: ChannelStatusHealthHookOptions;Also applies to: 43-48
🤖 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/messaging/hooks/builtins.ts` around lines 26 - 28, Revise the doc comment above statusHealth to describe its current, non-generic wiring rather than claiming it reaches every channel’s phase:"status" health hook. Keep the explanation accurate for the Telegram registration using withStatusHealthOptions and avoid implying Discord, Slack, Teams, or Wechat receive these options.
🤖 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/messaging/channels/telegram/hooks/status-health.ts`:
- Around line 56-74: Treat the probe as reachable only when both the sandbox
command succeeds and the output contains TG_SHELL_OK: update the reachable
calculation in the status-health probe flow to require exec.status === 0,
preventing partial failed output from producing healthy breadcrumbs. Add a
regression test covering a non-zero exec status with otherwise healthy-looking
stdout and verify it is not reported healthy.
In `@src/lib/messaging/hooks/status-runner.ts`:
- Around line 105-116: Update readChannelHealthOutputs to validate the nested
report’s required ChannelHealthReport fields and value types before casting and
returning it. Reject malformed reports by returning an empty result, while
preserving the existing output kind and messaging-channel-health type checks.
---
Outside diff comments:
In `@src/lib/messaging/channels/telegram/hooks/status-health-eval.ts`:
- Around line 388-416: Update the failure precedence logic in the status-health
evaluation chain around lastCause and lastEvidence so token/credential, network,
and bridge-not-started branches only apply when their evidence index is at least
lastHttpError; retain the existing reached precedence and ensure the HTTP-error
branch wins when its 5xx evidence is newer. Add regression coverage for a latest
5xx following each prior failure type.
---
Nitpick comments:
In `@src/lib/messaging/hooks/builtins.ts`:
- Around line 26-28: Revise the doc comment above statusHealth to describe its
current, non-generic wiring rather than claiming it reaches every channel’s
phase:"status" health hook. Keep the explanation accurate for the Telegram
registration using withStatusHealthOptions and avoid implying Discord, Slack,
Teams, or Wechat receive these options.
🪄 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: c2ada8ba-bd16-4ea2-a5be-faffa7e3536d
📒 Files selected for processing (17)
docs/reference/commands.mdxsrc/lib/actions/sandbox/channel-status-telegram-policy.test.tssrc/lib/actions/sandbox/channel-status.test-helpers.tssrc/lib/actions/sandbox/channel-status.tssrc/lib/messaging/channels/channel-health.tssrc/lib/messaging/channels/telegram/hooks/get-me-reachability.tssrc/lib/messaging/channels/telegram/hooks/index.tssrc/lib/messaging/channels/telegram/hooks/status-health-eval.test.tssrc/lib/messaging/channels/telegram/hooks/status-health-eval.tssrc/lib/messaging/channels/telegram/hooks/status-health.test.tssrc/lib/messaging/channels/telegram/hooks/status-health.tssrc/lib/messaging/channels/telegram/manifest.tssrc/lib/messaging/compiler/manifest-compiler.test.tssrc/lib/messaging/hooks/builtins.tssrc/lib/messaging/hooks/hook-runner.test.tssrc/lib/messaging/hooks/status-runner.tssrc/lib/status-command-deps.ts
🚧 Files skipped from review as they are similar to previous changes (3)
- src/lib/messaging/channels/telegram/manifest.ts
- docs/reference/commands.mdx
- src/lib/actions/sandbox/channel-status.test-helpers.ts
…-health output Signed-off-by: Hung Le <hple@nvidia.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/lib/messaging/hooks/status-runner.test.ts (1)
7-14: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winKeep the test fixture type-safe.
as unknown as MessagingStatusHookRunResultbypasses compile-time validation of the runner output contract. TypeoutputsasMessagingStatusHookRunResult["outputs"]and return the object without the double assertion.As per path instructions, tests should preserve behavioral confidence without broad contract-bypassing mocks.
Proposed fix
function runResult( - outputs: Record<string, { kind: string; value: unknown }>, + outputs: MessagingStatusHookRunResult["outputs"], ): MessagingStatusHookRunResult { return { channelId: "telegram", hookId: "telegram-status-health", outputs, - } as unknown as MessagingStatusHookRunResult; + }; }🤖 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/messaging/hooks/status-runner.test.ts` around lines 7 - 14, Update the runResult test fixture to type outputs as MessagingStatusHookRunResult["outputs"], then return the object directly as a MessagingStatusHookRunResult without the as unknown as assertion. Preserve the existing fixture values and behavior while allowing TypeScript to validate the runner output contract.Source: Path instructions
🤖 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/messaging/hooks/status-runner.test.ts`:
- Around line 27-66: Update the enclosing describe title for
readChannelHealthOutputs to append the linked issue suffix "(`#6888`)" in the
required final format, leaving the child test titles and behavior unchanged.
---
Nitpick comments:
In `@src/lib/messaging/hooks/status-runner.test.ts`:
- Around line 7-14: Update the runResult test fixture to type outputs as
MessagingStatusHookRunResult["outputs"], then return the object directly as a
MessagingStatusHookRunResult without the as unknown as assertion. Preserve the
existing fixture values and behavior while allowing TypeScript to validate the
runner output contract.
🪄 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: 9e77f8d1-61a3-42b1-8d5f-512ea939b158
📒 Files selected for processing (4)
src/lib/messaging/channels/telegram/hooks/status-health.test.tssrc/lib/messaging/channels/telegram/hooks/status-health.tssrc/lib/messaging/hooks/status-runner.test.tssrc/lib/messaging/hooks/status-runner.ts
🚧 Files skipped from review as they are similar to previous changes (3)
- src/lib/messaging/channels/telegram/hooks/status-health.test.ts
- src/lib/messaging/hooks/status-runner.ts
- src/lib/messaging/channels/telegram/hooks/status-health.ts
…itle Signed-off-by: Hung Le <hple@nvidia.com>
…'t healthy after an outage Signed-off-by: Hung Le <hple@nvidia.com>
…up causes Signed-off-by: Hung Le <hple@nvidia.com>
<!-- markdownlint-disable MD041 --> ## Summary Replace the synthetic required-check identity with a native `E2E / PR Gate` job in the base-trusted `pull_request_target` workflow. The Checks API result becomes `E2E / PR Gate Coordination`, so suite-association ambiguity like the behavior observed on #6887 cannot leave the required native job unreported while exact-head/base validation and credentialed E2E authorization remain unchanged. ## Changes - Add a read-only native `E2E / PR Gate` job that executes from `github.workflow_sha`, waits for the trusted exact-diff coordination result, publishes the terminal verdict as its native job result, logs the validated trusted run link, and keeps the job summary static. - Rename the controller-created custom check to `E2E / PR Gate Coordination`; authenticate it by exact external identity and GitHub Actions app, retain the old name only as a rollout bridge, and keep maintainer-authorization states pending. - Classify the observer as trusted E2E controller code and add behavior, workflow-boundary, watch-trigger, risk-plan, lifecycle, and contributor documentation coverage. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [x] Code change with doc updates - [ ] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Quality Gates - [x] Tests added or updated for changed behavior - [ ] Existing tests cover changed behavior — justification: - [ ] Tests not applicable — justification: - [x] Docs updated for user-facing behavior changes - [ ] Docs not applicable — justification: - [x] 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: Required before merge; the new job is base-trusted, checks out `github.workflow_sha`, executes no PR code, and has only `checks: read`, `contents: read`, and `pull-requests: read`. - [ ] Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: ## Verification - [x] PR description includes a `Signed-off-by:` line and every commit appears as `Verified` in GitHub - [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or `npm run check:diff` passed when hooks were skipped or unavailable - [x] Targeted behavior tests pass for the current change set, or tests are marked not applicable above — `npx vitest run test/pr-e2e-required.test.ts test/pr-e2e-gate-workflow.test.ts` (27 passed); `npm run typecheck:cli`; `npm run test:projects:check` - [x] Applicable broad gate passed — `npm test` (1,510 files passed, 3 skipped; 17,207 tests passed, 40 skipped) - [ ] Quality Gates section completed with required justifications or waivers — pending sensitive-path review above - [x] No secrets, API keys, or credentials committed - [ ] `npm run docs` builds without warnings (doc changes only) — build passed with two pre-existing hidden Fern warnings - [ ] Doc pages follow the [style guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md) (doc changes only) - [ ] New doc pages include SPDX header and frontmatter (new pages only) --- Signed-off-by: Carlos Villela <cvillela@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a native required **E2E / PR Gate** workflow job that mirrors a trusted exact-diff E2E coordination verdict. * Introduced required-gate polling that passes only for the current base/head and fails closed if revisions change. * Updated the coordination check display name to **“E2E / PR Gate Coordination”**. * **Documentation** * Refined E2E/PR gate architecture docs, including evidence, authorization, cancellation, and rollout/migration behavior. * **Tests** * Added required-gate end-to-end coverage and expanded workflow/config and gate lifecycle assertions. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Carlos Villela <cvillela@nvidia.com>
E2E Target Results — ✅ All requested tests passedRun: 29409269763
|
<!-- markdownlint-disable MD041 --> ## Summary Adds the canonical `docs/changelog/2026-07-15.mdx` entry with the exact `## v0.0.84` heading for the release candidate range from `v0.0.83` through `710d2b36b9eebcb6bca3c2b2f796a1bdb69c3a31`. Fills two owner-page gaps for model-aware local inference health and pre-write OpenClaw candidate validation. ## Changes - Add the complete shared Fern changelog entry for `v0.0.84`, with literal CLI names and root-absolute OpenClaw and Hermes routes. - Document that sandbox status and doctor compare the configured Ollama or vLLM model with provider inventory without issuing a completion. - Document that host-side OpenClaw `config set` validates the complete candidate before replacing live config or reaching gateway restart. - Reconcile the `v0.0.84` release label with the commit range. PR #6773 is already contained in `v0.0.83` and remains documented there; CI, test-harness, docs-infrastructure, and `.js` to `.mts` migration-only changes require no additional user guidance. ### Source summary - [#6882](#6882) -> `docs/manage-sandboxes/backup-restore.mdx`, `docs/changelog/2026-07-15.mdx`: Explain that OpenClaw runtime identity and pairing state are excluded from snapshots and ignored during restore. - [#6873](#6873) -> `docs/inference/set-up-ollama.mdx`, `docs/changelog/2026-07-15.mdx`: Record the Ollama requested-model environment fallback and interactive default. - [#6835](#6835) -> `docs/changelog/2026-07-15.mdx`: Include the sandbox name in the documented rebuild resume-recovery behavior. - [#6886](#6886) -> `docs/inference/custom-endpoint-security.mdx`, `docs/inference/set-up-openai-compatible-endpoint.mdx`, `docs/changelog/2026-07-15.mdx`: Explain the exact-host trusted-private endpoint opt-in and retained SSRF boundaries. - [#6887](#6887) -> `docs/reference/commands.mdx`, `docs/changelog/2026-07-15.mdx`: Document Telegram channel health verdicts, summary behavior, and exit status. - [#6863](#6863) -> `docs/manage-sandboxes/lifecycle.mdx`, `docs/changelog/2026-07-15.mdx`: Add the missing model-inventory behavior for local status and doctor checks. - [#6902](#6902) -> `docs/manage-sandboxes/runtime-controls.mdx`, `docs/changelog/2026-07-15.mdx`: Add the missing pre-write OpenClaw candidate-validation contract. - [#6916](#6916) -> `docs/changelog/2026-07-15.mdx`: Preserve the failed-session fresh-install recovery correction in the release entry. - [#6934](#6934) -> `docs/reference/commands.mdx`, `docs/reference/troubleshooting.mdx`, `docs/security/credential-storage.mdx`, `docs/changelog/2026-07-15.mdx`: Summarize completed-prompt checkpointing and validated credential reuse during OpenClaw resume. - [#6898](#6898) -> `docs/inference/switch-models.mdx`, `docs/inference/switch-providers.mdx`, `docs/reference/troubleshooting.mdx`, `docs/changelog/2026-07-15.mdx`: Explain Hermes dashboard convergence after in-place inference changes. - [#6711](#6711) -> `docs/manage-sandboxes/run-sandboxes.mdx`, `docs/manage-sandboxes/uninstall-nemoclaw.mdx`, `docs/reference/architecture.mdx`, `docs/reference/commands.mdx`, `docs/changelog/2026-07-15.mdx`: Summarize port-scoped host state and uninstall preservation. - [#6767](#6767) -> `docs/inference/configure-model-limits.mdx`, `docs/inference/set-up-ollama.mdx`, `docs/reference/troubleshooting.mdx`, `docs/changelog/2026-07-15.mdx`: Record the Hermes `64000`-token Ollama floor and unchanged OpenClaw floor. - [#6862](#6862) -> `docs/get-started/quickstart.mdx`, `docs/inference/verify-inference-route.mdx`, `docs/changelog/2026-07-15.mdx`: Explain retryable not-ready finalization for unhealthy inference routes. - [#6766](#6766) -> `docs/security/tcb-boundary.mdx`, `docs/changelog/2026-07-15.mdx`: Document definitive stale transition-lock recovery and fail-closed ambiguous cases. - [#6948](#6948) -> `docs/manage-sandboxes/manage-mcp-servers.mdx`, `docs/changelog/2026-07-15.mdx`: Include Hermes MCP apply-state race recovery in the release entry without changing the established user workflow. - [#6964](#6964) -> `docs/reference/troubleshooting.mdx`, `docs/changelog/2026-07-15.mdx`: Record complete agent-specific fresh-install and resume recovery commands. - [#6883](#6883) -> `docs/get-started/quickstart.mdx`, `docs/inference/set-up-vllm.mdx`, `docs/reference/platform-support.mdx`, `docs/changelog/2026-07-15.mdx`: Summarize the DGX Station Nemotron Ultra express path and pinned managed-vLLM recipe. - [#6985](#6985) -> `docs/inference/set-up-vllm.mdx`, `docs/reference/commands.mdx`, `docs/changelog/2026-07-15.mdx`: Capture the final automated and interactive storage-warning behavior. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [ ] Code change with doc updates - [x] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Quality Gates - [ ] Tests added or updated for changed behavior - [x] Existing tests cover changed behavior — `test/changelog-docs.test.ts` validates the dated-entry structure, exact version heading, and preserved history. - [ ] Tests not applicable — justification: - [x] 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 - [x] PR description includes a `Signed-off-by:` line and every commit appears as `Verified` in GitHub - [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or `npm run check:diff` passed when hooks were skipped or unavailable - [x] Targeted behavior tests pass for the current change set, or tests are marked not applicable above — `npx vitest run test/changelog-docs.test.ts` (6 passed) - [ ] Applicable broad gate passed — `npm test` for broad runtime/test-harness changes; `npm run check` for repo-wide validation/coverage changes — not run for this doc-only change. - [x] Quality Gates section completed with required justifications or waivers - [x] No secrets, API keys, or credentials committed - [ ] `npm run docs` builds without warnings (doc changes only) — completed with 0 errors; Fern reported the unchanged unauthenticated redirect-check and light-theme contrast warnings. - [x] Doc pages follow the [style guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md) (doc changes only) - [ ] New doc pages include SPDX header and frontmatter (new pages only) — the native changelog entry uses the required parser-safe MDX SPDX comment and intentionally has no frontmatter. --- Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added the v0.0.84 changelog entry covering setup, endpoint onboarding, model handling, sandbox readiness, recovery, channel status, and configuration safeguards. * Clarified that sandbox health checks validate configured models against local Ollama and vLLM provider inventories without generating completions or consuming tokens. * Documented that invalid runtime configuration changes are rejected while preserving the existing working configuration. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
…#7015) <!-- markdownlint-disable MD041 --> ## Summary `nemoclaw <sandbox> channels status --channel whatsapp` reported a working, paired WhatsApp bot as `unpaired` with a dead bridge: the probe checked the pre-2026.6.10 session path and pgrep'd for a separate bridge process that no longer exists (the bridge now runs in-process inside the gateway). This teaches the probe the current OpenClaw session location and derives in-process liveness from the canonical gateway log, and moves the whole probe into a manifest-first `phase:"status"` hook so `channel-status.ts` carries zero WhatsApp-specific code (mirroring the Telegram hook from #6887). ## Related Issue Fixes #7016 ## Changes <!-- List concrete changes. If this adds an abstraction, configuration, fallback, migration, or compatibility path, name its current requirement and consumer, explain why a direct change is insufficient, and identify the test that protects it. --> - Probe the current OpenClaw session path `credentials/whatsapp/<account>` in addition to the legacy `whatsapp/` dir (OpenClaw 2026.6.10+ stores the paired Baileys session there), so a paired sandbox is no longer misread as `unpaired`. - Derive in-process-bridge liveness from the canonical in-sandbox gateway log `/tmp/gateway.log` (where NemoClaw redirects gateway stdout, per `agent/gateway-script-shared.ts`; the same log the Telegram hook reads), scoped to `[whatsapp]` lines and emitting **only** markers + a redacted ISO timestamp — never a raw log line that could carry a phone number. - Require a clean probe exit (`exec.status === 0`) before trusting the result, so a timed-out probe classifies as `probe_failed` instead of reading a verdict off partial stdout (matches the Telegram hook). - Refactor (not a new abstraction — adopts the existing manifest-first status-hook architecture #6887 introduced for Telegram, its §8-deferred follow-up): move the probe + evaluator to `messaging/channels/whatsapp/hooks/{status-health,status-health-eval}.ts`, register a `phase:"status"` hook in the whatsapp manifest, and run it through the generic status-hook runner. `channel-status.ts` loses ~312 lines of WhatsApp-specific code; its dispatch now routes both `in-sandbox-qr` and `log-tail` deep-probe channels through the same generic `runChannelHealthHook`. Deletes `sandbox/whatsapp-diagnostics.ts`. - Protected by `messaging/channels/whatsapp/hooks/status-health.test.ts` + `status-health-eval.test.ts`: credentials-path evidence, gateway-log heartbeat synthesis, `/tmp/gateway.log` path assertion (guards the path regression), non-zero-exit → `probe_failed`, and a `sh -n` syntax check of the generated probe script. ## Type of Change - [x] 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 <!-- Check one tests line and one docs line. Check other lines when applicable. Add every requested justification or approval reference. --> - [x] Tests added or updated for changed behavior - [x] Docs not applicable — justification: no user-facing command, flag, or output contract changed; this corrects the accuracy of an existing diagnostic. - [ ] Tests not applicable — justification: - [ ] Docs updated for user-facing behavior changes - [ ] Docs not applicable — justification: - [x] Sensitive paths changed (messaging + sandbox) - [ ] 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 <!-- Check each applicable item only when supported by the requested evidence. Run targeted tests once per relevant change set and rerun after later edits or hook autofixes that can affect the tested behavior. Do not rerun hook-covered checks. --> - [ ] 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](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md) (doc changes only) - [ ] New doc pages include SPDX header and frontmatter (new pages only) --- <!-- DCO sign-off is required in this PR description, and every commit must appear as Verified in GitHub. Run: git config user.name && git config user.email --> Signed-off-by: Hung Le <hple@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added a manifest-driven WhatsApp channel health hook (`whatsapp.statusHealth`) that reports bridge liveness and heartbeat when available (OpenClaw-based; Hermes bypasses the probe). - **Bug Fixes** - Updated sandbox channel status to prefer the declared channel-health hook and fall back to config-only output when missing or paused. - Improved health/verdict handling, including correct “stopped bridge” classification and safer handling of malformed/unreliable probe output. - **Tests** - Expanded hook registration, verdict mapping, redaction, and robustness tests, plus updated sandbox integration expectations. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Hung Le <hple@nvidia.com> Signed-off-by: Apurv Kumaria <akumaria@nvidia.com> Signed-off-by: Carlos Villela <cvillela@nvidia.com> Co-authored-by: Apurv Kumaria <akumaria@nvidia.com> Co-authored-by: Carlos Villela <cvillela@nvidia.com> Co-authored-by: cjagwani <cjagwani@nvidia.com>
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 defaultchannels statussummary now prints an honestRuntime health: not checkedpointer for probe-capable channels instead of a silent all-green, and--channel telegrammerges 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
src/lib/sandbox/telegram-diagnostics.ts(verdict + hints, fixture-testable, no I/O) and host-side probesrc/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.deepProbemarker from"in-sandbox-qr"to"in-sandbox-qr" | "log-tail", derived from a new declarative manifest fieldChannelManifest.diagnosticsProbe. Current consumer: Telegram only (declaresdiagnosticsProbe: "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 aLOG_TAIL_EVALUATORSchannel→evaluator map, gated to OpenClaw (the only agent with the breadcrumb producer). Protected bymessaging/diagnostics.test.tsand thechannel-statusdispatch/Hermes-fallback tests.DiagnosticSeverity/DiagnosticSignalintosrc/lib/sandbox/diagnostic-signal.tsso the WhatsApp and Telegram report union uses one type (WhatsApp re-exports for existing importers).--channel telegrammerges 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).healthy; one blocked again reportsunreachable). Recognizes OpenClaw's ownInbound message telegram:/isolated polling ingress startedandNetwork request … failed/UND_ERR_SOCKETlines, since the preload does not reliably emit its positive breadcrumbs.docs/reference/commands.mdxchannels statussection documents the Telegram probe, verdicts, exit code, and summary pointer.Type of Change
Quality Gates
Verification
Signed-off-by:line and every commit appears asVerifiedin GitHubpre-commit,commit-msg, andpre-pushhooks passed, ornpm run check:diffpassed when hooks were skipped or unavailablenpm testfor broad runtime/test-harness changes;npm run checkfor repo-wide validation/coverage changes — command/result:npm run docsbuilds without warnings (doc changes only)Signed-off-by: Hung Le hple@nvidia.com
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
channels statusdocs to reflect new probing behavior, verdicts, and exit/probe limitations.