test(e2e): skip lazy tool catalog probes

This commit is contained in:
Vincent Koc
2026-05-01 01:33:32 -07:00
parent 4ce031fd1a
commit 200443e1b3

View File

@@ -98,17 +98,16 @@ function buildPluginPlan(manifest) {
manifest.activation?.onStartup === undefined &&
channels.length === 0 &&
!hasRuntimeContractSurface;
const commandAliasesActiveInThisProbe =
const activeInThisProbe =
manifest.activation?.onStartup === true ||
legacyImplicitStartupSidecar ||
channels.length > 0 ||
speechProviders.length > 0 ||
tools.length > 0;
speechProviders.length > 0;
return {
channels,
speechProviders,
tools,
commandAliasesActiveInThisProbe,
activeInThisProbe,
runtimeSlashAliases: commandAliases
.filter((alias) => alias?.kind === "runtime-slash")
.map((alias) => alias?.name)
@@ -347,7 +346,7 @@ async function runManifestProbes(plan, options) {
const status = await rpcCall("channels.status", { probe: false, timeoutMs: 2000 }, options);
assertChannelVisible(status, channel);
}
if (plan.runtimeSlashAliases.length > 0 && plan.commandAliasesActiveInThisProbe) {
if (plan.runtimeSlashAliases.length > 0 && plan.activeInThisProbe) {
const commands = await rpcCall("commands.list", { scope: "both", includeArgs: true }, options);
for (const alias of plan.runtimeSlashAliases) {
assertCommandVisible(commands, alias);
@@ -357,11 +356,15 @@ async function runManifestProbes(plan, options) {
`Runtime slash command smoke skipped for ${options.pluginId}: plugin is lazy in this probe`,
);
}
if (plan.tools.length > 0) {
if (plan.tools.length > 0 && plan.activeInThisProbe) {
const catalog = await rpcCall("tools.catalog", { includePlugins: true }, options);
for (const tool of plan.tools) {
assertToolVisible(catalog, tool);
}
} else if (plan.tools.length > 0) {
console.log(
`Runtime tool catalog smoke skipped for ${options.pluginId}: plugin is lazy in this probe`,
);
}
if (plan.speechProviders.length > 0) {
const providers = await rpcCall("tts.providers", {}, options);