Skip to content

fix(plugins): restore Slack onboarding after core updates - #147109

Merged
vincentkoc merged 3 commits into
mainfrom
fix/sdk-zod-json-schema-context
Sep 13, 2026
Merged

vincentkoc merged 3 commits into
mainfrom
fix/sdk-zod-json-schema-context

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 13, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes non-interactive Slack onboarding rejecting the published plugin as not supporting channel add after core updates.

User Impact

Published channel plugins can load their setup schemas and complete onboarding after core updates. Runtime validation, config defaults, and Zod 3 compatibility are preserved.

Why This Change Was Made

Both shared channel and plugin schema builders now use the host Zod converter. A published plugin can contain an older Zod root schema with newer SDK schema nodes; the older converter creates incompatible traversal state and setup loading fails. Parsing stays with the original schema.

The change removes the two schema-owned converter aliases and eight production lines. The assertion baseline shrinks to match the removed casts. No dependencies or config surfaces change.

Evidence

  • Fresh exact-head CI passed for 5bf767748771cf617c4e336a0d814f5f52f75663: 180 checks reached terminal state with zero failures or pending checks.

  • The signed main refresh preserved all five non-baseline PR blobs byte-for-byte from 554a0e64497c99835bd9742ac9eb61b8b66f043b. Both production blobs also remain identical to the package-proven candidate bddfbe32195d95c07d413ceaf76d475ccdbeefc1; the assertion baseline retains current-main shrinkage and the PR reductions to 11 and 5 assertions.

  • A pre-fix red probe temporarily reversed exactly the two production hunks. The regression test failed for the intended reason, schema-owned converter must not run; restoring the patch restored both production blobs exactly. Fresh P0-P2 autoreview of the six-file refreshed delta found no actionable findings.

  • Packaged baseline failure: core ef9b6d368670688758ee91114a309812a5a810b5, tarball SHA256 5d03b2e966e9d928259e9308ed277d9bb2d61347a4864b415d2035d89cfa12bc, fails loading published @openclaw/[email protected]. The captured exception is Cannot read properties of undefined (reading 'push') in host recordProcessor, reached through the published plugin's Zod converter from buildChannelConfigSchema.

  • Exact candidate package and runtime proof: embedded commit bddfbe32195d95c07d413ceaf76d475ccdbeefc1, tarball SHA256 9300042c2b651945736279657b3a4135dc2aa7b2361cb8fbbb455fcabbcace58, candidate registry digest 4e211a27774f04611a20c60d124dd42fcf59292737290037a0d2a5b077b1931c. Package integrity/import checks and fresh Slack account add, status, doctor, and mock-provider agent passed on Node 24.19.0 / Linux x64. Published Slack remained unchanged from the failing baseline: entry SHA256 18ec0c610a9a4b90dd44819969bca108508a47d507122b0ffb44d6045c785983.

  • An independent, source-blind operator verified fresh setup, account-name variation, and an existing-config upgrade on that same candidate artifact. The upgrade replaced published [email protected] (build 3a9d69db306cd7f081e06254cb89c4bcc14a7107) through public npm install in the same HOME, without re-onboarding. Config SHA256 stayed ad9b989185328bd8fdbdc094347fe083d0af09b64555478786632e79015c01d8 before/after replacement; the named Slack account, mode, enabled flag, postAs, and both token values were preserved. Later intentional account edits and a successful fake-provider agent run retained the Slack settings in fresh CLI and direct config readbacks.

  • 24 focused tests, 500 channel contract tests, and 1,126 plugin contract tests passed. The selected changed-file gate passed all type, lint, metadata, and runtime guards. An integrity-verified Zod 4.4.3 root containing current Zod 4.5.4 SDK nodes reproduces the old converter failure; both repaired builders pass records, cross-copy metadata, escaped references, input/output defaults, original runtime parsing, and Zod 3 compatibility.

  • Normal pre-push pnpm build passed on the verified candidate content; the subsequent package build verified the actual published commit above. Local reruns on the refreshed head were not usable as green evidence because the shared install was stale and incomplete: it resolved Zod 4.4.3 instead of locked 4.5.4 and lacked several current workspace dependencies. No install or dependency mutation was performed; exact-head CI above is the authoritative locked-dependency result.

The ClawSweeper review of bddfbe3 found no code or security findings and requested packaged fresh-install/upgrade evidence. Those rank-up requests are satisfied above. Its baseline-log download error was an access limitation in the review environment; the recorded failing stack and identities are included here.

Proof used synthetic Slack credentials and a local fake provider; no Slack messages were sent. Adjacent follow-up: investigate 28 non-Slack bundled-plugin manifest-drift warnings emitted by doctor after upgrade.

Published plugins can compose older Zod roots with newer SDK schema nodes. Generate channel and plugin JSON schemas with the host converter so those nodes receive the current conversion context.

