Channels: move single-account config into accounts.default#27334
Merged
gumadeiras merged 5 commits intomainfrom Feb 26, 2026
Merged
Channels: move single-account config into accounts.default#27334gumadeiras merged 5 commits intomainfrom
gumadeiras merged 5 commits intomainfrom
Conversation
Contributor
Greptile SummaryMoves account-scoped channel config values into
Confidence Score: 5/5
Last reviewed commit: 162a752 |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds migration logic to move single-account channel configuration values into channels.<channel>.accounts.default when adding non-default accounts, preventing config duplication and preserving original account behavior during the single→multi-account upgrade path.
Changes:
- Added shared migration function
moveSingleAccountChannelSectionToDefaultAccountwith explicit allowlist of account-scoped keys (common + channel-specific like Telegram'sstreaming) - Wired migration into non-interactive
channels addcommand, onboarding scoped account patching, andopenclaw doctor --fixrepair flow - Updated CLI, channels, configuration, and doctor documentation with migration behavior and repair guidance
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/channels/plugins/setup-helpers.ts | Core migration logic: shouldMoveSingleAccountChannelKey allowlist checker and moveSingleAccountChannelSectionToDefaultAccount function to move account-scoped top-level values into accounts.default |
| src/commands/channels/add.ts | Invoke migration before applying new account config when adding non-default accounts |
| src/channels/plugins/onboarding/helpers.ts | Invoke migration in patchConfigForScopedAccount when patching non-default accounts via onboarding |
| src/commands/doctor-legacy-config.ts | Add seedMissingDefaultAccountsFromSingleAccountBase repair migration for already-mixed configs (accounts exist, default missing, top-level values present) |
| src/commands/channels.adds-non-default-telegram-account.test.ts | Test coverage for channels add migration path with Telegram account and streaming field |
| src/channels/plugins/onboarding/helpers.test.ts | Test coverage for onboarding patch migration path |
| src/commands/doctor-legacy-config.migrations.test.ts | Test coverage for doctor repair migration; updated streaming migration test expectations to use .toContain for multiple changes |
| docs/gateway/doctor.md | Document new doctor migration for missing default accounts |
| docs/gateway/configuration-reference.md | Document automatic migration behavior when adding non-default accounts |
| docs/cli/index.md | Document channels add migration behavior and binding semantics |
| docs/cli/channels.md | Detailed documentation of migration flow, routing behavior, and doctor repair guidance |
| CHANGELOG.md | Changelog entry for the fix |
4d12bf3 to
83f23c1
Compare
e794ac3 to
d0f973a
Compare
ec54b9e to
50b5771
Compare
Member
Author
|
Merged via squash. Thanks @gumadeiras! |
NOVA-Openclaw
added a commit
to NOVA-Openclaw/nova-openclaw
that referenced
this pull request
Feb 26, 2026
Syncs 29 upstream commits including: - Account-scoped bind and routing commands (openclaw#27195) - Single-account config migration to accounts.default (openclaw#27334) - Preserve agent-level apiKey/baseUrl during models.json merge (openclaw#27293) - Plugin-owned interactive channel onboarding flows (openclaw#27191) - Android notifications.list, invoke refactoring - Daemon launchd restart hardening - SSRF dispatcher fix, doctor improvements Conflict resolution: 4 import-order conflicts in onboarding/channel commands resolved by taking upstream (no custom code in those files).
18 tasks
FradSer
pushed a commit
to FradSer/openclaw
that referenced
this pull request
Feb 26, 2026
…27334) Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: 50b5771 Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com> Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com> Reviewed-by: @gumadeiras
steipete
pushed a commit
that referenced
this pull request
Feb 26, 2026
Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: 50b5771 Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com> Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com> Reviewed-by: @gumadeiras
execute008
pushed a commit
to execute008/openclaw
that referenced
this pull request
Feb 27, 2026
…27334) Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: 50b5771 Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com> Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com> Reviewed-by: @gumadeiras
r4jiv007
pushed a commit
to r4jiv007/openclaw
that referenced
this pull request
Feb 28, 2026
…27334) Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: 50b5771 Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com> Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com> Reviewed-by: @gumadeiras
vincentkoc
pushed a commit
to Sid-Qin/openclaw
that referenced
this pull request
Feb 28, 2026
…27334) Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: 50b5771 Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com> Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com> Reviewed-by: @gumadeiras
vincentkoc
pushed a commit
to rylena/rylen-openclaw
that referenced
this pull request
Feb 28, 2026
…27334) Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: 50b5771 Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com> Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com> Reviewed-by: @gumadeiras
steipete
pushed a commit
to Sid-Qin/openclaw
that referenced
this pull request
Mar 2, 2026
…27334) Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: 50b5771 Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com> Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com> Reviewed-by: @gumadeiras
robertchang-ga
pushed a commit
to robertchang-ga/openclaw
that referenced
this pull request
Mar 2, 2026
…27334) Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: 50b5771 Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com> Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com> Reviewed-by: @gumadeiras
dorgonman
pushed a commit
to kanohorizonia/openclaw
that referenced
this pull request
Mar 3, 2026
…27334) Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: 50b5771 Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com> Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com> Reviewed-by: @gumadeiras
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
…27334) Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: 50b5771 Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com> Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com> Reviewed-by: @gumadeiras
thebenjaminlee
pushed a commit
to escape-velocity-ventures/openclaw
that referenced
this pull request
Mar 7, 2026
…27334) Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: 50b5771 Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com> Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com> Reviewed-by: @gumadeiras
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Describe the problem and fix in 2–5 bullets:
openclaw channels addfor a non-default account could leave single-account channel values at top-level while addingaccounts.<new>, causing split/duplicated account state and breaking the original account path in real configs.channels.<channel>.accounts.defaultbefore writing non-default accounts; wired this into non-interactivechannels add, onboarding scoped account patching, anddoctorrepair migration.accountId=default; routing semantics remain the same (channel-only binding still targets default account).Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
accounts.default(instead of duplicating/copying).openclaw doctor --fixrepairs already-mixed channel account shapes with the same move behavior.Security Impact (required)
No)No)No)No)No)Yes, explain risk + mitigation:Repro + Verification
Environment
Steps
channels.<channel>.*and noaccountsobject.openclaw channels add --channel telegram --account alerts --token <token>(non-interactive path), or use onboarding scoped account path.openclaw doctor --fixon mixed-shape config (accountsexists,defaultmissing, top-level account values still present).Expected
channels.<channel>.accounts.default.channels.<channel>.accounts.<new>.Actual
Evidence
Attach at least one:
Human Verification (required)
What you personally verified (not just CI), and how:
channels addmoves single-account channel values intoaccounts.defaultwhen adding non-default account.accountsnamed entries + missing default + top-level account-scoped values).streamingmove path covered by tests.Compatibility / Migration
Yes)No)No)Failure Recovery (if this breaks)
src/channels/plugins/setup-helpers.ts,src/commands/channels/add.ts,src/channels/plugins/onboarding/helpers.ts,src/commands/doctor-legacy-config.tsand rerun tests.accounts.default.Risks and Mitigations
List only real risks for this PR. Add/remove entries as needed. If none, write
None.accounts.defaultcould change provider behavior.