mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-27 12:56:01 -06:00
fix(plugins): reuse gateway lifecycle metadata and isolate plugin state (#114476)
* fix(plugins): reuse gateway metadata and preserve reload isolation * test(plugins): split lifecycle regressions and simplify gateway dispatch * perf(plugins): reuse proven immutable snapshot graphs * test(plugins): isolate snapshot lifecycle regression mocks * perf(plugins): retain one gateway metadata cache * test(plugins): preserve frozen proxy descriptor invariants * test(plugins): isolate lifecycle metadata mock ownership * test(plugins): bind shared worker mocks before module evaluation
This commit is contained in:
committed by
GitHub
parent
91f04499f5
commit
3fb201c5a7
@@ -258,7 +258,6 @@ function createPluginModuleLoader(params: {
|
||||
allowWindows: true,
|
||||
aliasMap: params.aliasMap,
|
||||
fallbackOnMissingDependency: true,
|
||||
fallbackOnNativeError: true,
|
||||
});
|
||||
if (native.ok) {
|
||||
pluginModuleLoaderStats.nativeHits += 1;
|
||||
@@ -277,12 +276,14 @@ export function getCachedPluginModuleLoader(
|
||||
createLoader?: PluginModuleLoaderFactory;
|
||||
},
|
||||
): PluginModuleLoader {
|
||||
installOpenClawInternalCorePackageNativeResolver({ moduleUrl: params.importerUrl });
|
||||
const cacheEntry = resolvePluginModuleLoaderCacheEntry(params);
|
||||
const cached = params.cache.get(cacheEntry.scopedCacheKey);
|
||||
if (cached) {
|
||||
return cached;
|
||||
}
|
||||
// Exact-key hits already own the native aliases installed with their loader;
|
||||
// reinstallation would rescan the host package on every cached request.
|
||||
installOpenClawInternalCorePackageNativeResolver({ moduleUrl: params.importerUrl });
|
||||
const loader = createPluginModuleLoader({
|
||||
loaderFilename: cacheEntry.loaderFilename,
|
||||
aliasMap: cacheEntry.aliasMap,
|
||||
|
||||
Reference in New Issue
Block a user