Skip to content

fix(cli): stop status/channels list/doctor emitting Matrix SDK deprecation warnings - #190257

Merged
obviyus merged 8 commits into
openclaw:mainfrom
jerome-queck:fix/190243-async-presence
Nov 8, 2026
Merged

obviyus merged 8 commits into
openclaw:mainfrom
jerome-queck:fix/190243-async-presence

Conversation

@jerome-queck

@jerome-queck jerome-queck commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #190243

What Problem This Solves

On an install with no Matrix configured, openclaw status, openclaw channels list and openclaw doctor each print two [DEP_PLUGIN_SDK] warnings blaming "Plugin matrix". Core caused them: these async command paths called the sync channel-presence resolvers, which run the bundled hasAnyMatrixAuth sync export (createPluginStateSyncKeyedStore + .entries()).

User Impact

Users no longer see deprecation noise they can't act on, and plugin authors aren't misled into thinking a third-party plugin needs migrating. Configured-channel detection is unchanged. It still reads saved auth, now through the async exportNameAsync probe.

Why

Async twins already existed (hasConfiguredChannelsForReadOnlyScopeAsync, listReadOnlyChannelPluginsForConfigAsync, and the Matrix hasAnyMatrixAuthAsync). The only change is switching the four call sites, which were already inside async functions:

  • src/commands/status.scan-overview.ts: hasConfiguredChannelsForReadOnlyScopeAsync
  • src/commands/status-all/channels.ts (buildChannelsTable, also reached by plain status): new resolveReadOnlyChannelPluginsForConfigAsync. It has the same scope and manifest records as the sync resolver and returns the same full resolution (missing ids, load failures).
  • src/commands/channels/list.ts and src/commands/doctor-security.ts: listReadOnlyChannelPluginsForConfigAsync

The sync compatibility exports are left alone until their 2026-12-31 removal.

Evidence

Real CLI on Linux, fresh HOME/OPENCLAW_HOME, built from this branch.

Before (main):

$ openclaw status   (same for channels list, doctor)
(node:…) [DEP_PLUGIN_SDK] DeprecationWarning: Plugin matrix: createPluginStateSyncKeyedStore is deprecated; use createPluginStateKeyedStoreV2 …
(node:…) [DEP_PLUGIN_SDK] DeprecationWarning: Plugin SDK: PluginStateSyncKeyedStore.entries is deprecated; …

After:

$ openclaw status          exit=0 stdout_lines=139 DEP_PLUGIN_SDK_lines=0
$ openclaw channels list   exit=0 stdout_lines=5   DEP_PLUGIN_SDK_lines=0
$ openclaw doctor          exit=0 stdout_lines=355 DEP_PLUGIN_SDK_lines=0

--trace-deprecation before the fix showed the call chains statusCommand → collectStatusScanOverview → buildChannelsTable / hasConfiguredChannelsForReadOnlyScope, channelsListCommand → listReadOnlyChannelPluginsForConfig and collectSecurityWarnings → listReadOnlyChannelPluginsForConfig, all ending at hasAnyMatrixAuth.

Tests:

  • New src/channels/plugins/read-only.async-presence.test.ts: a bundled plugin declares both sync and async persisted-auth exports. The async resolver detects the saved auth and never calls the sync export.
  • Updated mocks in the status, channels list and doctor-security tests to the async APIs, so a reintroduced sync call fails.
  • vitest: channels.list*, doctor-security, status*, status-all/channels, read-only*: 38 files, 346 tests passed. oxlint and oxfmt --check are clean, and pnpm build is green.

Base-red / head-green replay (head efa00bf)

Same 4 regression files, run with vitest run. Only the 5 non-test source files were reverted to the merge base f7d6774 for the base run; the tests are unchanged.

Run Source Test files Tests
Base f7d6774 source + PR tests 4 failed 48 failed / 48
Head efa00bf 4 passed 48 passed / 48

Base failure modes:

  • read-only.async-presence.test.ts: resolveReadOnlyChannelPluginsForConfigAsync is not a function. Base has no async full-resolution path, so status can only take the sync Matrix probe.
  • channels.list, status-all/channels, doctor-security: base calls the sync listReadOnlyChannelPluginsForConfig / sync resolver, and the async-only mocks reject it (No "listReadOnlyChannelPluginsForConfig" export is defined on the mock). This is the guard that fails if a sync call comes back.

Command-level warning capture (src/commands/channels.list.dep-warning.test.ts)

This runs the real channelsListCommand (openclaw channels list --json) against an on-disk config and a bundled channel fixture with saved auth. The fixture's legacy sync auth probe emits DEP_PLUGIN_SDK the way Matrix's does, and its async probe is silent. The test watches both process.emitWarning and the process warning event and asserts that no DEP_PLUGIN_SDK warning is emitted.