Preserve original runtime parsing, conversion modes, metadata, defaults, and Zod 3 compatibility. Update the assertion ratchet for the removed casts.

Release note: restore onboarding for published channel plugins after core upgrades.
@vincentkoc vincentkoc self-assigned this Sep 13, 2026
@clawsweeper

clawsweeper Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Sep 13, 2026
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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. labels Sep 13, 2026
@clawsweeper

clawsweeper Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 13, 2026, 2:25 PM ET / 18:25 UTC (Revision 5).

ClawSweeper review

What this changes

Uses OpenClaw’s Zod converter to load published plugin configuration schemas after core updates while preserving original validation, defaults, and Zod 3 compatibility.

Merge readiness

✅ Ready for maintainer review

The fix remains necessary on current main. No actionable correctness or security findings remain, and the retained package and upgrade evidence supports the changed behavior. The prior log-access limitation does not warrant another merge blocker.

Priority: P1
Reviewed head: 5bf767748771cf617c4e336a0d814f5f52f75663

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A focused owner-level repair with strong packaged before/after and upgrade evidence, preserved contracts, and no actionable findings.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): Retained packaged CLI observations exercise the repaired schema-loading boundary with published Slack on Linux, showing fresh setup and preservation of existing settings after upgrade. The production builders match the proven candidate; the blocked raw-log download is a reviewer limitation, not missing contributor proof.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): Retained packaged CLI observations exercise the repaired schema-loading boundary with published Slack on Linux, showing fresh setup and preservation of existing settings after upgrade. The production builders match the proven candidate; the blocked raw-log download is a reviewer limitation, not missing contributor proof.
Evidence reviewed 9 items Introduced production changes: The pinned base-to-head diff replaces schema-owned conversion in both existing builders; parsing callbacks, conversion modes, normalization, and fallback behavior remain intact.
Current main still needs the repair: Current main still invokes the plugin schema's toJSONSchema method. Slack composes locally created schemas with imported SDK schema nodes, establishing the mixed-version dependency boundary described in the report.
Latest release comparison: The supplied latest release, v2026.9.4, also uses schema-owned conversion in the plugin builder; this repair is not demonstrated as shipped.
Findings None None.
Security None None.

How this fits together

Plugin configuration schemas describe accepted settings for setup and configuration tools. The shared builders convert those descriptions to JSON Schema while leaving runtime parsing with the original plugin schema.

flowchart LR
  A[Published plugin schema] --> B[Shared schema builders]
  C[Host SDK schema nodes] --> B
  B --> D[Host JSON Schema converter]
  D --> E[Setup and configuration tools]
  B --> F[Original runtime parser]
  F --> G[Validated settings and defaults]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -8, Tests +73, Other 0. Total +65 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 2 6 14 -8
Tests 3 121 48 +73
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 2 0
Total 6 129 64 +65

Review metrics

None.

Technical review

Best possible solution:

Keep conversion with the host’s current Zod implementation while preserving plugin-owned runtime parsing and existing configuration.

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

Yes: an older plugin Zod root containing newer SDK record nodes reaches a converter context without deferred, matching the recorded packaged failure. This review verified the source mechanism without executing it locally.

Is this the best way to solve the issue?

Yes: repairing the two existing builders addresses the conversion owner directly and preserves their documented parsing and configuration contracts.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against c72435e19089.

Labels

Label justifications:

  • P1: The recorded packaged failure prevents published Slack account onboarding after a core update.
  • 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 (linked_artifact): Retained packaged CLI observations exercise the repaired schema-loading boundary with published Slack on Linux, showing fresh setup and preservation of existing settings after upgrade. The production builders match the proven candidate; the blocked raw-log download is a reviewer limitation, not missing contributor proof.
  • proof: sufficient: Contributor real behavior proof is sufficient. Retained packaged CLI observations exercise the repaired schema-loading boundary with published Slack on Linux, showing fresh setup and preservation of existing settings after upgrade. The production builders match the proven candidate; the blocked raw-log download is a reviewer limitation, not missing contributor proof.

Evidence

