Repository navigation
fix(update): recognize bundle plugins in post-update payload smoke check (fixes #97985) (AI-assisted) - #97990
liuhao1024 wants to merge 3 commits into
Conversation
Bundle plugins (clawhubFamily=bundle-plugin) use .claude-plugin/plugin.json instead of package.json. The post-update payload smoke check and missing- payload collector both required package.json, causing false failures for every bundle plugin during openclaw update. This exited 1 and left the gateway unloaded despite the plugins being structurally valid. Fix: detect clawhubFamily=bundle-plugin records and validate the bundle manifest (.claude-plugin/plugin.json) instead of package.json. Fixes openclaw#97985
|
Codex review: needs maintainer review before merge. Reviewed June 30, 2026, 12:33 AM ET / 04:33 UTC. Summary PR surface: Source +52, Tests +166. Total +218 across 4 files. Reproducibility: yes. Current main source still sends tracked install records without package.json to missing-package-json, and the linked issue reports the released 2026.6.10 failure for active bundle-format plugins. 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:
Next step before merge
Security Review detailsBest possible solution: Land one canonical bundle-aware updater fix that preserves native package validation and validates true bundle-only payloads through the shared bundle manifest contract. Do we have a high-confidence way to reproduce the issue? Yes. Current main source still sends tracked install records without package.json to missing-package-json, and the linked issue reports the released 2026.6.10 failure for active bundle-format plugins. Is this the best way to solve the issue? Yes for the reported ClawHub bundle-plugin path. The patch fixes the two implicated updater payload gates with the existing bundle manifest contract while keeping native package validation intact. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 85ee71223f0d. Label changesLabel justifications:
Evidence reviewedPR surface: Source +52, Tests +166. Total +218 across 4 files. View PR surface stats
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
|
Replace hard-coded .claude-plugin/plugin.json path with detectBundleManifestFormat() + loadBundleManifest() to cover all supported bundle formats (Codex, Cursor, Claude, manifestless Claude) in the post-update smoke check and missing-payload collector. Add regression tests for .codex-plugin and .cursor-plugin formats.
…gin installs Check for a valid native package.json before treating a bundle-family install record as bundle-only. Dual-format directories (native package metadata plus bundle markers) should use the native validation path per the bundle docs contract.
|
I did a source pass over the #97985 sibling PRs and this looks like the safest candidate to keep as the canonical fix. The important part is that this branch handles both update-time gates from the report: I would still let maintainers decide whether production-function proof is enough for this update-availability path or whether they want one packaged |
|
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. Thanks for the work here; #98010 preserves the useful bundle-recognition behavior while also keeping native package payload validation for dual-format installs. |
What Problem This Solves
openclaw updatefails on everyformat=bundleplugin (Claude-plugin layout:.claude-plugin/plugin.json+skills/, nopackage.json). The post-update payload smoke check requirespackage.jsonfor all tracked plugins, so bundle plugins installed from ClawHub always produce a falsemissing-package-jsonfailure. This causes the update to exit 1 and leaves the gateway unloaded — even though the bundle plugins are structurally valid and load fine at runtime.Why This Change Was Made
Both
runPluginPayloadSmokeCheck(inplugin-payload-validation.ts) andcollectMissingPluginInstallPayloads(inupdate-command.ts) unconditionally check forpackage.jsonin each plugin's install directory. Bundle plugins from ClawHub (clawhubFamily: "bundle-plugin") use.claude-plugin/plugin.jsoninstead, so they always fail this check.The fix detects
clawhubFamily === "bundle-plugin"records and validates.claude-plugin/plugin.json(existence + valid JSON) instead ofpackage.json. This applies in both the smoke-check path and the missing-payload collector.User Impact
Users with bundle plugins (common for Claude-plugin layout extensions) will no longer see false update failures. The gateway stays loaded after
openclaw updateinstead of being unloaded by a spurious plugin-sync error.Evidence
Real behavior proof
format=bundleplugins that lackpackage.json.54b09580f)..claude-plugin/plugin.json(valid JSON).runPluginPayloadSmokeCheckwith all three records via a production import..claude-plugin/plugin.jsonpasses the smoke check (no failure). Broken bundle plugin and missing npm plugin dir are still correctly flagged.openclaw updateend-to-end flow (requires a real version upgrade). Gateway restart after update.Changes
src/cli/update-cli/plugin-payload-validation.ts: AddedisBundlePluginRecord()helper; bundle plugins now validate.claude-plugin/plugin.jsoninstead ofpackage.json.src/cli/update-cli/update-command.ts:collectMissingPluginInstallPayloadsskips thepackage.jsonrequirement for bundle plugins that have.claude-plugin/plugin.json.src/cli/update-cli/plugin-payload-validation.test.ts: 3 new tests (bundle accepted, missing manifest flagged, unparseable manifest flagged).src/cli/update-cli/update-command.test.ts: 2 new tests (bundle not flagged when manifest present, flagged when manifest missing).AI-assisted (Hermes Agent)