Repository navigation
fix(update): validate bundle plugin payloads by manifest contract - #98010
vincentkoc merged 4 commits into
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 30, 2026, 12:07 PM ET / 16:07 UTC. Summary PR surface: Source +155, Tests +295. Total +450 across 4 files. Reproducibility: yes. Current main source requires package.json for tracked update payload records, and the linked issue describes valid bundle plugins without that package payload failing the update path. Review metrics: 2 noteworthy metrics.
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. Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land one canonical format-aware update payload validation fix that uses the shared bundle manifest contract, preserves native package fail-closed checks, and then close the duplicate sibling PRs. Do we have a high-confidence way to reproduce the issue? Yes. Current main source requires package.json for tracked update payload records, and the linked issue describes valid bundle plugins without that package payload failing the update path. Is this the best way to solve the issue? Yes for the central bug. Reusing the shared bundle manifest detector is the right owner-boundary fix, while broader non-destructive plugin-sync recovery can be tracked separately if maintainers want that policy change. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 6cb82eaab865. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +155, Tests +295. Total +450 across 4 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
|
|
@clawsweeper re-review Addressed the native-first finding: dual-format payloads with Also fixed the Verified locally:
|
|
🦞🧹 I asked ClawSweeper to review this item again. |
…enclaw#98010) * fix(update): validate bundle plugin payloads by manifest contract Closes openclaw#97985 * fix(update): preserve native payload checks for dual-format plugins * fix(update): satisfy payload validation lint * fix(update): cover persisted marketplace bundles
…enclaw#98010) * fix(update): validate bundle plugin payloads by manifest contract Closes openclaw#97985 * fix(update): preserve native payload checks for dual-format plugins * fix(update): satisfy payload validation lint * fix(update): cover persisted marketplace bundles
Closes #97985
Summary
source,installPath, and marketplace identity fields no longer fail only because they lackpackage.json.Change Type
Scope
Verification
node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/core-test.tsbuildinfopassed.node scripts/run-vitest.mjs run src/cli/update-cli/plugin-payload-validation.test.ts src/cli/update-cli/update-command.test.tspassed.OPENCLAW_OXLINT_SKIP_PREPARE=1 node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json src/cli/update-cli/plugin-payload-validation.ts src/cli/update-cli/plugin-payload-validation.test.ts src/cli/update-cli/update-command.ts src/cli/update-cli/update-command.test.tspassed.git diff --checkpassed.Real behavior proof
Behavior addressed: Bundle install payloads are validated by the bundle manifest contract even when persisted marketplace install records do not carry transient
formatfields.Environment tested: Node v22.22.0 on Linux 4.19.112-2.el8.x86_64 x86_64.
Steps run after the patch: Called the actual
runPluginPayloadSmokeCheckandcollectMissingPluginInstallPayloadsproduction functions from source with a ClawHub bundle record, two marketplace bundle records withoutformat, and a broken npm payload.Evidence after fix:
Output:
{ "smokeChecked": [ "clawhub-codex-bundle", "manifestless-bundle", "marketplace-cursor-bundle", "npm-plugin" ], "smokeFailures": [ { "pluginId": "npm-plugin", "reason": "missing-package-json" } ], "missingPayloads": [ { "pluginId": "npm-plugin", "reason": "missing-package-json" } ] }Observed result after the fix: Valid bundle payloads pass both update-time payload checks without
package.json; the npm payload that lackspackage.jsonstill fails withmissing-package-json.What was not tested: Full macOS package upgrade plus service restart; this proof exercises the update payload functions directly and the targeted test suites cover the related update paths.
Root Cause
The update payload checks treated tracked plugin install records as npm/code packages unless the record carried bundle-specific transient fields. Marketplace install records persist source and marketplace identity fields but not those transient format fields, so valid bundle directories could still be reported as missing package payloads.
Regression Test Plan
formatmetadata in the smoke check path.package.jsonfailures.User-visible / Behavior Changes
Users with valid bundle marketplace plugins no longer get a post-update payload failure solely because the persisted install record lacks transient bundle format fields.
Security Impact
No new permissions, network calls, or secret handling changes. The change reads local bundle manifests through the existing shared bundle loader.