Repository navigation
refactor(plugin-sdk): unify lazy channel config schemas - #120938
Merged
Merged
Conversation
steipete
marked this pull request as ready for review
August 9, 2026 06:03
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Additional instructions
MUST: Keep Allow edits from maintainers enabled for this PR so maintainers
can help update the branch when needed.
What Problem This Solves
Channel plugin entry helpers resolved config schema factories during entry construction, even though schema consumers may never inspect the schema. This made the channel entry path eager while the generic plugin entry path already supported deferred, memoized schema construction.
Why This Change Was Made
Generic plugin schemas and channel schemas intentionally have different public types, so the two channel helpers now share the narrow cached-lazy value primitive rather than forcing one public schema type through a cast. Both helpers expose the existing
configSchemaproperty while deferring a factory until its first read and caching that result.User Impact
There is no user-visible behavior or configuration change. Plugin entry construction avoids unnecessary schema work, and channel config schema factories remain stable after their first access.
Evidence
node scripts/run-vitest.mjs src/plugin-sdk/core.test.ts src/plugin-sdk/channel-entry-contract.test.ts— 2 files, 21 tests passed.oxfmtcheck andgit diff --checkpassed.pnpm buildpassed on leasetbx_01kzjh2fwdtdzntfjgkgtcbc1k; all 151 public SDK subpaths verified: https://github.com/openclaw/openclaw/actions/runs/31297506761tbx_01kzjjgthvrm5ec20yxdpnkgxe, covering production, test, and plugin typechecks plus lint and SDK boundary guards: https://github.com/openclaw/openclaw/actions/runs/31298430551autoreview --mode uncommittedcompleted clean with no accepted/actionable findings.