Skip to content

fix(channels): accept documented configWrites across bundled schemas - #117206

Merged
vincentkoc merged 1 commit into
openclaw:mainfrom
ayaangazali:fix/channel-config-writes-schema-parity
Aug 1, 2026
Merged

vincentkoc merged 1 commit into
openclaw:mainfrom
ayaangazali:fix/channel-config-writes-schema-parity

Conversation

@ayaangazali

@ayaangazali ayaangazali commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

channels.<provider>.configWrites and the per-account form are documented and enforced by the shared channel config-write policy. Fourteen bundled channel schemas rejected that key, causing an otherwise valid config to fail validation and preventing the Gateway from starting.

Affected channels: buzz, clickclack, line, matrix, nextcloud-talk, nostr, qa-channel, raft, reef, sms, tlon, twitch, zalo, and zalouser.

This is the remaining sibling repair to #112392.

Fix

  • Add the existing optional configWrites policy field at each affected bundled schema owner boundary.
  • Cover both Twitch schema alternatives and its per-account schema.
  • Regenerate bundled channel config metadata.
  • Refresh the committed config documentation baseline from 3664 to 3692 channel entries.
  • Add a contract test covering every bundled channel root and account schema, including closed allOf, anyOf, and oneOf alternatives.

The shared schema builders remain unchanged because injecting this field there would silently broaden third-party plugin contracts.

User Impact

Operators can set configWrites: false at the channel or account level on these channels without invalidating the entire config. Configs that omit the field retain the existing default behavior.

Evidence

  • channel-config-writes.contract.test.ts: 55 passed
  • extensions/twitch/src/config-schema.test.ts: 2 passed
  • validation.channel-metadata.test.ts: 22 passed
  • Bundled channel metadata generator check: clean
  • Config documentation baseline check: clean
  • Real config I/O load: Matrix, Twitch single-account, and Twitch multi-account forms preserve configWrites: false
  • P0/P1 autoreview: clean

AI-assisted: researched, written, and validated with coding agents under the contributor's and maintainers' direction. The change was reviewed and repaired against current main.

Copilot AI review requested due to automatic review settings August 1, 2026 04:28
@openclaw-barnacle openclaw-barnacle Bot added channel: line Channel integration: line channel: matrix Channel integration: matrix channel: nextcloud-talk Channel integration: nextcloud-talk channel: nostr Channel integration: nostr channel: tlon Channel integration: tlon channel: zalo Channel integration: zalo channel: zalouser Channel integration: zalouser channel: qa-channel Channel integration: qa-channel channel: sms Channel integration: sms channel: raft Channel integration: Raft channel: reef Channel integration: reef channel: buzz size: S labels Aug 1, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a config-schema/documentation mismatch where channels.<id>.configWrites (and the per-account form) was documented and used by runtime policy resolution, but rejected by strict schema validation for 13 bundled channels—blocking gateway startup when the key is present.

Changes:

  • Add configWrites?: boolean to the affected channel config Zod schemas (channel-level and/or account-level, depending on the channel’s schema shape).
  • Add a contract test that asserts every bundled channel’s generated JSON schema accepts configWrites at both channels.<id> and channels.<id>.accounts.<account> when the schema is closed.

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/plugins/contracts/channel-config-writes.contract.test.ts Adds a contract test to prevent future regressions in bundled channel schema support for configWrites.
extensions/buzz/src/config-schema.ts Accept configWrites in Buzz channel config schema.
extensions/clickclack/src/config-schema.ts Accept configWrites in ClickClack config schema (including account schema where applicable).
extensions/line/src/config-schema.ts Accept configWrites in Line common config fields used by the channel/account schema.
extensions/matrix/src/config-schema.ts Accept configWrites at the Matrix channel level (accounts remain schema-open).
extensions/nextcloud-talk/src/config-schema.ts Accept configWrites in Nextcloud Talk account/base schema used for channel/accounts.
extensions/sms/src/config-schema.ts Accept configWrites in SMS account/channel config schema.
extensions/nostr/src/config-schema.ts Accept configWrites in Nostr channel config schema.
extensions/reef/src/config-schema.ts Accept configWrites in Reef channel config schema.
extensions/raft/src/config-schema.ts Accept configWrites in Raft account schema.
extensions/tlon/src/config-schema.ts Accept configWrites in Tlon common config fields.
extensions/zalo/src/config-schema.ts Accept configWrites in Zalo account schema.
extensions/zalouser/src/config-schema.ts Accept configWrites in ZaloUser account schema.
extensions/qa-channel/src/config-schema.ts Accept configWrites in QA channel account config schema.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. labels Aug 1, 2026
@clawsweeper

