Repository navigation
Conversation
…ilities (openclaw#78196) Pre-v5.3 external extensions (claw-guard, approval-formatter, ...) shipped without `activation.onCapabilities: ["hook"]` metadata — that metadata didn't exist yet — and they often did not set explicit `hooks.*` policy keys either. Users enabled them with `plugins.entries.<id>.enabled = true` plus `plugins.allow`. After v5.3 tightened gateway startup, hasHookRuntimeStartupIntent only returned true when a manifest declared the hook capability or the entry carried explicit hook policy, so legacy plugins were silently skipped at gateway boot. Single-shot CLI commands (`openclaw plugins inspect`) re-imported the plugin in their own process and printed the register banner, which made the daemon-only failure invisible. Net effect for the reporter: ClawGuard's `before_tool_call` hook never fired, so `audit.jsonl` froze and tool calls ran unaudited. Treat any non-bundled plugin that the user has explicitly enabled (`entry?.enabled === true`) as having legacy hook startup intent, in addition to the existing manifest/onCapabilities and explicit hook policy paths. Bundled plugins keep their existing manifest-driven activation. Merely allowlisted (but not explicitly enabled) plugins remain ambient and are still skipped — this preserves the current allow-vs-load distinction. Test plan - Added `loads explicitly enabled legacy external plugins lacking hook-capability metadata (openclaw#78196)` and the negative ambient-load case to channel-plugin-ids.test.ts using the existing `external-hook-policy` fixture (origin: global, no manifest hook capability, no explicit hook policy). - Local vitest blocked before any test by the `@openclaw/fs-safe/config` import gap shared by all PRs in this worktree; behavior change is single-branch and exercised by the new cases.
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Keep open: this is a useful candidate for the linked legacy external hook startup regression, but it is not merge-ready because the enabled-only fallback can bypass explicit startup opt-outs and the PR still has only unit-test proof for a Gateway/runtime behavior change. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Close this stale PR. The latest review rated it F, the branch still lacks merge-ready proof, and there has been no human follow-up after the durable review. So I’m closing this here because the remaining work is already tracked in the canonical issue. Review detailsBest possible solution: Close this stale PR. The latest review rated it F, the branch still lacks merge-ready proof, and there has been no human follow-up after the durable review. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main excludes enabled-only legacy external hook plugins before Gateway runtime loading unless they declare hook activation metadata or hook policy config. I did not run the live Docker/Gateway reproduction in this read-only review. Is this the best way to solve the issue? No, not as-is. The startup planner is the right layer, but the patch must preserve explicit startup opt-outs and include after-fix real Gateway proof before it is the best merge path. Security review: Security review needs attention: The diff widens in-process native plugin startup and can bypass an explicit startup opt-out.
AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 010b61746379. |
This comment was marked as low quality.
This comment was marked as low quality.
|
Heads up: this PR needs to be updated against current |
|
This pull request has been automatically marked as stale due to inactivity. |
|
Closing per ClawSweeper review verdict |
Fixes #78196.
Root cause
v5.3 tightened
hasHookRuntimeStartupIntentto require either amanifest
activation.onCapabilities: [\"hook\"]declaration orexplicit
hooks.*policy keys. Pre-v5.3 external extensions(
claw-guard,approval-formatter, …) shipped before that metadataexisted and were activated solely via
plugins.entries.<id>.enabled = trueplusplugins.allow. Afterv5.3, those plugins quietly fall through
canStartExplicitHookPluginbecause their startup intent is empty, so the gateway daemon skips
them with no error or warning.
The CLI-side path (
openclaw plugins inspect) keeps reporting themas
Status: loadedbecause each CLI invocation re-imports the pluginin its own short-lived Node process — that path is fine. The
long-lived gateway daemon, which is the process that needs the hook
wired to handle tool calls, is the one that silently skips them.
Net effect for the reporter:
before_tool_callfromclaw-guardnever fires,
audit.jsonlstops advancing, and tool calls rununaudited.
What the fix does
Treat any non-bundled plugin that the user has explicitly enabled
(
activationSourcePlugins.entries[pluginId]?.enabled === true) ashaving legacy hook startup intent. Bundled plugins keep their
manifest-driven activation. Merely allowlisted (but not explicitly
enabled) plugins remain ambient and are still skipped — the existing
allow-vs-load distinction is preserved.
Tests
channel-plugin-ids.test.tsreusing the existing
external-hook-policyfixture (origin:global, no manifest hook capability, no explicit hook policy):
Real behavior proof
Unit tests only. Local vitest blocked before tests by the existing
@openclaw/fs-safe/configinfra gap. The behavior change is a singlenew short-circuit in
hasHookRuntimeStartupIntentand is exercised bythe new positive/negative cases.