From 4ebe4c8bc3915cdac220c32b07be1eea6f123287 Mon Sep 17 00:00:00 2001 From: Ali Arslan <149683093+aarslan007@users.noreply.github.com> Date: Wed, 28 Oct 2026 22:50:14 +0500 Subject: [PATCH] fix(tests): skip the inert OpenCode stub when loading plugin factories --- tests/scripts/opencode-modular-telemetry.test.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/scripts/opencode-modular-telemetry.test.js b/tests/scripts/opencode-modular-telemetry.test.js index 5a6d30949..bcc3f15db 100644 --- a/tests/scripts/opencode-modular-telemetry.test.js +++ b/tests/scripts/opencode-modular-telemetry.test.js @@ -40,7 +40,8 @@ try { const loaded = []; for (const name of fs.readdirSync(path.join(root, 'plugins')).filter(name => /\\.ts$/.test(name))) { const mod = await import(pathToFileURL(path.join(root, 'plugins', name)).href); - for (const entry of new Set(Object.values(mod))) loaded.push(await entry(context)); + // The inert stub is a V2 definition object, not a factory: it registers no hooks. + for (const entry of new Set(Object.values(mod))) loaded.push(typeof entry === 'function' ? await entry(context) : {}); } const live = loaded.filter(hooks => typeof hooks['tool.execute.after'] === 'function'); assert.equal(live.length, 1, 'Local discovery must register exactly one live ECC plugin');