Repository navigation
fix(packages): make Plugin Inspector advisory and validate declared entrypoints - #4379
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review in progressClawSweeper is reviewing this revision. This supersedes any previous blocked status. |
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…ntrypoints Plugin Inspector no longer fails or blocks a plugin publish. Tool failures (out of memory, timeouts, OpenClaw target preparation errors) are recorded as tool_failure/timeout outcomes on the scan state, never as plugin breakage, and real Inspector findings are stored as advisory findings. Package validation now rejects code plugins whose declared openclaw extensions, runtimeExtensions, setupEntry, or runtimeSetupEntry files are missing from the upload, mirroring OpenClaw's install-time checks.
Address review: a failed rescan of the same release/target no longer overwrites a completed outcome or hides its findings, the declared entry is bounds-checked even when a runtime entry replaces it, and the failure classification and legacy finalization paths are covered by tests.
Patrick-Erichsen
force-pushed
the
plugin-inspector-advisory
branch
from
November 4, 2026 02:06
81e9ef6 to
a9954fd
Compare
This was referenced Nov 13, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Plugin Inspector no longer fails or blocks a plugin publish, and its one real check moves into package validation.
Over the last 30 days the publish-time Inspector gate blocked 145 plugin publishes. Only 4 were plugin defects (declared entrypoints missing from the upload). The other 141 were the tool failing: 512 MiB Node action OOMs, timeouts, or OpenClaw target preparation errors, all reported to publishers as
Plugin Inspector blocked publish.This is PR 1 of 2. It covers steps 1 and 3 (Inspector is advisory, entrypoint check moves into package validation). It still runs Inspector inside the publish request, but bounded and non-blocking. The follow-up, #4383 (stacked on this branch), moves Inspector out of the publish request entirely, into post-acceptance monitoring through the existing
plugin-inspector-bulk-scan.ymlworkflow (dispatched per accepted release, plus the nightly sweep).Behavior
Entrypoint validation (blocking, in package validation)
validateOpenClawExternalCodePluginPackageContents(clawhub-schema, used by both the server publish path and the CLI before upload) rejects a code plugin when a file declared byopenclaw.extensions,openclaw.runtimeExtensions,openclaw.setupEntry, oropenclaw.runtimeSetupEntryis missing from the uploaded files.validatePackageExtensionEntriesForInstall/listBuiltRuntimeEntryCandidatesfor installed packages:dist/<path>,dist/src/<path>, or<path>with.js/.mjs/.cjs, ordered by.mts/.cts.runtimeSetupEntrywithoutsetupEntryis rejected.demo-plugin declares openclaw.extensions entry ./dist/index.js, but that file is missing from the package. OpenClaw cannot load this plugin without it. Build first and publish a local folder or .tgz, or include the runtime file in the GitHub ref. Otherwise update package.json openclaw.extensions to point at a published file.openclaw.extensions.Plugin Inspector (advisory)
clean,findings,tool_failure, ortimeout. Failures also carry{ stage, reason: out_of_memory | target_unavailable | timeout | error, message }.plugin-inspector-errorbreakage. A workspace-cleanup failure is logged and no longer becomes a finding.PACKAGE_INSPECTOR_PUBLISH_BUDGET_MS(120 s). It also catches a rejectedrunAction, which is how a Convex Node OOM kill surfaces. Either way the publish continues. The deadline lives in the caller because Inspector's heavy TypeScript work is synchronous and would starve an in-action timer.inspectorFindings(the CLI prints them asERROR/WARNINGadvisories), staged with the attempt, and stored at finalization asscanSource: "publish"findings. Publish-time findings never email owners; owner email stays with reviewed bulk-scan notification runs.packageInspectorScanStates(new optional fieldsoutcome,failure,scanSource). A publish-time failure that never resolved its OpenClaw target usestargetOpenClawVersion: "unresolved". A tool failure never inserts finding rows, even if findings were staged.failure.status: "skipped"withskipReason: "inspector-timeout" | "inspector-tool-failure". It never reportserror(and no longer reports a misleadingclean).Back-compat:
inspectorOutcome, and their finalization behaves as before.outcomeare treated as completed scans.Tests
Highest seam,
publishPackageForUserInternal(convex/packages.public.test.ts, "advisory Plugin Inspector"):Node.js action execution ran out of memory: publish succeeds and stagestool_failure/out_of_memory, with no findings.tool_failure/target_unavailable.timeout.erroradvisory finding../dist/plugin.jsmissing from the upload: publish is rejected with the actionable error, and Inspector is never invoked.cleanoutcome.Convex runtime (
convex/packageInspectorAdvisory.runtime.test.ts, convex-test):tool_failurescan state with no findings.errorfindings with no notification.timeout, and the release stays claimable.Also covered:
classifyPackageInspectorFailureunit tests: OOM vs timeout vs target stage, and the message cap.Other updated tests:
packages/schema/src/openclawContract.test.tscovers the entrypoint rules: dist/src variants,.mts, runtime and setup entries, escapes, and length mismatch.tool_failure,timeout, and OOM classification, plus a cleanup failure that keeps the result.skippedstatus is covered../dist/index.js, and the e2e/local-auth Playwright fixture (now a missing-entrypoint rejection) are updated.Commands run locally:
bun run ci:static: pass (format, oxlint, knip, llms, audit warnings only).bunx tsc --noEmit,bunx tsc -p convex/tsconfig.json --noEmit,bun run ci:types:packages: pass.bun run ci:packages: pass.bun run ci:unit: all touched suites pass. The only local failures are timing-sensitive scanner and Endor wrapper tests that pass in isolation and fail only under local load. They are unrelated.vitest -c vitest.e2e.config.ts e2e/clawhub.e2e.test.ts(CLI publish subset): pass.Spec:
specs/plugin-inspector-reliability.md("Plugin Inspector is advisory"). Docs:docs/publishing.md,docs/plugin-validation-fixes.md.