Repository navigation
Fix/97985 bundle plugin update smoke check - #98007
hanZeng-08 wants to merge 3 commits into
Conversation
Adds resolvePluginInstallPayloadKind to distinguish npm-package, bundle, and unknown plugin install layouts. Reuses the existing bundle-manifest detector. Refs openclaw#97985
Smoke validation now resolves the payload kind before checking for package.json. Bundle-format plugins bypass npm-specific validation. Refs openclaw#97985
…d scan collectMissingPluginInstallPayloads now treats bundle-format install paths as valid payloads, matching runtime behavior and preventing openclaw update from false-failing on healthy bundle plugins. Refs openclaw#97985
|
Codex review: needs changes before merge. Reviewed June 30, 2026, 12:02 AM ET / 04:02 UTC. Summary PR surface: Source +34, Tests +120. Total +154 across 6 files. Reproducibility: yes. Current main's tracked-plugin payload checks reach Review metrics: 1 noteworthy metric.
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:
Risk before merge
Maintainer options:
Copy recommended automerge instructionNext step before merge
Security Review findings
Review detailsBest possible solution: Align post-update payload checks with the existing plugin install contract: skip npm checks for true bundle payloads while keeping native package validation for dual-format package directories. Do we have a high-confidence way to reproduce the issue? Yes. Current main's tracked-plugin payload checks reach Is this the best way to solve the issue? No. The PR touches the right update-cli validation path, but the best fix must preserve native-first dual-format package validation instead of treating every bundle-marker directory as safe to skip npm checks. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 72f837a4a478. Label changesLabel justifications:
Evidence reviewedPR surface: Source +34, Tests +120. Total +154 across 6 files. View PR surface stats
Acceptance criteria:
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
|
|
Hi @steipete @vincentkoc @frankekn @thewilloftheshadow @joshavant @gumadeiras @hydro13 this PR is ready for review/approval. Please take a look when convenient. Thank you! |
|
Please don’t spam-ping multiple maintainers at once. Be patient, or join our community Discord for help: https://discord.gg/clawd |
|
The canonical fix for #97985 has now landed in #98010 as 4391041. I’m closing this PR as superseded so we keep one implementation path for the bundle-plugin update payload fix and avoid overlapping update-smoke behavior changes. This branch was also waiting on author/proof refresh, so #98010 is the safer canonical path. |
Fixes #97985
Summary
Fix
openclaw updateso its post-update plugin sync no longer treatsformat=bundleplugins as npm packages. Bundle plugins (Codex/Claude/Cursor layouts) have nopackage.json, so the post-update smoke check reportedmissing-package-json, caused the update to exit 1, and incorrectly unloaded the gateway.The fix introduces a shared helper
resolvePluginInstallPayloadKindthat classifies an install path as"npm-package","bundle", or"unknown". Both check points —runPluginPayloadSmokeCheckandcollectMissingPluginInstallPayloads— consume this helper and skip npm-specific validation for bundle paths.Real Behavior Proof
Environment: Linux, Node v22.23.1, pnpm 11.2.2, OpenClaw worktree SHA 1052652
Test fixtures:
/tmp/openclaw-bundle-proof/extensions/claude-bundle/.claude-plugin/plugin.json(bundle plugin, no package.json)/tmp/openclaw-bundle-proof/extensions/npm-plugin/package.json(npm plugin)After the fix, calling the real check functions:
$ tsx /tmp/bundle-proof.mjs === collectMissingPluginInstallPayloads === [] === runPluginPayloadSmokeCheck === { "checked": ["claude-bundle", "npm-plugin"], "failures": [ { "pluginId": "npm-plugin", "installPath": "/tmp/openclaw-bundle-proof/extensions/npm-plugin", "reason": "missing-main-entry", "detail": "Plugin main entry \"dist/index.js\" not found at /tmp/openclaw-bundle-proof/extensions/npm-plugin/dist/index.js" } ] }Results:
claude-bundleno longer producesmissing-package-json.npm-pluginis still checked under npm rules (the fixture intentionally lacksdist/index.jsto show the path is unaffected).Regression Test Plan
src/cli/update-cli/plugin-payload-kind.test.ts: 7 cases covering codex/claude/cursor bundles, manifestless claude, npm package, empty directory, dual-format precedencesrc/cli/update-cli/plugin-payload-validation.test.ts: new bundle plugin smoke-check acceptance testsrc/cli/update-cli/update-command.test.ts: new bundle pluginmissing-package-jsonskip testRoot Cause
The post-update payload checks in
src/cli/update-cli/plugin-payload-validation.tsandsrc/cli/update-cli/update-command.tsassumed every tracked plugin was an npm package. They checkedinstallPath/package.jsondirectly without distinguishingformat=bundleplugins. Bundle plugins use manifest files such as.claude-plugin/plugin.jsonand have nopackage.json, so every update falsely flagged them as corrupted payloads.Implementation Plan Details
src/cli/update-cli/plugin-payload-kind.tsresolvePluginInstallPayloadKind(installPath)reusesdetectBundleManifestFormatto detect bundlespackage.jsonfor"npm-package""unknown"otherwisesrc/cli/update-cli/plugin-payload-validation.tsrunPluginPayloadSmokeCheck, call the helper after confirming the install dir exists"bundle"causescontinue, skipping package.json / extension / main / peer-link checkssrc/cli/update-cli/update-command.tscollectMissingPluginInstallPayloads, call the helper after confirming the install dir exists"bundle"causescontinue, avoiding themissing-package-jsonentrypnpm test src/cli/update-cli/andpnpm buildChange Details
src/cli/update-cli/plugin-payload-kind.ts(new)src/cli/update-cli/plugin-payload-kind.test.ts(new)src/cli/update-cli/plugin-payload-validation.ts: skip npm checks for bundle pathssrc/cli/update-cli/plugin-payload-validation.test.ts: bundle smoke-check regression testsrc/cli/update-cli/update-command.ts: skipmissing-package-jsonfor bundle pathssrc/cli/update-cli/update-command.test.ts: bundle payload-scan regression testTest Points
pnpm test src/cli/update-cli/plugin-payload-kind.test.ts: 7 passedpnpm test src/cli/update-cli/plugin-payload-validation.test.ts: 22 passedpnpm test src/cli/update-cli/update-command.test.ts: 36 passedpnpm test src/cli/update-cli/: 124 passedpnpm build: succeededNext Steps
@clawsweeper re-review