clawsweeper Bot commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 1, 2026, 2:19 AM ET / 06:19 UTC.

ClawSweeper review

What this changes

The branch adds the documented optional configWrites setting to 14 bundled channel schemas, regenerates channel metadata and documentation baselines, and adds a contract test for root and account schema acceptance.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

The PR is still necessary: current main reads configWrites in the shared channel policy but all 14 affected bundled schemas omit it, so documented configs can be rejected before Gateway startup. The patch repairs each schema at its owner boundary, preserves external plugin contracts, and adds broad regression coverage; no blocking code or security finding surfaced. Likely related people: thomas.szbay (high confidence, shared policy history) and Ayaan Gazali (high confidence, merged IRC sibling repair).

Priority: P2
Reviewed head: 07dca07594784f9ef1cc0038a3c38753e8696e55

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A focused, owner-boundary repair with real configuration-load evidence and broad generated-schema regression coverage.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The PR body reports after-fix config I/O for Matrix plus Twitch single- and multi-account forms, showing configWrites: false survives loading; focused schema and metadata checks supplement that real behavior evidence.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body reports after-fix config I/O for Matrix plus Twitch single- and multi-account forms, showing configWrites: false survives loading; focused schema and metadata checks supplement that real behavior evidence.
Evidence reviewed 5 items Current policy consumes the documented setting: The shared resolver reads the account value first, then the channel value, and treats only false as disabled; this makes schema acceptance necessary before the policy can take effect.
Current main lacks the affected schema fields: A direct current-main search found no configWrites declaration in each of the 14 affected bundled channel schema files, while established siblings IRC, Feishu, and Mattermost declare the same optional boolean at their schema boundary.
Patch follows the schema-owner boundary: The PR adds configWrites to individual bundled schemas rather than changing the shared plugin schema builder, avoiding an undocumented contract expansion for third-party plugins.
Findings None None.
Security None None.

How this fits together

Channel configuration is validated against each bundled plugin schema before the Gateway can use it. The shared channel policy then reads configWrites at channel and account scope to allow or block channel-initiated configuration changes.

flowchart LR
  A[Operator configuration] --> B[Bundled channel schema]
  B --> C[Generated channel metadata]
  C --> D[Gateway configuration validation]
  D --> E[Shared config-write policy]
  E --> F[Allowed or blocked channel config change]
Loading

Before merge

  • Resolve merge risk (P1) - The branch is behind current main and several exact-head checks were still in progress in the supplied review state; refresh mergeability and require those checks to finish successfully before landing.
  • Complete next step (P2) - No repair lane is needed because the submitted branch already contains the canonical bounded correction; wait for current-head checks and maintainer merge review.
Agent review details

Security

None.

PR surface

Source +16, Tests +71, Generated 0. Total +87 across 18 files.

View PR surface stats
Area Files Added Removed Net
Source 14 16 0 +16
Tests 1 71 0 +71
Docs 0 0 0 0
Config 0 0 0 0
Generated 3 22 22 0
Other 0 0 0 0
Total 18 109 22 +87

Review metrics

Metric Value Why it matters
Documented config schema coverage 14 bundled channel schemas added; channel documentation baseline increases from 3664 to 3692 entries This additive acceptance change aligns generated metadata and docs with the shared policy without changing defaults for existing configurations.

Stored data model

Persistent data-model change detected: unknown-data-model-change: src/config/bundled-channel-config-metadata.generated.ts, vector/embedding metadata: src/plugins/contracts/channel-config-writes.contract.test.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: canonical
Canonical: #117206
Summary: This PR is the canonical remaining repair for bundled schemas that omit a policy field already read by shared channel config-write handling; the merged IRC PR repaired the same invariant for a separate channel.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Land the schema-owner additions with the generated metadata and contract test after current-head CI is green, so all documented bundled-channel configWrites paths validate without broadening third-party plugin schemas.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Land the schema-owner additions with the generated metadata and contract test after current-head CI is green, so all documented bundled-channel configWrites paths validate without broadening third-party plugin schemas.

