Skip to content

[Bug] matrix/doctor: channels.matrix.dm.policy 'trusted' rejected after 2026.4.7 upgrade with no doctor migration #62931

@lukeboyett

Description

@lukeboyett

Bug Report

Upgrading from v2026.4.5 to v2026.4.7 causes the gateway to fail validation and refuse to start with:

Config invalid
File: ~/.openclaw/openclaw.json
Problem:
  - channels.matrix.dm.policy: Invalid option: expected one of "pairing"|"allowlist"|"open"|"disabled"

Run: openclaw doctor --fix

The offending value is "policy": "trusted", which had been present in the config for ~2 months across multiple OpenClaw versions without any prior validation error or deprecation warning.

Severity

Stealth breaking change. The 2026.4.7 release notes do not contain a ### Breaking section and make no mention of this enum change. The gateway hard-fails to start, which is an unfortunate failure mode mid-upgrade.

Doctor does not migrate

Running openclaw doctor --fix does not migrate or correct the value — it only re-reports the validation error:

Invalid config:
- channels.matrix.dm.policy: Invalid option: expected one of "pairing"|"allowlist"|"open"|"disabled"
│
└  Doctor complete.

This contradicts the error message own advice (Run: openclaw doctor --fix).

Reproduction

  1. Have a Matrix DM config with channels.matrix.dm.policy: "trusted" and an allowFrom allowlist (any prior-version config that originated this value will do)
  2. Upgrade to v2026.4.7
  3. Start the gateway → hard-fails with Config invalid
  4. Run openclaw doctor --fix → does not migrate

Environment

  • OpenClaw: 2026.4.7 (upgraded from 2026.4.5)
  • Platform: macOS LaunchDaemon
  • Node: 25.6.0

Expected Behavior

One of:

  1. doctor --fix migrates the value automatically. A "trusted" policy with an allowFrom list maps cleanly to "allowlist" (which is what I had to do manually). A "trusted" policy without an allowlist could map to "pairing".
  2. The release notes call out the breaking enum change under ### Breaking, with explicit migration instructions.
  3. Backward-compat: silently accept "trusted" as an alias for "allowlist" for some grace period, with a deprecation warning.

Currently none of these happen — the gateway refuses to start and doctor is non-functional for this case.

Workaround

Manually edit ~/.openclaw/openclaw.json:

 "channels": {
   "matrix": {
     "dm": {
       "enabled": true,
-      "policy": "trusted",
+      "policy": "allowlist",
       "allowFrom": ["@user:example.com"]
     }
   }
 }

Additional Context

Looking at the v2026.4.5..v2026.4.7 git range, the most likely culprit is the Matrix invite auto-join refactor (Matrix: prompt invite auto-join during onboarding (#62168)), which restructured extensions/matrix/src/onboarding.ts and adjacent config-update paths. The current canonical enum lives at extensions/matrix/src/matrix/monitor/verification-events.ts as "open" | "pairing" | "allowlist" | "disabled". There is no fallback for legacy "trusted" in any code path I could find.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions