Skip to content

fix(update): skip npm package.json check for bundle-format plugins in smoke check - #98071

Closed
xydt-tanshanshan wants to merge 1 commit into
openclaw:mainfrom
xydt-tanshanshan:fix/bundle-plugin-smoke-check-97985
Closed

xydt-tanshanshan wants to merge 1 commit into
openclaw:mainfrom
xydt-tanshanshan:fix/bundle-plugin-smoke-check-97985

Conversation

@xydt-tanshanshan

Copy link
Copy Markdown
Contributor

What Problem This Solves

openclaw update failed with exit 1 and left the gateway unloaded when bundle-format plugins (.claude-plugin/plugin.json layout, no package.json) were present in ~/.openclaw/extensions/. The post-update plugin smoke check only recognized npm-format plugins and treated the missing package.json as a fatal error.

Summary

  • Problem: Bundle plugins flagged as missing-package-json during update smoke check, causing gateway outage
  • Solution: Detect bundle plugins via clawhubFamily: "bundle-plugin" or .claude-plugin/plugin.json presence, validate the bundle manifest instead of requiring npm-style package.json
  • What changed: src/cli/update-cli/plugin-payload-validation.ts — bundle detection before package.json check; plugin-payload-validation.test.ts — 4 new tests
  • What did NOT change: npm-format plugin validation unchanged; missing-extension-entry and missing-main-entry checks untouched

Evidence

25 tests pass (21 existing + 4 new bundle plugin tests):

$ node scripts/run-vitest.mjs src/cli/update-cli/plugin-payload-validation.test.ts --run --reporter=verbose

 ✓ accepts a bundle plugin (clawhubFamily=bundle-plugin) with valid .claude-plugin/plugin.json
 ✓ accepts a bundle plugin detected by .claude-plugin/plugin.json presence
 ✓ reports a failure for a bundle plugin with missing .claude-plugin/plugin.json
 ✓ reports a failure for a bundle plugin with unparseable .claude-plugin/plugin.json
 ✓ only checks records whose source is package-tracked (npm/clawhub/git/marketplace)
 ... 25 passed (25)

Bundle plugin behavior matrix:

Scenario Result
clawhubFamily=bundle-plugin + valid manifest ✅ accepted
.claude-plugin/plugin.json present (no clawhubFamily) ✅ accepted
clawhubFamily=bundle-plugin + missing manifest ❌ reported
clawhubFamily=bundle-plugin + unparseable manifest ❌ reported
npm-format plugins unchanged

Security Impact

  • New permissions/capabilities? No
  • Secrets/tokens handling changed? No
  • New/changed network calls? No

AI Assistance

  • AI-assisted: Yes
  • AI model: deepseek-v4-pro

Fixes #97985

… smoke check

Bundle-format plugins (Claude-plugin layout: .claude-plugin/plugin.json +
skills/) ship without package.json.  The post-update smoke check treated
the missing package.json as a failure, causing 'openclaw update' to
exit 1 and leave the gateway unloaded.

Detect bundle plugins via clawhubFamily=bundle-plugin or by the presence
of .claude-plugin/plugin.json, and validate the bundle manifest instead
of requiring npm-style package.json.

Fixes openclaw#97985

Co-Authored-By: Claude <[email protected]>
@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: S labels Jun 30, 2026
@clawsweeper

clawsweeper Bot commented Jun 30, 2026 •

Copy link
Copy Markdown
Contributor

Thanks for the context here. I swept through the related work, and this is now duplicate or superseded.

Close: the useful smoke-check idea is superseded by #97990, which covers the same user report, changes both update-time payload gates, is live-clean/mergeable, and has positive after-fix production-function proof. This PR only updates the later smoke check and would still leave the earlier missing-payload collector on the package-json-only path.

Root-cause cluster
Relationship: superseded
Canonical: #97990
Summary: This PR is superseded by the safer canonical sibling PR for the same bundle-plugin update false-failure.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Canonical path: Use #97990 as the canonical fix, or land an equivalent branch that updates both updater payload gates while preserving native package validation.

So I’m closing this here and keeping the remaining discussion on #97990.

Review details

Best possible solution:

Use #97990 as the canonical fix, or land an equivalent branch that updates both updater payload gates while preserving native package validation.

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

Yes, at source level. Current main's collector and smoke check still require package.json for tracked plugin install records, and the linked issue reports the released v2026.6.10 update failure for active bundle plugins.

Is this the best way to solve the issue?

No. This is a plausible partial fix, but the best fix must also update collectMissingPluginInstallPayloads; #97990 already does that with stronger proof.

Security review:

Security review cleared: No concrete security or supply-chain regression was found; the diff reads local bundle manifest JSON and adds tests without changing dependencies, workflows, permissions, or secret handling.

AGENTS.md: found and applied where relevant.

What I checked:

Likely related people:

  • BKF-Gitty: PR and commit metadata show the mandatory post-core plugin convergence change introduced the central smoke-check and convergence files for this failure path. (role: introduced behavior; confidence: medium; commits: 109493bcdd62; files: src/cli/update-cli/plugin-payload-validation.ts, src/cli/update-cli/post-core-plugin-convergence.ts, src/cli/update-cli/update-command.ts)
  • ly-wang19: Recent main history touched the missing-payload id set in update-command.ts, which is the earlier gate this PR omits. (role: recent update-path contributor; confidence: medium; commits: a0e9ca1e9544; files: src/cli/update-cli/update-command.ts)
  • steipete: History shows substantial plugin install index and persisted record work that defines the install-record surface used by updater payload checks. (role: adjacent plugin-index contributor; confidence: medium; commits: 5443baa8527e; files: src/plugins/installed-plugin-index-record-reader.ts, src/plugins/installed-plugin-index-store.ts, src/plugins/plugin-registry-snapshot.ts)

Codex review notes: model internal, reasoning high; reviewed against 56c2d637d940.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. labels Jun 30, 2026
@clawsweeper

clawsweeper Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper applied the proposed close for this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: S status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

openclaw update: post-update plugin sync false-fails on format=bundle plugins ("package.json is missing"), exits 1 and unloads the gateway

1 participant