Do we have a high-confidence way to reproduce the issue?

No live current-main run was established in this read-only review, but the source path is high-confidence: the shared policy reads this setting while all 14 affected strict bundled schemas omit it and can reject the documented input.

Is this the best way to solve the issue?

Yes. Adding the existing optional field at each bundled schema owner is the narrowest maintainable repair; changing the shared builder would broaden third-party plugin contracts unnecessarily.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against fe790ab64ef7.

Labels

Label changes:

  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.

Label justifications:

  • P2: This is a bounded configuration-validation bug that blocks affected channel setups but has a limited, opt-in blast radius.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body reports after-fix config I/O for Matrix plus Twitch single- and multi-account forms, showing configWrites: false survives loading; focused schema and metadata checks supplement that real behavior evidence.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body reports after-fix config I/O for Matrix plus Twitch single- and multi-account forms, showing configWrites: false survives loading; focused schema and metadata checks supplement that real behavior evidence.

Evidence

What I checked:

Likely related people:

  • thomas.szbay: git blame attributes the active channel/account configWrites resolver to this contributor, making them the strongest current-main routing candidate for the shared invariant. (role: shared-policy author and recent area contributor; confidence: high; commits: 5f91afabc7ae; files: src/channels/plugins/config-write-policy-shared.ts)
  • Ayaan Gazali: Authored the merged IRC repair that uses the same plugin-owned schema declaration pattern and is now extending that invariant to remaining bundled channels. (role: merged sibling-repair author; confidence: high; commits: d2c9e74702f4, 07dca0759478; files: extensions/irc/src/config-schema.ts, src/plugins/contracts/channel-config-writes.contract.test.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-08-01T05:04:53.868Z sha 492f267951e1cf22ffb457bb13cf32155ec84ae3 :: needs maintainer review before merge. :: none

@vincentkoc vincentkoc self-assigned this Aug 1, 2026
@vincentkoc
vincentkoc force-pushed the fix/channel-config-writes-schema-parity branch from 492f267 to 07dca07 Compare August 1, 2026 06:15
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: twitch Channel integration: twitch labels Aug 1, 2026
@vincentkoc vincentkoc changed the title fix(channels): config validation rejects documented channels.<id>.configWrites on 13 channels fix(channels): accept documented configWrites across bundled schemas Aug 1, 2026
@vincentkoc

Copy link
Copy Markdown
Member

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot removed the rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. label Aug 1, 2026
@clawsweeper clawsweeper Bot added the rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. label Aug 1, 2026
@vincentkoc

Copy link
Copy Markdown
Member

Maintainer validation update for the ClawSweeper rank-up moves:

  • Exact head 07dca07594784f9ef1cc0038a3c38753e8696e55 completed with 86 successful checks and no blocking failures.
  • Final Blacksmith Testbox changed gate passed on the same head (tbx_01kyxz7j6nq3yge01g8hn3vyq6; https://github.com/openclaw/openclaw/actions/runs/30687298220).
  • Current main is 51c41c2. The intervening 10 commits have zero touched-file overlap, and a fresh git merge-tree --write-tree origin/main HEAD succeeds (d0218dff991b7caf08bb9cc1e878d31897cf3662). I am leaving the head frozen rather than invalidating exact-head proof for unrelated moving-main drift.
  • P0/P1 autoreview is clean; review threads are 0 total / 0 unresolved.

Verdict: READY for maintainer merge review. No merge performed in this lane.

@vincentkoc

Copy link
Copy Markdown
Member

Final maintainer landing gate for exact head 07dca07594784f9ef1cc0038a3c38753e8696e55:

  • exact-head CI: 86 successful, 0 blockers; openclaw/ci-gate green
  • Testbox changed gate: green
  • recursive config-writer contract: 55 cases across all 14 channels, including Twitch union/account schemas
  • metadata and config baselines regenerated
  • autoreview: no P0/P1 findings
  • ClawSweeper: exact-head 5/6, no findings; no remaining rank-up moves
  • review threads: 0 unresolved
  • live main: 730cf5691599bf66943befd533fb0da20e6df29d
  • touched-path drift: 0
  • clean synthetic merge tree: 7bc424bebbbd7de763561161c1f4deb6fdba9b66

Landing via squash with contributor authorship preserved.

@vincentkoc
vincentkoc merged commit 11069c3 into openclaw:main Aug 1, 2026
129 of 134 checks passed
@ayaangazali

Copy link
Copy Markdown
Contributor Author

Thanks for the detailed validation on this and on #112392. The exact-head verification made it easy to see exactly what you checked, and freezing the head rather than forcing a rebase saved the proof, which I appreciated.

This closed the configWrites gap across all 14 bundled channels. That looks like an instance of a general class: config keys that the shared policy reads and the docs describe, but that individual bundled schemas reject at the owner boundary. If it would be useful I can sweep for the rest of that class and send them in the same shape, small and per-owner-boundary with a contract test. Happy to take direction instead if there is an area you would rather have covered.

One loose end: #110624 is a small docs correction (stale 2gb session disk budget on the chrome extension page) that has been open since 18 July. If it is still wanted I will rebase it on current main, and if not I am glad to close it. Just say which.

vincentkoc added a commit that referenced this pull request Aug 1, 2026
* origin/main: (41 commits)
  test(ci): update memory helper routing expectation (#117295)
  fix(canvas): emit successful control results in JSON mode (#117297)
  fix(imessage): settle native inbound reply delivery (#117282)
  fix(agents): reject invalid UTF-8 LSP responses (#117271)
  fix(line): centralize card and template message alt text (#117280)
  fix(release): validate candidates before Docker publication (#117252)
  fix(media): validate provider-owned generated media downloads (#117281)
  fix(feishu): restore custom HTTPS API domains (#117278)
  fix(models): reuse prepared plugin metadata (#117131)
  fix(agents): stop fallback after delivered-but-failed attempts (#114628)
  fix(memory): reuse targeted session corpus snapshot (#117247)
  fix(matrix): reconcile durable sends after response loss
  test(release): repair full validation regressions (#116931)
  fix(linux-canvas): report socket watcher fallback (#109502)
  fix(codex): preserve authoritative turn completion (#117185)
  fix(canvas): preserve widgets across derived-name collisions (#117132)
  fix(channels): config validation rejects documented channels.<id>.configWrites on 13 channels (#117206)
  fix(msteams): prevent duplicate final replies (#116398)
  fix(doctor): session SQLite restore installs an empty session index over the valid archive (#117221)
  fix(plugins): preserve workspace plugins across CLI and control UI (#117265)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 2, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 2, 2026
* origin/main: (41 commits)
  test(ci): update memory helper routing expectation (openclaw#117295)
  fix(canvas): emit successful control results in JSON mode (openclaw#117297)
  fix(imessage): settle native inbound reply delivery (openclaw#117282)
  fix(agents): reject invalid UTF-8 LSP responses (openclaw#117271)
  fix(line): centralize card and template message alt text (openclaw#117280)
  fix(release): validate candidates before Docker publication (openclaw#117252)
  fix(media): validate provider-owned generated media downloads (openclaw#117281)
  fix(feishu): restore custom HTTPS API domains (openclaw#117278)
  fix(models): reuse prepared plugin metadata (openclaw#117131)
  fix(agents): stop fallback after delivered-but-failed attempts (openclaw#114628)
  fix(memory): reuse targeted session corpus snapshot (openclaw#117247)
  fix(matrix): reconcile durable sends after response loss
  test(release): repair full validation regressions (openclaw#116931)
  fix(linux-canvas): report socket watcher fallback (openclaw#109502)
  fix(codex): preserve authoritative turn completion (openclaw#117185)
  fix(canvas): preserve widgets across derived-name collisions (openclaw#117132)
  fix(channels): config validation rejects documented channels.<id>.configWrites on 13 channels (openclaw#117206)
  fix(msteams): prevent duplicate final replies (openclaw#116398)
  fix(doctor): session SQLite restore installs an empty session index over the valid archive (openclaw#117221)
  fix(plugins): preserve workspace plugins across CLI and control UI (openclaw#117265)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: buzz channel: line Channel integration: line channel: matrix Channel integration: matrix channel: nextcloud-talk Channel integration: nextcloud-talk channel: nostr Channel integration: nostr channel: qa-channel Channel integration: qa-channel channel: raft Channel integration: Raft channel: reef Channel integration: reef channel: sms Channel integration: sms channel: tlon Channel integration: tlon channel: twitch Channel integration: twitch channel: zalo Channel integration: zalo channel: zalouser Channel integration: zalouser docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants