Gateway: preserve runtime state in health and skip disabled allowlist warnings#32715
Conversation
|
🤖 We're reviewing this PR with Aisle We're running a security check on the changes in this PR now. This usually takes a few minutes. ⌛ Progress:
Latest run failed. Keeping previous successful results. Trace ID: Last updated on: 2026-03-03T07:36:36Z Latest run failed. Keeping previous successful results. Trace ID: Last updated on: 2026-03-03T08:34:31Z |
Greptile SummaryThis PR fixes two related issues in the gateway: (1) the Issues found:
Confidence Score: 3/5
Last reviewed commit: 9118c7e |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9118c7e662
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
healthsnapshots rebuilt channel state from config/probe only, so live runtime fields (for examplerunning, token source details) could be dropped; doctor empty-allowlist warnings also fired for explicitly disabled channel/account scopes.openclaw channels status --jsonandopenclaw health --json, and noisy warnings for disabled integrations.buildChannelAccountSnapshot, gateway health-cache refresh now injects runtime snapshots before cache/broadcast, and doctor allowlist checks skip disabled channel/account scopes.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
openclaw health --jsonnow preserves live per-channel runtime state fields (for examplerunning, runtime token-source-derived fields) instead of dropping to config-only defaults.openclaw doctorno longer reports empty-allowlist warnings for scopes that are explicitly disabled (enabled: false).Security Impact (required)
No)No)No)No)No)Yes, explain risk + mitigation:Repro + Verification
Environment
health.snapshot.test.tsanddoctor-config-flow.test.tsSteps
running=trueand timestamps.channels.<id>andchannels.<id>.accounts.<accountId>fields.groupPolicy: "allowlist"butenabled: falsechannel/account scopes.Expected
Actual
Evidence
Human Verification (required)
What you personally verified (not just CI), and how:
pnpm test src/commands/health.snapshot.test.ts src/commands/doctor-config-flow.test.tspnpm test src/gateway/server-methods/server-methods.test.tsCompatibility / Migration
Yes)No)No)Failure Recovery (if this breaks)
src/commands/health.tssrc/gateway/server/health-state.tssrc/gateway/server.impl.tssrc/commands/doctor-config-flow.tsRisks and Mitigations
configured/probe/lastProbeAt; added regression test for runtime-field retention.