fix(plugin-sdk): bundle zod subpath artifact#78464
Conversation
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close as superseded: #78515 already landed the same zod bundling fix with a stronger reachable-chunk artifact verifier, and that implementation is present in v2026.5.20. Canonical path: Keep the shipped implementation from #78515 and close this duplicate PR rather than merging a stale parallel branch. So I’m closing this here and keeping the remaining discussion on #78515. Review detailsBest possible solution: Keep the shipped implementation from #78515 and close this duplicate PR rather than merging a stale parallel branch. Do we have a high-confidence way to reproduce the issue? Yes. The linked issue and PR body give a concrete pnpm global install path for the old artifact failure, and source inspection shows the public SDK subpath and package verifier path involved. Is this the best way to solve the issue? No for this PR as the landing vehicle. The build-side direction was right, but the already-merged implementation is the better solution because it also verifies reachable local chunks from the zod entry artifact. Security review: Security review cleared: The diff only changes bundling for an existing declared dependency plus package-artifact verification, tests, and changelog text; it adds no new dependency source, permissions, network calls, lifecycle hooks, or secret handling. What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 8961eae3f022; fix evidence: release v2026.5.20, commit ea72414e1c44. |
|
ClawSweeper applied the proposed close for this PR.
|
Summary
openclaw/plugin-sdk/zodshipped asdist/plugin-sdk/zod.jswith a bare runtimeexport * from "zod", which can fail in pnpm global installs wherezodis not resolvable from the OpenClaw package root.zoddependency can prevent plugins such as Feishu and BlueBubbles from registering.zodinto the tsdown bundle graph so the published SDK subpath imports only package-local chunks.dist/plugin-sdk/zod.jswhen it imports or re-exports barezod.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Root Cause (if applicable)
src/plugin-sdk/zod.tsre-exported from barezod, and the build did not force that dependency to stay bundled for the public SDK subpath. Published artifacts could therefore containexport * from "zod", which relies on Node resolvingzodfrom the installed OpenClaw package location. pnpm global installs can leave that dependency unavailable from that path.Regression Test Plan (if applicable)
test/openclaw-npm-postpublish-verify.test.tsscripts/openclaw-npm-postpublish-verify.tsdist/plugin-sdk/zod.jsmust be self-contained and must not import or re-export barezod.Security Impact (required)
Yes/No) NoYes/No) NoYes/No) NoYes/No) NoYes/No) NoYes, explain risk + mitigation: N/ARepro + Verification
Environment
Steps
dist/plugin-sdk/zod.jsfor barezodimports/exports.openclaw/plugin-sdk/zodfrom the installed package.Expected
The zod SDK subpath imports successfully and the installed artifact verifier reports no bare
zodimport/export.Actual
After this patch, the installed pnpm global tarball import succeeded and the verifier returned
[].Evidence
Review Conversations
Compatibility / Migration
Yes/No) YesYes/No) NoYes/No) NoRisks and Mitigations