Base source (f7d6774's read-only.ts, channels/list.ts, status-all/channels.ts, status.scan-overview.ts, doctor-security.ts) with the new test:

AssertionError: expected [ 'DEP_PLUGIN_SDK' ] to not include 'DEP_PLUGIN_SDK'
      Tests  1 failed (1)

Head 708a05f:

      Tests  1 passed (1)

✨ Terminal recording (real built CLI, Linux)

Built with scripts/build-all.mts, then ran node openclaw.mjs channels list and node openclaw.mjs status with a fresh HOME/state dir and an explicit {} config (OPENCLAW_CONFIG_PATH). Base f7d6774 prints 2 [DEP_PLUGIN_SDK] DeprecationWarnings per command; the same steps rebuilt from PR head 708a05f print 0, exit 0.

channels list / status: base shows DEP_PLUGIN_SDK warnings, head shows none

@clawsweeper

clawsweeper Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added commands Command implementations size: S labels Nov 1, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 1, 2026
@clawsweeper

clawsweeper Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR switches status and channels list to existing async discovery APIs and removes an unused internal sync helper.

Example: Run openclaw status on Linux with an empty configuration and no Matrix account.

  • Before: The recorded baseline emits two DEP_PLUGIN_SDK warnings.
  • After: The recorded patched CLI emits no DEP_PLUGIN_SDK warnings and exits successfully.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Focused repair with inspected CLI proof, meaningful regression coverage, preserved state contracts, and passing current-head checks.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (recording): Inspected built-CLI recording at 708a05f shows channels list and status on Linux with an empty config and fresh HOME/state reducing DEP_PLUGIN_SDK warnings from two to zero, both exiting 0; the reviewed diff retains those async call sites and main's established resolver.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Routine diagnostic commands print misleading Matrix SDK warnings even without a configured Matrix account.
Reason: The change removes core-generated warning noise through existing async contracts; Doctor's corresponding production change is already on main.

Merge readiness

✅ Ready for maintainer review

This PR fixes remaining synchronous channel-discovery calls on current main; no blocking defect was found, and current-head checks pass.

Priority: P2
Reviewed head: 79160d228af0d6b386f8033fc6b2f327a238df3b

Before merge

None.

Findings

None.

Agent review details

How this fits together

CLI inventory and diagnostic commands combine configuration, plugin manifests, and saved-auth presence into channel tables and JSON output.

flowchart LR
A[CLI commands] --> B[Read only channel discovery]
B --> C[Channel presence policy]
C --> D[Async plugin auth probe]
D --> E[Existing plugin state]
B --> F[Tables and JSON]
Loading

Technical review

Best possible solution:

Merge the focused async-call-site repair while retaining the existing discovery, setup-preparation, and persisted-state owners.

Do we have a high-confidence way to reproduce the issue?

Current-main callers still reach the deprecated sync probe when saved-auth inspection runs, and the supplied CLI recording demonstrates that failure; no local reproduction was run.

Is this the best way to solve the issue?

The smallest complete repair is to await the existing async discovery APIs, preserve their selection options and diagnostics, and remove the now-unused internal boolean helper.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 491e537e524d.

Provenance checked

  • Read-only command discovery keeps the original intent (fix(cli): keep channel status checks off plugin runtimes #69479: Keep diagnostic and inventory commands off heavyweight plugin runtime loading.)
  • Effective channel presence and internal sync helper keeps the original intent (f4478a1: Centralize effective presence policy and prevent disabled plugins from appearing configured; the async counterpart retains that policy.)
  • Async saved-auth discovery keeps the original intent (5c70041: Move persisted channel account inspection onto awaited APIs while preserving existing contracts.)
  • Full status resolution keeps the original intent (f482e4d: Retain missing external-plugin repair diagnostics and distinguish them from disabled or untrusted owners.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 617f35d adds src/commands/channels/list.ts:158 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 617f35de0e7d; files: src/commands/channels/list.ts)
  • Gustavo Madeira Santana: Raw commit f4478a1 adds src/commands/status-all/channels.ts:210 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: f4478a142a41; files: src/commands/status-all/channels.ts)
  • Vincent Koc: Raw commit f482e4d adds src/commands/status-all/channels.ts:281 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: f482e4d3359c; files: src/commands/status-all/channels.ts)

PR surface

Source -7, Tests +150, Other +1. Total +144 across 14 files. Added test files: 2.

View PR surface stats
Area Files Added Removed Net
Source 5 7 14 -7
Tests 7 158 8 +150
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 4 3 +1
Total 14 169 25 +144

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Root-cause cluster

