fix(doctor): materialize group allowFrom fallback#82316
Conversation
Dependency Changes DetectedThis PR changes dependency-related files. Maintainers should confirm these changes are intentional. Changed files:
Maintainer follow-up:
|
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(doctor): materialize group allowFrom fallback This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
372161f to
a76b666
Compare
|
Landed via squash merge onto
Thanks @steipete. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a76b666029
ℹ️ 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".
| if (!getDoctorChannelCapabilities(channelName).groupAllowFromFallbackToAllowFrom) { | ||
| continue; |
There was a problem hiding this comment.
Require explicit fallback metadata before migrating
maybeRepairGroupAllowFromFallback runs on every non-pseudo channel and gates only on getDoctorChannelCapabilities(channelName).groupAllowFromFallbackToAllowFrom, but unknown/external channels inherit the default capabilities where this flag is true. As a result, openclaw doctor --fix will copy allowFrom into groupAllowFrom for plugins that never declared fallback support, which can silently broaden group sender access when those plugins treat DM and group allowlists separately.
Useful? React with 👍 / 👎.
| if (params.parent && ownAllowFrom.length === 0 && readGroupAllowFrom(params.parent).length > 0) { | ||
| return false; |
There was a problem hiding this comment.
Preserve explicit empty account allowFrom overrides
After channel-level migration sets channel.groupAllowFrom, accounts with an explicit empty allowFrom ([]) hit this early return and do not get an account-scoped groupAllowFrom. In merged account configs, they then inherit the new channel groupAllowFrom, which flips that account from “no allowed group senders” to allowing the parent list. This is an access-control behavior change introduced by the repair, rather than preserving pre-fix behavior.
Useful? React with 👍 / 👎.
* fix(doctor): materialize group allowFrom fallback * fix: normalize doctor account records
* fix(doctor): materialize group allowFrom fallback * fix: normalize doctor account records
* fix(doctor): materialize group allowFrom fallback * fix: normalize doctor account records
* fix(doctor): materialize group allowFrom fallback * fix: normalize doctor account records
Summary
allowFromentries into explicitgroupAllowFromallowlists.dmPolicy="open"sources are preserved.Verification
git diff --check origin/main...HEADOPENCLAW_BUNDLED_PLUGINS_DIR=/Users/steipete/Projects/clawdbot6/extensions OPENCLAW_TEST_TRUST_BUNDLED_PLUGINS_DIR=1 OPENCLAW_VITEST_MAX_WORKERS=1 pnpm test src/commands/doctor/shared/allowfrom-fallback-migration.test.ts src/commands/doctor/repair-sequencing.test.ts src/commands/doctor/channel-capabilities.test.ts src/commands/doctor-config-flow.test.ts -- --reporter=verbose/Users/steipete/Projects/agent-scripts/skills/codex-review/scripts/codex-review --mode local --full-access --parallel-tests "OPENCLAW_BUNDLED_PLUGINS_DIR=/Users/steipete/Projects/clawdbot6/extensions OPENCLAW_TEST_TRUST_BUNDLED_PLUGINS_DIR=1 OPENCLAW_VITEST_MAX_WORKERS=1 pnpm test src/commands/doctor/shared/allowfrom-fallback-migration.test.ts src/commands/doctor/repair-sequencing.test.ts src/commands/doctor/channel-capabilities.test.ts src/commands/doctor-config-flow.test.ts -- --reporter=verbose"Behavior addressed:
openclaw doctor --fixpreserves existing group sender access for channels whose runtime currently falls back fromgroupAllowFromtoallowFrom, without adding runtime fallback-transition flags.Real environment tested: Local OpenClaw source checkout with source plugin metadata forced through
OPENCLAW_BUNDLED_PLUGINS_DIR=/Users/steipete/Projects/clawdbot6/extensions.Exact steps or command run after this patch:
OPENCLAW_BUNDLED_PLUGINS_DIR=/Users/steipete/Projects/clawdbot6/extensions OPENCLAW_TEST_TRUST_BUNDLED_PLUGINS_DIR=1 OPENCLAW_VITEST_MAX_WORKERS=1 pnpm test src/commands/doctor/shared/allowfrom-fallback-migration.test.ts src/commands/doctor/repair-sequencing.test.ts src/commands/doctor/channel-capabilities.test.ts src/commands/doctor-config-flow.test.ts -- --reporter=verboseEvidence after fix: 47 focused Vitest tests passed;
git diff --check origin/main...HEADpassed; Codex review reported no accepted/actionable findings.Observed result after fix: Doctor copies normalized/deduped
allowFromentries togroupAllowFrom, respects nested DM mode, account scope, disabled entries, non-fallback channels, inherited channel group allowlists, and MS Teams fallback metadata.What was not tested: Full
pnpm check, live gateway, and real channel inbound flows.Replaces and closes #81259.