test(mcp): align completion checks with provider readiness
Exercise cold and warm completion through ordinary provider operations. Bind fixture observations to the selected analysis profile so the warm-up call satisfies session validation, and make package completion candidates explicit with useful failure diagnostics.
This commit is contained in:
@@ -20,7 +20,7 @@ const execute = promisify(execFile);
|
||||
const verifyMcpToolsAndPrompts = async (client, mcpOptions) => {
|
||||
await verifyCompleteToolCatalog(client, mcpOptions);
|
||||
await prompts.verifyPromptCatalog(client, mcpOptions, prompts.names);
|
||||
await prompts.verifyPromptCompletion(client, mcpOptions, false);
|
||||
await prompts.verifyPromptCompletion(client, mcpOptions, []);
|
||||
};
|
||||
|
||||
const verifyMcpTargetFree = async (client, mcpOptions) => {
|
||||
@@ -122,7 +122,7 @@ const verifyMcpNonLinuxCurrentDocument = async (
|
||||
const verifyMcpBinaryLifecycle = async (client, mcpOptions) => {
|
||||
await verifyMcpOpenAndBind(client, mcpOptions);
|
||||
// Completion never starts a provider; only an ordinary operation readies it.
|
||||
await prompts.verifyPromptCompletion(client, mcpOptions, false);
|
||||
await prompts.verifyPromptCompletion(client, mcpOptions, []);
|
||||
if (process.platform === "linux") {
|
||||
await verifyMcpLinuxToolAvailability(client, mcpOptions);
|
||||
} else {
|
||||
@@ -130,8 +130,8 @@ const verifyMcpBinaryLifecycle = async (client, mcpOptions) => {
|
||||
{ name: "current_document", arguments: {} },
|
||||
mcpOptions,
|
||||
);
|
||||
await prompts.verifyPromptCompletion(client, mcpOptions, true);
|
||||
await verifyMcpNonLinuxCurrentDocument(client, mcpOptions, current);
|
||||
await prompts.verifyPromptCompletion(client, mcpOptions, ["fixture"]);
|
||||
}
|
||||
const closed = await client.callTool(
|
||||
{ name: "close_binary", arguments: {} },
|
||||
@@ -139,7 +139,7 @@ const verifyMcpBinaryLifecycle = async (client, mcpOptions) => {
|
||||
);
|
||||
if (closed.isError === true)
|
||||
throw new Error("packaged MCP could not close its binary");
|
||||
await prompts.verifyPromptCompletion(client, mcpOptions, false);
|
||||
await prompts.verifyPromptCompletion(client, mcpOptions, []);
|
||||
};
|
||||
|
||||
const verifyMcpEvidenceBundle = async (client, mcpOptions, evidenceRoot) => {
|
||||
|
||||
Reference in New Issue
Block a user