refactor(plugins): root-owned bundle installation with scoped registry handles (#117587)

* refactor(plugins): root-owned bundle installation with scoped registry handles

* refactor(plugins): root-owned bundle installation with scoped registry handles

* test(gateway): expect gateway-binding fact in reload rewarm

* fix(agents): reuse gateway prepared runtime generations

* test(agents): isolate runtime handle fixtures

* test(agents): align runtime owner fixtures

* test(cron): mock run-owned registry loading
This commit is contained in:
Peter Steinberger
2026-08-01 16:17:30 -07:00
committed by GitHub
parent 2fc32204b4
commit 6c9b38862d
131 changed files with 3538 additions and 2949 deletions
@@ -4,8 +4,12 @@ import { afterEach, describe, expect, it, vi } from "vitest";
import type { OpenClawConfig } from "../config/types.openclaw.js";
import { reconcileNodePairingOnConnect } from "../gateway/node-connect-reconcile.js";
import { resetPluginLoaderTestStateForTest } from "../plugins/loader.test-fixtures.js";
import { testing as runtimeRegistryLoaderTesting } from "../plugins/runtime/runtime-registry-loader.js";
import { setActivePluginRegistry } from "../plugins/runtime.js";
import { listRegisteredNodeHostCapsAndCommands } from "./plugin-node-host.js";
import {
getNodeHostPluginRegistry,
resetNodeHostPluginRegistry,
} from "./plugin-node-host.test-support.js";
import { prepareNodeHostRuntime } from "./runtime.js";
const LINUX_NODE_COMMANDS = [
@@ -18,7 +22,7 @@ const LINUX_NODE_COMMANDS = [
function resetPluginState(): void {
resetPluginLoaderTestStateForTest();
runtimeRegistryLoaderTesting.resetPluginRegistryLoadedForTests();
resetNodeHostPluginRegistry();
}
afterEach(() => {
@@ -80,6 +84,7 @@ describe("linux-node node-host integration", () => {
expect(prepared.manifest.commands).toEqual(expect.arrayContaining([...LINUX_NODE_COMMANDS]));
const requestPairing = vi.fn();
setActivePluginRegistry(getNodeHostPluginRegistry()!);
const reconciliation = await reconcileNodePairingOnConnect({
cfg: config,
connectParams: {