fix(health): use runtime snapshot for channel summaries#713
Open
BingqingLyu wants to merge 5 commits intomainfrom
Open
fix(health): use runtime snapshot for channel summaries#713BingqingLyu wants to merge 5 commits intomainfrom
BingqingLyu wants to merge 5 commits intomainfrom
Conversation
Keep probe results in health summaries when plugin snapshot builders omit the probe field, add regression coverage for that path, and harden health-state test cleanup via afterEach.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
openclaw health --jsonrebuilt channel summaries from config plus probe, but did not feed in the live gateway channel runtime snapshot.running: false,lastStartAt: null, andtokenSource: "none"inhealthwhilechannels statusand live traffic showed the same account running normally.lastStartAt(WhatsApp, Zalo) do not cause perpetual cache invalidation.channels.statusoutput path was changed.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
openclaw health --jsonreports Telegramrunning: false/tokenSource: "none"whilechannels status --jsonreportsrunning: true/tokenSource: "config"openclaw/openclaw#46494User-visible / Behavior Changes
openclaw health --jsonnow reflects live channel runtime fields when the gateway has them, instead of falling back to config/probe-only summaries for channels like Telegram.Security Impact (required)
Yes, explain risk + mitigation:Repro + Verification
Environment
openclaw@2026.3.13for before-state; patched checkout on this branch for after-state~/.openclaw/openclaw.json5withchannels.telegram.botTokenSteps
openclaw health --jsonwithopenclaw channels status --json.Expected
healthshould agree with the live runtime state for fields likerunning,lastStartAt,mode, andtokenSource.Actual
healthreported Telegram as stopped /tokenSource: "none"whilechannels statusreported the same account running from config.Evidence
Screenshot: before
Screenshot: after
Human Verification (required)
What you personally verified (not just CI), and how:
2026.3.13build, traced the issue intogetHealthSnapshot, confirmed the health cache could return a summary older than the live Telegram runtime, added regression tests for stale runtime-backed cache invalidation and for channels that omitlastStartAt, ran the targeted tests pluspnpm build, and captured a real before/after shell repro showing the mismatch on the installed build and agreement on this patched branch running from a proper git worktree.runningorlastStartAtis newer than the cache; channels that omitlastStartAt(WhatsApp, Zalo) no longer cause perpetual cache invalidation.Review Conversations
If a bot review conversation is addressed by this PR, resolve that conversation yourself. Do not leave bot review conversation cleanup for maintainers.
Compatibility / Migration
Failure Recovery (if this breaks)
49415a3,710e3f1,8dff28d, andf30ce95src/gateway/server-methods/health.ts,src/gateway/server/health-state.ts,src/gateway/server/health-state.test.ts,src/commands/health.tshealthstops reflecting live channel runtime fields after channels connect, or gateway shutdown leaves a stale health runtime provider behindRisks and Mitigations
AI-assisted: yes.