Repository navigation
refactor(config): retire flat streaming keys from the last six channel schemas via doctor migration - #105709
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 12, 2026, 6:20 PM ET / 22:20 UTC. Summary PR surface: Source +275, Tests +488, Docs +2, Generated 0. Total +765 across 49 files. Reproducibility: yes. A strict external plugin schema spreading the v2026.6.11 Review metrics: 2 noteworthy metrics.
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
Security Review findings
Review detailsBest possible solution: Use a dedicated nested-only delivery schema for the six bundled channels while keeping Do we have a high-confidence way to reproduce the issue? Yes. A strict external plugin schema spreading the v2026.6.11 Is this the best way to solve the issue? No. Migrating the bundled schemas is appropriate, but changing the shared shipped primitive is broader than necessary; separating public compatibility from bundled nested-only validation is the safer owner-aligned fix. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 95f142bf0c50. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +275, Tests +488, Docs +2, Generated 0. Total +765 across 49 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)
|
…l schemas
signal, irc, nextcloud-talk, whatsapp, googlechat, and mattermost now accept
only the nested streaming.{chunkMode,block.enabled,block.coalesce} shape
(mattermost also drops scalar/boolean streaming); flat spellings migrate via
each channel's defineChannelAliasMigration doctor contract with root seeding
for their wholesale-replace account merges.
…fallback is used Bundled schemas now reject the flat delivery keys, so the streaming.ts fallback only serves external SDK plugin configs; emit a once-per-process per-key subsystem warning and pin the removal plan to the next release train.
…key deprecation window
…s.default layer WhatsApp resolution layers accounts.default shared config between root and named accounts, so doctor-materialized account streaming objects now inherit default-account settings over root ones; mattermost schema test moves to the nested-only shape with explicit rejection coverage; scope flat-key deprecation notes to the pending Matrix/Feishu migrations.
…eding migrated streaming
854fdec to
120c9d2
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 120c9d2d7b
ℹ️ 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".
| chunkMode: z.enum(["length", "newline"]).optional(), | ||
| blockStreaming: z.boolean().optional(), | ||
| blockStreamingCoalesce: BlockStreamingCoalesceSchema.optional(), | ||
| streaming: ChannelDeliveryStreamingConfigSchema.optional(), |
There was a problem hiding this comment.
Preserve flat SDK schema keys through deprecation
For third-party channel plugins that import ReplyRuntimeConfigSchemaShape from openclaw/plugin-sdk/channel-config-schema, this strict nested-only shape now rejects existing chunkMode/blockStreaming/blockStreamingCoalesce configs during plugin validation before the runtime can reach the warn-once flat fallback in streaming.ts; there is also no plugin-agnostic doctor migration for arbitrary external channel IDs. That makes the intended one-release SDK fallback unusable for external plugins using this public schema primitive.
Useful? React with 👍 / 👎.
| const streamingAliasMigration = defineChannelAliasMigration({ | ||
| channelId: "googlechat", | ||
| streaming: { defaultMode: "partial", deliveryOnly: true }, | ||
| accountStreamingReplacesRoot: true, |
There was a problem hiding this comment.
Preserve Google Chat default streaming inheritance
When channels.googlechat.accounts.default carries flat streaming defaults and a named account has its own flat streaming key, the generic accountStreamingReplacesRoot migration only seeds from the root channels.googlechat.streaming. Google Chat’s account resolver also layers accounts.default into named accounts, so after migration the named account’s materialized streaming object can overwrite the default account’s migrated streaming object and drop inherited settings such as block.enabled; this is the same inheritance case that needed plugin-local seeding for WhatsApp.
Useful? React with 👍 / 👎.
|
Merged via squash.
|
…l schemas via doctor migration (openclaw#105709) * refactor(config): retire flat streaming keys from the last six channel schemas signal, irc, nextcloud-talk, whatsapp, googlechat, and mattermost now accept only the nested streaming.{chunkMode,block.enabled,block.coalesce} shape (mattermost also drops scalar/boolean streaming); flat spellings migrate via each channel's defineChannelAliasMigration doctor contract with root seeding for their wholesale-replace account merges. * feat(channels): warn once per key when the deprecated flat streaming fallback is used Bundled schemas now reject the flat delivery keys, so the streaming.ts fallback only serves external SDK plugin configs; emit a once-per-process per-key subsystem warning and pin the removal plan to the next release train. * chore(config): regenerate bundled channel config metadata for nested-only streaming * docs: describe nested-only channel streaming config and the SDK flat-key deprecation window * fix(whatsapp): seed migrated named-account streaming from the accounts.default layer WhatsApp resolution layers accounts.default shared config between root and named accounts, so doctor-materialized account streaming objects now inherit default-account settings over root ones; mattermost schema test moves to the nested-only shape with explicit rejection coverage; scope flat-key deprecation notes to the pending Matrix/Feishu migrations. * fix(whatsapp): resolve the default account case-insensitively when seeding migrated streaming * chore(plugin-sdk): repin API baseline for nested-only channel streaming types
What Problem This Solves
After #104693/#105054, six bundled channels still treated flat streaming keys as canonical config: signal and irc (core schemas), nextcloud-talk and irc again (via the shared
ReplyRuntimeConfigSchemaShape), whatsapp, googlechat, and mattermost (which additionally accepted scalar/booleanstreamingas a mode). That split kept the SDK resolvers' flat fallback load-bearing for bundled channels and left users with two config dialects. None of the migrated-channel work has shipped in a release tag yet, so completing the retirement now gives users a single migration event in one release train.Why This Change Was Made
streaming.{chunkMode,block.enabled,block.coalesce}(mattermost alsostreaming.mode, retiring its scalar/boolean form). Schemas reject flat keys;openclaw doctor --fixmigrates viadefineChannelAliasMigrationspecs (refactor(config): declarative doctor alias-migration DSL with inheritance-aware account seeding #105636), with per-channel semantics determined from runtime source: signal/irc/nextcloud-talk/whatsapp/googlechat aredeliveryOnly(no preview mode); mattermost resolvespartialfor both absent and object-without-mode so no default pinning is needed.accountStreamingReplacesRoot; WhatsApp has an extraaccounts.defaultshared layer between root and named accounts, so it gets plugin-local layered seeding (including case-insensitiveaccounts.Default, matchingresolveAccountEntry) — an autoreview-caught correctness fix that the generic DSL path could not express without core learning WhatsApp's layering.Flat channel streaming key "…" is deprecated; move it to streaming.…; removed after the next release train.), making remaining consumers visible instead of guessed. Warn-once state lives outsidestreaming.tsso theexport *SDK barrels don't leak test-reset hooks.docs/concepts/streaming.md,messages.md, signal/nextcloud-talk/whatsapp/mattermost channel pages,docs/gateway/config-channels.mdincluding a stale telegram scalar example); bundled channel config metadata and the plugin-sdk API baseline regenerated.User Impact
openclaw doctor --fix(inheritance-aware for multi-account setups).streaming) still accept flat/scalar forms — follow-up PR before the fallback-removal train.Evidence
extensions/whatsapp/src/account-config.ts:41-67; mattermostresolveChannelPreviewStreamMode(merged, "partial")atextensions/mattermost/src/mattermost/accounts.ts:138; shared-shape consumers enumerated: irc + nextcloud-talk only).WhatsApp runtime not initialized) — proven unrelated: identical failures at the branch base and on cleanorigin/main(leasestbx_01kxc0snzm4vd0vzjaar0c5495,tbx_01kxc102h3rbmea166sc8730tn; post-rebase re-runtbx_01kxc2gmct85rd30k7qgk7smv5); tracked as a separate task chip. Full remotecheck:changedgreen (leasetbx_01kxc1g9khdseb7vg9egj6m64s, 11m43s; post-rebase re-run green).accounts.defaultlayer lost in seeding; docs overgeneralizing "all bundled channels"; case-insensitive default-account key), final round clean (0.97).Refs #104693, #105054, #105636. Follow-up: matrix/feishu/qqbot flat retirement before the fallback-removal train.