Repository navigation
Conversation
…claw#108453) * fix: migrate legacy default channel allowlists * docs: explain bundled-channel default-account boundary in allowFrom migration
|
Codex review: needs maintainer review before merge. Reviewed July 17, 2026, 7:24 PM ET / 23:24 UTC. Summary PR surface: Source +5, Tests +42. Total +47 across 2 files. Reproducibility: yes. for the release-base upgrade state: the PR supplies a concrete synthetic 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. Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the exact upstream migration backport through the reviewed Do we have a high-confidence way to reproduce the issue? Yes for the release-base upgrade state: the PR supplies a concrete synthetic Is this the best way to solve the issue? Yes. Restricting canonical AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a4287653375b. 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)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Related: #108421
Additional instructions
MUST: Keep Allow edits from maintainers enabled for this PR so maintainers
can help update the branch when needed.
Summary
to the 2026.7.2 beta train.
62407b36d780is already anancestor of
release/2026.7.2.What Problem This Solves
Fixes an issue where existing WhatsApp users with the legacy default-account
whatsapp-default-allowFrom.jsonallowlist could have Gateway startup blockedduring state migration on the 2026.7.2 beta train.
Source fix: #108453
Root Cause
Before this fix,
src/infra/state-migrations.channel-pairing.tscould resolve alegacy
*-default-allowFrom.jsonfilename only through configured channel oraccount metadata. An upgraded install may legitimately have
credentials/whatsapp-default-allowFrom.jsonwithout anychannels.whatsappconfig. The migration therefore classified
whatsapp/defaultas unresolved,left the file in place, and returned a warning. The startup migration guard in
src/commands/doctor-config-preflight.tstreats any unresolved migrationwarning as a readiness blocker, producing the #108421 startup failure.
The backport recognizes the canonical
defaultaccount only when the parsedchannel is in the bundled channel registry. This repairs the shipped WhatsApp
upgrade state without extending default-account inference to external channels.
Why This Change Was Made
This is the operator-selected backport of main commit
5e4107400963from#108453. It lets state migration associate an explicit legacy default-account
allowlist with its bundled channel while preserving unresolved handling for
external channels. The cherry-pick applied without conflicts and preserved
Steffen Möller's original authorship.
#109876 was also evaluated for this backport set, but its commit
62407b36d780is already an ancestor ofrelease/2026.7.2. This PR thereforecarries only the legacy allowlist startup fix.
User Impact
Operators upgrading an existing WhatsApp setup can start the Gateway without
manually removing or rewriting the legacy default-account allowlist first.
This is a focused beta-train backport. Maintainers should land it through the
reviewed non-main release-branch flow;
scripts/prprepare/merge is not usedfor release-branch PRs.
Real behavior proof
The exact release base without the cherry-pick and this PR head were each built
from source. Each run used a fresh synthetic OpenClaw state directory containing
credentials/whatsapp-default-allowFrom.jsonand a minimal local Gateway configwith no
channels.whatsappkey. The base build failed closed before readiness;the PR build migrated the allowlist into shared SQLite and reported ready. A
second startup was clean. A separate synthetic external-channel fixture remained
unresolved and on disk.
No real account, phone number, token, or user state was used. Paths below are
redacted and all allowlist values are reserved synthetic examples.
Evidence
Runtime context:
95c4b78283be3c193a7cb921b2c8def3689e57b1f8ed872d6ccee2e5c155cd16c07b14e18bf51633v25.9.0, pnpm11.2.2pnpm install --frozen-lockfileas needed, thenpnpm buildGateway command for each positive/base case:
Redacted transcript, release branch without the pick:
Redacted transcript, first startup from this PR's build:
Redacted transcript, second startup from the same migrated state:
External-channel negative case:
Focused automated proof:
node scripts/run-vitest.mjs src/infra/state-migrations.channel-pairing.test.tsgit diff --check origin/release/2026.7.2...HEADpassed.5e4107400963exactly.--mode branch --base origin/release/2026.7.2) reported noaccepted/actionable findings and assessed the patch as correct with 0.94
confidence.
Verification
Gateway exit 1, legacy file retained,
/readyzunavailable.state/openclaw.sqlite, removed the legacy file, and returned ready.unresolved warning.
allowlist rows.
What was not tested
is pre-channel startup migration and Gateway readiness, proven through the
built CLI with synthetic state.
Blacksmith CLI was not authenticated. Per the trusted-source fallback rule,
the same build/startup proof ran locally on a supported Node runtime.
AI-assisted backport; the source commit was already reviewed on
main.