Repository navigation
fix: gateway startup fails on legacy default channel allowlists - #108453
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 17, 2026, 5:58 PM ET / 21:58 UTC. Summary PR surface: Source +5, Tests +42. Total +47 across 2 files. Reproducibility: yes. at source level: a version-1 Review metrics: 1 noteworthy metric.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the bounded parser fallback after rebasing onto current Do we have a high-confidence way to reproduce the issue? Yes at source level: a version-1 Is this the best way to solve the issue? Yes. Resolving only the explicit canonical suffix in the existing filename parser, restricted to bundled channel IDs and after normal account matching fails, is narrower than a WhatsApp special case or default-account inference for external plugins. AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against 72335d3d4a19. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +5, Tests +42. Total +47 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (1 earlier review cycle)
|
|
I cross-checked with my OpenClaw installation about what proof we may still have, other than the original bug report. This was the answer: Adding redacted runtime proof for the migration path requested by ClawSweeper.#108421 documents the real beta.1 failure case: an upgrade encountered a legacy bundled-channel allowlist file named {
"version": 1,
"allowFrom": [
"",
"",
""
]
}That is the before-fix evidence: beta.1 did not resolve that legacy whatsapp/default allowlist cleanly, and Doctor/Gateway readiness was blocked. For after-fix evidence, I ran this PR branch in a temporary OpenClaw state directory rather than against the live gateway state: Relevant redacted runtime log: I also verified the resulting temporary SQLite state contains the migrated allowlist under the intended bundled channel/default account boundary: And no allowFrom.json legacy file remained in that temporary proof state after the migration. This after-fix run is deliberately described as a temporary-state proof harness, not as the original live beta.1 upgrade state. The original real-world failing input is documented in #108421; the PR-branch proof run demonstrates that the patched migration path imports whatsapp/default allowFrom into shared SQLite state and reaches Gateway readiness afterward. Private sender values are redacted. |
|
Merged via squash.
|
) (#110217) * fix: migrate legacy default channel allowlists * docs: explain bundled-channel default-account boundary in allowFrom migration Co-authored-by: Steffen Möller <[email protected]>
…claw#108453) * fix: migrate legacy default channel allowlists * docs: explain bundled-channel default-account boundary in allowFrom migration
Fixes #108421
Related to #108299
What Problem This Solves
Fixes an issue where users upgrading from OpenClaw
2026.7.1to2026.7.2-beta.1could no longer start the Gateway when a legacycredentials/whatsapp-default-allowFrom.jsonfile remained and nochannels.whatsappsection existed.The startup migration reported the legacy file as unresolved and left it in
place.
openclaw doctor --fixdetected the same warning but could not completethe migration, so Gateway startup continued to refuse readiness.
Why This Change Was Made
Legacy scoped allowFrom filenames are parsed as a channel ID plus an account
key. The migration already knows
whatsappis a bundled channel throughCHANNEL_IDS, but it previously accepted thedefaultaccount suffix onlywhen that account had also been discovered from channel configuration or
bindings. With no
channels.whatsappsection, the explicitdefaultsuffixtherefore had no configured match and was classified as unresolved.
The parser now recognizes an explicit
defaultsuffix as the canonical defaultaccount when, and only when, the parsed channel is a bundled OpenClaw channel.
The existing migration then imports the allowlist into the shared SQLite pairing
state and removes the legacy JSON file.
This is intentionally narrower than adding
defaultto every discoveredchannel:
plugin migration behavior changes.
Special-casing WhatsApp was also considered, but rejected because
defaultisthe canonical account ID across bundled channels. Restricting the general rule
to
CHANNEL_IDSpreserves the core/plugin ownership boundary without adding achannel-specific exception.
User Impact
Affected upgrades can automatically migrate
whatsapp-default-allowFrom.jsoninto the SQLite pairing state under thedefaultaccount. The legacy file is removed after a successful import, sostartup migrations complete without requiring users to recreate channel
configuration or manually relocate the file.
Evidence
The positive regression test creates the reported version-1 object shape with:
whatsapp;channels.whatsappconfiguration;defaultaccount suffix;It verifies that:
whatsapp/default;A negative regression test creates
custom-channel-default-allowFrom.jsonfor an external configured channel withno configured account. It verifies that the migration remains unresolved,
leaves the source file in place, and writes no SQLite allowlist.
Executed locally:
node scripts/run-vitest.mjs src/infra/state-migrations.channel-pairing.test.ts— 6 tests passed;
oxlintfor both changed files;pnpm formatfor both changed files; andgit diff --check.The full changed TypeScript/lint fan-out is left to PR CI because the configured
Blacksmith Testbox tooling is unavailable on this host.
AI-assisted: implemented and manually reviewed with Codex. No agent transcript
is attached.