Relationship: same_root_cause
Canonical: #190243
Summary: The open report defines the bug, this PR carries its remaining repair, and the overlapping alternative was explicitly consolidated here.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: Misleading deprecation warnings add CLI confusion without blocking command completion.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 🎥 video: Contributor real behavior proof includes video or recording evidence.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (6 earlier review cycles)
  • reviewed 2026-11-01T11:15:51.057Z sha b7b2eda :: needs changes before merge. :: [P2] Migrate the Doctor audit spy to the async resolver | [P2] Make the changed mock factories satisfy the export ratchet
  • reviewed 2026-11-01T11:41:49.859Z sha efa00bf :: needs maintainer review before merge. :: none
  • reviewed 2026-11-02T05:11:56.795Z sha efa00bf :: needs maintainer review before merge. :: none
  • reviewed 2026-11-02T06:34:54.022Z sha 708a05f :: needs maintainer review before merge. :: none
  • reviewed 2026-11-02T07:20:51.562Z sha 708a05f :: needs maintainer review before merge. :: none
  • reviewed 2026-11-02T11:12:27.053Z sha 85a57e3 :: needs maintainer review before merge. :: none

Reviewed November 5, 2026, 6:21 AM ET / 11:21 UTC (Revision 7).

@jerome-queck

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Addressed both findings in efa00bf:

  • src/security/audit-channel-entry-authentication.test.ts: the spy now targets listReadOnlyChannelPluginsForConfigAsync with mockResolvedValue, so the WhatsApp and Slack fixtures are injected again (the test passes locally).
  • Mock-export ratchet: added a specific // mock-isolation: reason above each changed factory and ran check:test-mock-exports --prune (6432 → 6428, no expansion). check:max-lines-ratchet, check:assertion-safety and check:test-timeout-race-ratchet are OK.

CI on efa00bf is all green (70 success, 0 failures).

@clawsweeper

clawsweeper Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 1, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 1, 2026
@jerome-queck

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Added the base-red / head-green replay for the regression tests to the PR body (Tests gap from the last review). No code change; head is still efa00bf.

@clawsweeper

clawsweeper Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Nov 2, 2026
@clawsweeper clawsweeper Bot removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 2, 2026
…cope

All callers now use hasConfiguredChannelsForReadOnlyScopeAsync. Remove the
sync helper, its re-export from channel-plugin-ids, and the stale sync mock
in the status scan test helpers, matching openclaw#190280.

Co-authored-by: ericcurtin <[email protected]>

Copy link
Copy Markdown
Contributor Author

Folded in @ericcurtin's cleanup from #190280 (drop the now-unused sync hasConfiguredChannelsForReadOnlyScope) with co-author credit in 85a57e3.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 2, 2026
@jerome-queck

Copy link
Copy Markdown
Contributor Author

@obviyus when you have a moment, this is ClawSweeper 5/5/5 and ready for maintainer look (it also folds in @ericcurtin's overlapping change from #190280 with co-author credit); happy to adjust anything.

…ence

# Conflicts:
#	src/commands/doctor-security.test.ts
Comment thread src/channels/plugins/read-only.ts Fixed
Merge of main into fix/190243-async-presence left two
resolveReadOnlyChannelPluginsForConfigAsync exports. Keep main's
withPluginSetupPreparation path; remove the older simple duplicate
that broke transform/lint/types/prompt-snapshots.
Cover the async auth probe and channels-list DEP_PLUGIN_SDK silence
regressions that land with the read-only async presence fix.
Keep the async-presence allocation current with main's test-line ceiling.
@jerome-queck

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 5, 2026
@obviyus
obviyus merged commit c71a8b6 into openclaw:main Nov 8, 2026
132 checks passed
@obviyus

obviyus commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 9, 2026
…ation warnings (openclaw#190257)

* fix(cli): use async channel presence probes in status, channels list and doctor (openclaw#190243)

* test: migrate read-only resolver mocks to async APIs

* test(channels): prove channels list emits no DEP_PLUGIN_SDK warning

Refs openclaw#190243.

* refactor(plugins): drop unused sync hasConfiguredChannelsForReadOnlyScope

All callers now use hasConfiguredChannelsForReadOnlyScopeAsync. Remove the
sync helper, its re-export from channel-plugin-ids, and the stale sync mock
in the status scan test helpers, matching openclaw#190280.

Co-authored-by: ericcurtin <[email protected]>

* fix: drop duplicate async read-only resolver after main merge

Merge of main into fix/190243-async-presence left two
resolveReadOnlyChannelPluginsForConfigAsync exports. Keep main's
withPluginSetupPreparation path; remove the older simple duplicate
that broke transform/lint/types/prompt-snapshots.

* test: allocate test-lines for async presence proofs (openclaw#190243)

Cover the async auth probe and channels-list DEP_PLUGIN_SDK silence
regressions that land with the read-only async presence fix.

---------

Co-authored-by: jerome-queck <[email protected]>
Co-authored-by: ericcurtin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 🎥 video Contributor real behavior proof includes video or recording evidence. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

status / channels list / doctor print Matrix DEP_PLUGIN_SDK warnings on installs without Matrix (core calls sync presence probe from async paths)

3 participants