What I checked:

  • Introduced production changes: The pinned base-to-head diff replaces schema-owned conversion in both existing builders; parsing callbacks, conversion modes, normalization, and fallback behavior remain intact. (src/plugins/config-schema.ts:132, 5bf767748771)
  • Current main still needs the repair: Current main still invokes the plugin schema's toJSONSchema method. Slack composes locally created schemas with imported SDK schema nodes, establishing the mixed-version dependency boundary described in the report. (src/channels/plugins/config-schema.ts:285, c72435e19089)
  • Latest release comparison: The supplied latest release, v2026.9.4, also uses schema-owned conversion in the plugin builder; this repair is not demonstrated as shipped. (src/plugins/config-schema.ts:144, 3a9d69db306c)
  • Dependency contract supports the failure mechanism: Zod v4.5.4 record processing calls ctx.deferred.push; its host converter initializes deferred. Inspection of v4.4.3 showed its conversion context lacks that field. The target directly imports Zod and claims mixed-version schema compatibility, making this dependency inspection applicable. (packages/zod/src/v4/core/json-schema-processors.ts:590, e8e206fa33ac)
  • Retained packaged behavior evidence: The captured PR body at sourceRevision b324dd170fa3e4414a11dd0df541ad494e495cec32620fc15f16d3a2d8ed7412 records baseline failure and candidate success with unchanged published Slack, artifact hashes, Linux/Node identities, fresh account setup, and an existing-config upgrade preserving the configuration hash and Slack settings. Evidence is linked at https://github.com/openclaw/openclaw/actions/runs/34761824081. The Testbox session is marked cancelled, which does not independently establish the recorded scenario results; those come from the retained operator observations. Raw log inspection was blocked by the storage-host allowlist. (bddfbe32195d)
  • Proof continuity across the refreshed head: Both production builder blobs match the packaged candidate exactly: channel 18817557ad15b1c9e1f3a773f2b5fb71b9d20137 and plugin 1b89b191ecc4289998891471295423fa75659f37. Zod remains 4.5.4. Package and lockfile blobs differ after the main merge, so this preserves focused behavior evidence rather than claiming an identical whole-package rerun. (src/channels/plugins/config-schema.ts:277, bddfbe32195d)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)

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 (4 earlier review cycles)
  • reviewed 2026-09-13T14:58:22.876Z sha bddfbe3 :: blocked before merge. :: none
  • reviewed 2026-09-13T15:42:24.914Z sha bddfbe3 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-13T17:17:59.968Z sha 554a0e6 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-13T18:05:51.668Z sha 554a0e6 :: blocked before merge. :: none

@vincentkoc
vincentkoc marked this pull request as ready for review September 13, 2026 15:34
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Sep 13, 2026
Use the installed Zod entry in the generated native module so the raw-schema test exercises the supported converter contract. Preserve the numeric-property assertion and the complete loader test order.

This follow-up changes only the test fixture; runtime source is unchanged.
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Please review exact head 554a0e64497c99835bd9742ac9eb61b8b66f043b. The follow-up replaces the native raw-schema test double with real Zod; runtime files are unchanged. The PR body distinguishes pending new-head CI from the retained package and operator proof at bddfbe32195d95c07d413ceaf76d475ccdbeefc1.

@clawsweeper

clawsweeper Bot commented Sep 13, 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 exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@vincentkoc vincentkoc closed this Sep 13, 2026
@vincentkoc vincentkoc reopened this Sep 13, 2026
@vincentkoc
vincentkoc merged commit 9cb840c into main Sep 13, 2026
187 checks passed
@vincentkoc
vincentkoc deleted the fix/sdk-zod-json-schema-context branch September 13, 2026 18:45
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 13, 2026
* commit '28887b564210326174413d0d8ade72b38268d5f3': (1827 commits)
  fix(qa): bind coverage IDs to producer assertions (#144000)
  fix(linux): explain FreeBSD desktop setup prerequisites (#147211)
  fix(memory): split embedding batches rejected for an input array item cap (#139541)
  test: isolate timing metadata persistence from inherited settings (#147112)
  refactor(status): retire test-only helper publication (#147071)
  improve: reduce workspace agent lookup work for large fleets (#147144)
  refactor(macos): share connect credential selection (#144214)
  fix(plugins): restore Slack onboarding after core updates (#147109)
  refactor: share ANSI compatibility matching (#146998)
  fix(test): settle Models catalog before picker open (#147215)
  test(ui): reuse panel tab drag fixture (#147250)
  fix(install): use system Node for FreeBSD CLI setup (#147204)
  fix(cli): explain MCP probes with no enabled servers (#147216)
  docs: require UI screenshots in chat and PR (#147263)
  docs(skills): clarify remote gog OAuth setup for Gateway hosts (#145945)
  test: replace idle account catalog waits with synchronization (#147228)
  feat(qa): preserve maturity decision context (#147219)
  feat(macos): clarify agent activity in native chat (#147197)
  fix(runtime): complete Bun compatibility follow-ups (#147085)
  fix(ui): release closed chat panes after queued updates (#147240)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 14, 2026
…47109)

* fix(plugin-sdk): convert config schemas with host Zod

Published plugins can compose older Zod roots with newer SDK schema nodes. Generate channel and plugin JSON schemas with the host converter so those nodes receive the current conversion context.

Preserve original runtime parsing, conversion modes, metadata, defaults, and Zod 3 compatibility. Update the assertion ratchet for the removed casts.

Release note: restore onboarding for published channel plugins after core upgrades.

* test(config): load real Zod in native schema fixture

Use the installed Zod entry in the generated native module so the raw-schema test exercises the supported converter contract. Preserve the numeric-property assertion and the complete loader test order.

This follow-up changes only the test fixture; runtime source is unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P1 High-priority user-facing bug, regression, or broken workflow. 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.

1 participant