Repository navigation
Closed
Labels
P0Emergency: data loss, security bypass, crash loop, or unusable core runtime.Emergency: data loss, security bypass, crash loop, or unusable core runtime.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.impact:data-lossCan lose, corrupt, or silently drop user/session/config data.Can lose, corrupt, or silently drop user/session/config data.impact:ux-release-blockerA non-technical user is blocked without terminal, logs, config, or support.A non-technical user is blocked without terminal, logs, config, or support.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.maturity:stableBroken existing behavior primarily owned by an M4/M5 scorecard surface.Broken existing behavior primarily owned by an M4/M5 scorecard surface.
Description
Bug Report: Upgrade from 2026.6.8 → 2026.6.9 Corrupts email channel config
Description
When upgrading from OpenClaw 2026.6.8 to 2026.6.9, the upgrade process incorrectly writes a groupAllowFrom field into the channels.email.accounts.default section of openclaw.json, which is invalid for the email plugin schema. This causes the Gateway to fail to start with the following error:
Config validation failed: channels.email.accounts.default: invalid config for plugin email: must not have additional properties: "groupAllowFrom"
Steps to Reproduce
- Have a working OpenClaw 2026.6.8 configuration with email channel configured
- Trigger upgrade to 2026.6.9
- Observe that
openclaw.jsonnow contains an erroneousgroupAllowFromfield underchannels.email.accounts.default - Gateway fails to start
Expected Behavior
Upgrade process should preserve the email account configuration without injecting groupAllowFrom into it. The groupAllowFrom field is valid only for Feishu channel configuration (channels.feishu.groupAllowFrom).
Evidence
Config diff (before → after upgrade):
"feishu": { ... },
"email": {
"enabled": true,
"accounts": {
"default": {
"enabled": true,
"email": "wayneye@claw.163.com",
"transport": "ws",
"apiKey": "***",
"allowFrom": ["*"]
+ "groupAllowFrom": ["*"] ← incorrectly injected
}
}
}Impact
- Gateway fails to start after upgrade
- Email channel becomes unavailable
- OpenClaw auto-restore mechanism eventually recovers (reverts to last-known-good), but the first start after upgrade always fails
Environment
- macOS 26.5.1 (arm64)
- OpenClaw 2026.6.9
- Email plugin via ClawMail (claw.163.com)
Reacted by clawsweeper
Metadata
Metadata
Assignees
Labels
P0Emergency: data loss, security bypass, crash loop, or unusable core runtime.Emergency: data loss, security bypass, crash loop, or unusable core runtime.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.impact:data-lossCan lose, corrupt, or silently drop user/session/config data.Can lose, corrupt, or silently drop user/session/config data.impact:ux-release-blockerA non-technical user is blocked without terminal, logs, config, or support.A non-technical user is blocked without terminal, logs, config, or support.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.maturity:stableBroken existing behavior primarily owned by an M4/M5 scorecard surface.Broken existing behavior primarily owned by an M4/M5 scorecard surface.
Type
Fields
Priority
None yet
Activity
clawsweeper commentedon Jun 21, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed July 5, 2026, 4:56 AM ET / 08:56 UTC.
Summary
Keep open: current main and the latest v2026.6.11 release still have the permissive doctor migration path that can write
groupAllowFrominto schemaless external channel config, and #95540 is still the open fix candidate rather than a merged implementation.Reproducibility: yes. for source-level reproduction: current main and v2026.6.11 still permit missing-schema writes and then assign
groupAllowFromonto records. Reporter comments add live ClawMail upgrade evidence and an independent external RCS plugin reproduction, though this review did not rerun the packaged upgrade path.Root-cause cluster
Relationship:
canonicalCanonical: #95515
Summary: This issue is the canonical report for the external-channel
groupAllowFromdoctor/update corruption; one open PR is the focused fix candidate, while broader config-protection work is only partially overlapping.Members:
fixed_by_candidate: fix(doctor): skip groupAllowFrom migration for schemaless external channels #95540 - The open PR uses closing syntax for this issue and changes the exact missing-schema write guard with focused regression coverage.superseded: fix(doctor): prevent writing groupAllowFrom to external channel plugins without schema #95518 - The closed unmerged PR proposed the same conservative missing-schema guard but is no longer the viable landing candidate.partial_overlap: fix(channels): protect channel config repair paths #83081 - The draft PR addresses broader channel config protection but does not specifically close or prove this external email/RCS migration failure.adjacent_distinct: doctor --fix relocates channels.slack top-level allowFrom/groupPolicy into accounts.default, detaching the gate from named accounts (breaks auth on multi-account Slack) #97218 - The closed Slack report is in the same upgrade-time channel config family but describes a different relocation/promotion failure mode.Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.
Next step
No new repair lane should be queued because #95540 is already the focused open fix candidate for this issue.
Maintainer decision needed
groupAllowFromwrites when it cannot see a channel plugin schema, or should external plugins get an explicit opt-in migration contract first?Review details
Best possible solution:
Land #95540 or an equivalent schema-verified doctor guard with the external-channel regression test, then close this issue from the merged fix.
Do we have a high-confidence way to reproduce the issue?
Yes for source-level reproduction: current main and v2026.6.11 still permit missing-schema writes and then assign
groupAllowFromonto records. Reporter comments add live ClawMail upgrade evidence and an independent external RCS plugin reproduction, though this review did not rerun the packaged upgrade path.Is this the best way to solve the issue?
Yes, the best narrow fix is the schema-verified doctor write guard in #95540 or an equivalent change at the same write decision point. The broader protected-config draft is adjacent but not yet a cleaner proven replacement for this exact regression.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning high; reviewed against 7e0d530e07d6.
Label changes
Label changes:
P0: A released update path can write invalid config and block Gateway startup, with recovery requiring manual config inspection or editing.impact:ux-release-blocker: A community user can be blocked during update recovery unless they manually find and remove the illegal config field.maturity:stable:cli-install-update-onboard-doctoris scored M4 Stable, and this issue affects its Doctor and Updates/Upgrades path.issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label.clawsweeper:source-repro: Current issue advisory state selects this label.clawsweeper:linked-pr-open: Current issue advisory state selects this label.P1: Current review triage priority is P0, so this older priority label is no longer current.clawsweeper:needs-maintainer-review: Current issue advisory state no longer selects this label.clawsweeper:needs-live-repro: Current issue advisory state no longer selects this label.impact:message-loss: Current review impact labels areimpact:data-loss,impact:crash-loop,impact:ux-release-blocker.issue-rating: 🐚 platinum hermit: Current issue advisory state no longer selects this label.Label justifications:
P0: A released update path can write invalid config and block Gateway startup, with recovery requiring manual config inspection or editing.impact:data-loss: The report is about doctor/update repair corrupting persistedopenclaw.jsonchannel config.impact:crash-loop: The invalid plugin config causes Gateway startup validation to fail after upgrade.impact:ux-release-blocker: A community user can be blocked during update recovery unless they manually find and remove the illegal config field.maturity:stable:cli-install-update-onboard-doctoris scored M4 Stable, and this issue affects its Doctor and Updates/Upgrades path.Evidence reviewed
What I checked:
AGENTS.mdwas read fully and applied; its config compatibility and plugin-owned repair guidance is directly relevant to this doctor migration bug. (AGENTS.md:41, 7e0d530e07d6)generatedSchemaAllowsGroupAllowFromreturns true when no bundled channel schema exists, which matches the external email/RCS plugin failure mode. (src/commands/doctor/shared/allowfrom-fallback-migration.ts:108, 7e0d530e07d6)migrateRecordassignsgroupAllowFromdirectly onto the channel or account record. (src/commands/doctor/shared/allowfrom-fallback-migration.ts:137, 7e0d530e07d6)maybeRepairGroupAllowFromFallback, so the helper is reachable from doctor/update-style config repair. (src/commands/doctor/repair-sequencing.ts:163, 7e0d530e07d6)groupAllowFromFallbackToAllowFrom: true, matching the independent RCS reproduction's source-level root cause. (src/commands/doctor/channel-capabilities.ts:19, 7e0d530e07d6)invalid config for plugin ..., the same class of startup error reported for the email plugin. (src/config/validation.ts:1723, 7e0d530e07d6)Likely related people:
src/commands/doctor/shared/allowfrom-fallback-migration.ts,src/commands/doctor/shared/allowfrom-fallback-migration.test.ts,src/commands/doctor/repair-sequencing.ts)src/commands/doctor/shared/allowfrom-fallback-migration.ts,src/commands/doctor/channel-capabilities.ts,src/config)src/commands/doctor/shared/allowfrom-fallback-migration.ts,src/commands/doctor/shared/allowfrom-fallback-migration.test.ts)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.starpig1981 commentedon Jun 24, 2026
Bug still reproduces on 2026.6.10 upgrade — providing live evidence
I just hit this again trying to upgrade from 2026.6.9 → 2026.6.10. The fix has not landed.
Timeline (today, 2026-06-24 ~20:23 local Asia/Shanghai)
openclaw updatetriggered upgrade to 2026.6.10~/.openclaw/openclaw.jsonopenclaw.json.last-goodFile-level evidence on disk
Three files preserved from this run:
1.
openclaw.json.pre-update(state right before upgrade, valid):2.
openclaw.json.clobbered.2026-06-24T12-23-14-668Z(what upgrade script wrote, INVALID):3.
openclaw.json(current / last-good after auto-rollback):So the doctor migration copied
channels.feishu.groupAllowFromintochannels.email.accounts.default.*during the upgrade. The Feishu value stayed where it should be; the email account got an extra illegal copy.Why the email account rejects it
Per
config.schema.lookup channels.email.accounts.default:{ "type": "object", "additionalProperties": false }Plus
ghp_…account schemas do not declaregroupAllowFrom. So the schema-validate-on-startup guard fires and gateway refuses to boot.Confirmation this is the same doctor migration bug
groupAllowFrom)email.accounts.default.*)last-known-goodrollback)Repro recipe for maintainers
Suggested direction (informational, not a PR)
The narrow guard from #95518 looked right to me as a user — refusing doctor writes to fields not present in the bundled schema for that account type. Happy to test a new build if maintainers want a live confirmation run before merging.
starpig1981 commentedon Jun 24, 2026
Followup #2: Historical pattern from config-audit.jsonl
I dug into
~/.openclaw/logs/config-audit.jsonland found the same bug has fired at least 4 times, not just on 6.10. Every occurrence has identical fingerprint:cwd=/opt/homebrew/lib/node_modules/openclaw, argv=doctor --non-interactive --fix, config grows by ~59 bytes (exactly onegroupAllowFromarray injected underchannels.email.accounts.<acc>).Pattern from audit log
doctor --non-interactive --fix(cwdnode_modules/openclaw)All five events: argv starts with
node /opt/homebrew/lib/node_modules/openclaw/dist/index.js, cwd is the package install dir. None of the user-driven writes (e.g.openclaw config patch,openclaw plugins install,openclaw hooks enable) ever produce this diff.Two argv variants observed
doctor --non-interactive --fix, cwdnode_modules/openclaw— the buggy path.doctor --fix, cwd/Users/wayne— runs the schema validator and triggers last-good restore when invalid.The first is invoked by the update flow (right before
update --json --yeson the same pid chain). It writes a mutated config and lets the gateway boot detect the corruption.Why the "auto-rollback" only fires sometimes
Looking at
config-health.json, gateway only rolls back when it actually re-reads the config and finds it invalid against the live schema. The 6.10 and 6.21 events triggered it because they were followed by an immediate gateway restart or by adoctor --fix(cwd home) which runs the validator before next boot. The earlier ones (6.10/6.13/6.19) didn't roll back — but they also injected the bad field, it just wasn't caught until something else triggered a re-read.So
additionalProperties: falsehas likely been in place since at least 6.10; the doctor migration has been wrong for the same time. It's just that nobody re-read the schema against the email account between those events.One more thing: gateway uptime is fine, the user is unaffected
The
last-known-goodfallback saved us every time. Config health file shows the currentlastKnownGoodhashafde000e…is the post-6.9 clean state (7259 bytes), gateway is healthy on 2026.6.9. We just can't get pastdoctor --fixduring upgrade.Suggested next steps (still informational)
node_modules/openclawand refuse to write tochannels.email.accounts.*.groupAllowFrom(or any field not declared in the per-account schema).Happy to run any of these against a test build if maintainers want a live confirmation.
starpig1981 commentedon Jun 24, 2026
Followup #3: 6.10 upgrade confirms bug still fires — and
last-known-goodfallback isn't bulletproofUpgraded to 2026.6.10 (aa69b12) today and got clean confirmation the doctor migration bug still injects
groupAllowFromintochannels.email.accounts.default. But I owe you a correction on my last comment: the gateway's automatic rollback did NOT save me this time. I manually removed the illegal field between the bad write and the next gateway boot.Audit log (corrected reading)
/Users/wayne/.openclawdoctor --non-interactive --fix/opt/homebrew/lib/node_modules/openclawgroupAllowFromfrom email account/Users/wayne/.openclawThe previous comment claimed gateway auto-rolled-back to last-good. That was wrong —
config-health.jsonshows the newlastKnownGoodhash2164a3dd…matches the post-manual-fix hash, not the prior last-goodafde000e…. So this run actually relied on the user noticing and patching the config before the gateway restart could detect and react.Implication for fallback reliability
Looking back at the 5 historical events:
observe→ restore path — only because a seconddoctor --fixfrom a non-upgrade cwd happened to run and caught the corruptionSo the
last-known-goodmechanism is reactive, not proactive. It only kicks in when something forces a re-validate at exactly the right moment. If the user (or some other automation) doesn't trigger a re-read, the bad config sits there silently.This actually makes the doctor writeback bug more dangerous than my earlier analysis suggested — it can persist across many restarts on older versions, and even on 6.10 it depends on timing.
Concrete fix proposal (revised)
The conservative guard from #95518 (skip writes for fields not in the target schema) remains the right primary fix. But I'd add:
doctor --fix: before renaming the new config, validate it against the per-account-type schema. If it fails, refuse to write and report.doctor --validate(no fix) and abort the upgrade with a clear error if the resulting config is invalid. This turns the silent corruption into a loud failure at the exact point it's introduced.cwd-aware write guard as a defense in depth: if cwd isnode_modules/openclaw(i.e. upgrade-context), refuse to write to anychannels.*.accounts.*field that isn't in the bundled per-account schema.Option 2 is probably the smallest delta that would have prevented today's event — and it would have surfaced the bug as a clear upgrade failure instead of leaving the user to debug why their gateway won't start.
Status
Local workaround: pre-validate config before upgrade (
openclaw config validate), and after upgrade manually verify no illegal fields underchannels.email.accounts.*. Documenting in case other users hit this.clawSean commentedon Jul 4, 2026
Independent reproduction with a different external channel plugin — this is not specific to the ClawMail email plugin.
Setup: locally-developed external RCS channel plugin in
~/.openclaw/extensions/rcs/, strict config schema (additionalProperties: false),channels.rcs.allowFrompopulated.Trigger:
openclaw update. Result:The repair copied
channels.rcs.allowFrom→channels.rcs.groupAllowFrom, then validation against the plugin's own schema rejected the key it had just written, and the Gateway failed to start.Root cause confirmed in source (
src/commands/doctor/shared/allowfrom-fallback-migration.ts+src/commands/doctor/channel-capabilities.ts) — two permissive defaults compound for external plugins, because the repair runs before external plugins are loaded into the registry:getDoctorChannelCapabilities()finds no bundled manifest metadata and no registered plugin, so it falls back toDEFAULT_DOCTOR_CHANNEL_CAPABILITIESwithgroupAllowFromFallbackToAllowFrom: true.generatedSchemaAllowsGroupAllowFrom()returns!schema || schemaAllowsConfigPath(...)— a channel absent fromGENERATED_BUNDLED_CHANNEL_CONFIG_METADATA(i.e., every external plugin) has no schema there, so the write is allowed by default.So doctor writes a key into a config section whose schema it cannot see, and any external channel plugin with a strict schema crashes on the next update. Trying to declare
doctorCapabilities.groupAllowFromFallbackToAllowFrom: falsein the plugin doesn't help — the repair runs before the plugin loads, so core never sees it. The only plugin-side workaround is absorbing the field (acceptinggroupAllowFromin the plugin schema), which shouldn't be necessary.The conservative-by-default approach in #95540 (skip the migration when core has no schema for the channel) matches exactly what we'd have proposed. +1 on landing that.
clawSean commentedon Jul 25, 2026
A current-main revival of ZengWen-DT's fix from #95540 is now available in #113863.
The original patch and focused regression test are preserved with ZengWen-DT as the commit author. Exact current
mainstill reproduced the permissive missing-schema write, while both prior narrow fixes were closed unmerged.Fresh validation on the replacement head: focused test
7/7,oxfmtclean,oxlintclean,git diff --checkclean, plus before/after helper output showing the external channel remains untouched while the bundled-channel migration still runs.obviyus commentedon Jul 30, 2026
Fixed on
mainby edbb1fc (#116025).The doctor
groupAllowFromfallback now fails closed when a channel has no generated schema metadata, which is exactly the case for extension-installed channels like ClawMail/agentmail (src/commands/doctor/shared/allowfrom-fallback-migration.ts:108-112):That guard gates the write at
:179, so upgrade/doctor can no longer injectgroupAllowFrominto an email account config and trip the plugin's schema validation on startup.If your config was already corrupted by an earlier run, remove the spurious
groupAllowFromkey once and re-runopenclaw doctor— the key will not come back.Closing as fixed. Thanks for the precise report; the "doctor writes a field the plugin schema rejects" class was worth fixing generically rather than per-channel.