fix(plugins): restore cold-registry load for path-based plugin tools (#76598)#76609
fix(plugins): restore cold-registry load for path-based plugin tools (#76598)#76609hclsys wants to merge 2 commits into
Conversation
|
Thanks for the context here. I did a careful shell check against current Close as implemented on current main: the central cold-registry load for selected plugin tools is already handled in So I’m closing this as already implemented rather than keeping a duplicate issue open. Review detailsBest possible solution: Keep the centralized current-main fallback in Do we have a high-confidence way to reproduce the issue? Yes. The linked report has a concrete path-based config plugin reproducer, and source inspection shows the relevant resolution path now goes from manifest-selected plugin ids to a scoped standalone runtime load without requiring a pre-warmed registry. Is this the best way to solve the issue? Yes. The current-main helper-level fallback is the narrower maintainable fix because every Security review: Security review cleared: The PR touches plugin tool resolution, tests, and changelog only; it adds no dependency, CI, publishing, secret-handling, or new supply-chain surface. What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against e0a83c00461c; fix evidence: commit 5e9135f2e23d, main fix timestamp 2026-05-03T12:24:03+01:00. |
|
Silent fallback recreates the original symptom. The second-null branch in Test doesn't match repro. The test uses The cold-registry fallback approach is correct, and |
2daef9c to
2910653
Compare
…penclaw#76598) `resolvePluginTools` returned an empty tool list when no pre-warmed channel/active registry was found after startup — the on-demand fallback removed by PR openclaw#76004 was only added back for memory and capability-provider surfaces, leaving path-based (origin "config") plugin tool factories silent. Fix: when `resolvePluginToolRegistry` returns null, trigger a standalone registry load via `ensureStandaloneRuntimePluginRegistryLoaded`, then retry. Adds regression test asserting tools are resolved without pre-warming. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2910653 to
fccd78d
Compare
Summary
resolvePluginToolssilently returned an empty list when no pre-warmed channel/active runtime registry was available — specifically for path-based plugins loaded viaplugins.load.paths(origin"config").Root cause: PR #76004 ("perf(plugins): reuse startup runtime registry") replaced
resolveRuntimePluginRegistry(which did on-demand loading) withgetLoadedRuntimePluginRegistry(lookup-only). The on-demand load fallback was restored for memory plugins (#76393) and capability providers (#76536), but not forresolvePluginTools. Result: path-based plugin tool factories register at startup but their tools disappear at agent request time withunknown method: <tool-name>.run.Fix: When
resolvePluginToolRegistryreturnsnull(cold registry), callensureStandaloneRuntimePluginRegistryLoadedto trigger the load, then retry. If still null after load, return the (possibly partial) cached tool list.Changes
src/plugins/tools.ts: add cold-registry fallback load + retry inresolvePluginToolssrc/plugins/tools.optional.test.ts: regression test asserting tools resolve without pre-warming the registryCHANGELOG.md: fix entryAudit
ensureStandaloneRuntimePluginRegistryLoadedalready imported in tools.tsresolvePluginToolsis called from many sites, but the change is internal to its bodysrc/plugins/tools.tsfor this pathTest
Fixes #76598.