Repository navigation
refactor(config): retire legacy flat streaming keys to doctor-owned migration - #104693
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 11, 2026, 8:55 PM ET / July 12, 2026, 00:55 UTC. Summary PR surface: Source +99, Tests +250, Docs +7, Generated 0, Other 0. Total +356 across 42 files. Reproducibility: yes. The latest-head source gives high-confidence paths for the Discord default regression and iMessage invalid migration, while the latest release source proves the changed SDK behavior shipped. 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:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review findings
Review detailsBest possible solution: Keep steady-state runtime nested-only, use channel-shaped doctor migrations that preserve defaults and schema validity, and retain a documented deprecated flat-aware SDK compatibility seam until an approved plugin API removal train. Do we have a high-confidence way to reproduce the issue? Yes. The latest-head source gives high-confidence paths for the Discord default regression and iMessage invalid migration, while the latest release source proves the changed SDK behavior shipped. Is this the best way to solve the issue? No in the current form. Doctor-owned migration is the correct boundary, but the implementation must preserve channel semantics and avoid silently breaking a released plugin SDK API. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ecefc6cab69e. Label changesLabel justifications:
Evidence reviewedPR surface: Source +99, Tests +250, Docs +7, Generated 0, Other 0. Total +356 across 42 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 (5 earlier review cycles)
|
d02ab4d to
2937bc1
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2937bc15b0
ℹ️ 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".
| resolveStreamingOptions: (entry) => ({ | ||
| resolvedMode: resolveDiscordPreviewStreamMode(entry), | ||
| // Runtime mode resolution dropped legacy streamMode reads; the doctor | ||
| // resolver keeps them so migration preserves configured intent. | ||
| resolvedMode: resolveLegacyAliasStreamingMode(entry, "off"), |
There was a problem hiding this comment.
Preserve Discord progress default during migration
When a Discord config only has non-mode aliases such as chunkMode, blockStreaming, or draftChunk, this doctor path now forces openclaw doctor --fix, but normalizeLegacyStreamingAliases only moves those fields and does not write streaming.mode. The repaired config therefore contains a streaming object, and resolveDiscordPreviewStreamMode treats that as configured and falls back to off instead of Discord's no-config progress default, silently disabling progress previews for those users. Have the Discord migration preserve mode: "progress" whenever it creates streaming without an explicit mode.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6b2dcff419
ℹ️ 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".
| hasLegacyIMessageStreamingAliases(nextImessage) || | ||
| hasLegacyAccountStreamingAliases(nextImessage.accounts, hasLegacyIMessageStreamingAliases); | ||
| if (hasStreamingAliases) { | ||
| const aliases = normalizeLegacyChannelAliases({ |
There was a problem hiding this comment.
Keep iMessage migration delivery-only
When an iMessage config has a delivery alias such as chunkMode plus a scalar streaming/streamMode at the same level (or in another account once this gate is true), this generic normalizer also runs the stream-mode migration and writes streaming.mode. iMessage uses the strict delivery-only streaming schema (chunkMode/block only), so openclaw doctor --fix can replace the flat alias with a new invalid streaming.mode key that no later legacy rule removes, leaving startup still blocked. Use a delivery-only alias migration for this path or suppress mode migration for iMessage.
Useful? React with 👍 / 👎.
6b2dcff to
ea0747d
Compare
ea0747d to
430bf29
Compare
|
Merged via squash.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 430bf293c5
ℹ️ 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".
| } | ||
| const nested = `${params.pathPrefix}.streaming.${nestedPath}`; | ||
| if (target[slot] === undefined) { | ||
| target[slot] = updated[flatKey]; |
There was a problem hiding this comment.
Preserve inherited stream modes for account alias migrations
When this runs for channels.discord.accounts.* or channels.telegram.accounts.* with only delivery aliases like chunkMode or blockStreamingCoalesce, it creates an account-level streaming object with no mode. Those account resolvers shallow-merge account config over the channel config (mergeDiscordAccountConfig and mergeTelegramAccountConfig), so a root channels.<id>.streaming.mode is replaced after doctor --fix; Discord then falls back to off and Telegram to partial instead of the configured root mode. Copy/inherit the parent mode during account alias migration or deep-merge streaming before persisting.
Useful? React with 👍 / 👎.
…igration (openclaw#104693) * chore(config): regenerate bundled channel config metadata for retired flat streaming keys * refactor(config): retire legacy flat streaming keys to doctor-owned migration * fix(config): restore zod locale installer dropped in rebase and repin SDK surface
Related: #104318
Maintainer decision (2026-07-12)
Approved to land by the maintainer with both consequences accepted explicitly: (1) existing flat-key configs become invalid at startup until
openclaw doctor --fix(doctor config fixes are not auto-applied on startup; the existing "Legacy config keys detected" machinery names the exact keys and the fix command); (2) the runtime tolerance is removed ahead of the deprecation record'sremoveAfter 2026-07-26— deliberate acceleration; the doctor--fixmigration itself is retained past that date.What Problem This Solves
Six legacy flat streaming keys (streamMode, chunkMode, blockStreaming, draftChunk, blockStreamingCoalesce, nativeStreaming) were normalized at steady-state load time, keeping non-canonical shapes alive in the runtime path against the repo's doctor-first rule (runtime reads canonical config only; older shapes migrate in doctor).
Why This Change Was Made
Load-time normalization for these keys is removed so runtime consumes only the nested
streaming.*shape;openclaw doctor --fixmigrates flat→nested for every channel that supports them. Filled coverage gaps: discord had a migration but no rules (added 2); imessage/msteams had neither (added rules+migrations). Fixed two shared-migration bugs found en route: flat keys weren't removed when the nested key was already set, and a streamMode-conflict removal produced empty changes that doctor discarded (leaving config invalid after --fix). Five channels keep flat keys canonical for now (signal, irc, googlechat, whatsapp, mattermost + the SDK reply-runtime shape) — documented follow-up territory, not silently dropped.User Impact
See HOLD section. For migrated-config users: none. For flat-key users: a one-time
doctor --fixrequirement, loudly signposted.Evidence
tbx_01kx9c9532h5mesb0cej7h5w8c: full battery +pnpm check:changed, exit 0; repo-wideoxfmt --checkgreen up front; all tsgo lanes green.