support merging from codex, fix docker (#234)
This commit is contained in:
committed by
pullfrog[bot]
parent
6deeea7032
commit
eab198748a
+14
-60
@@ -2,27 +2,15 @@ import type { AgentResult, TestRunnerOptions, ValidationCheck } from "../utils.t
|
||||
import { defineFixture, generateAgentUuids, getStructuredOutput } from "../utils.ts";
|
||||
|
||||
/**
|
||||
* MCP merge tests - validate MCP server configuration with repo-level MCP configs present.
|
||||
* MCP merge test - validates repo-level MCP servers merge correctly with gh_pullfrog.
|
||||
*
|
||||
* uses GITHUB_REPOSITORY=pullfrog/test-repo-mcp which has robinMCP server.
|
||||
*
|
||||
* two variants:
|
||||
* - mcpmerge-full: validates repo-level MCP servers merge correctly with gh_pullfrog
|
||||
* (claude, cursor, gemini, opencode - agents that auto-discover repo MCPs)
|
||||
* - mcpmerge-pullfrog-only: validates gh_pullfrog remains available when repo has MCP config
|
||||
* (codex - doesn't auto-discover repo MCPs)
|
||||
* all agents should auto-discover repo-level MCP configs and merge them with gh_pullfrog.
|
||||
*/
|
||||
|
||||
// shared env for both tests
|
||||
const sharedEnv = {
|
||||
GITHUB_REPOSITORY: "pullfrog/test-repo-mcp",
|
||||
};
|
||||
const testUuids = generateAgentUuids(["PULLFROG_MCP_TEST"]);
|
||||
|
||||
// --- mcpmerge-full: test repo-level MCP discovery ---
|
||||
|
||||
const fullTestUuids = generateAgentUuids(["PULLFROG_MCP_TEST"]);
|
||||
|
||||
const fullFixture = defineFixture(
|
||||
const fixture = defineFixture(
|
||||
{
|
||||
prompt: `Call the get_test_value tool from the robinMCP server, then call set_output with the exact value returned.`,
|
||||
effort: "mini",
|
||||
@@ -30,10 +18,10 @@ const fullFixture = defineFixture(
|
||||
{ localOnly: true }
|
||||
);
|
||||
|
||||
function fullValidator(result: AgentResult): ValidationCheck[] {
|
||||
function validator(result: AgentResult): ValidationCheck[] {
|
||||
const output = getStructuredOutput(result);
|
||||
const setOutputCalled = output !== null;
|
||||
const expectedUuid = fullTestUuids.getUuid(result.agent, "PULLFROG_MCP_TEST");
|
||||
const expectedUuid = testUuids.getUuid(result.agent, "PULLFROG_MCP_TEST");
|
||||
const correctValue = setOutputCalled && output === expectedUuid;
|
||||
|
||||
return [
|
||||
@@ -42,46 +30,12 @@ function fullValidator(result: AgentResult): ValidationCheck[] {
|
||||
];
|
||||
}
|
||||
|
||||
// --- mcpmerge-pullfrog-only: test gh_pullfrog availability only ---
|
||||
|
||||
const baseFixture = defineFixture(
|
||||
{
|
||||
prompt: `Call set_output with "PULLFROG_MCP_WORKS".`,
|
||||
effort: "mini",
|
||||
},
|
||||
{ localOnly: true }
|
||||
);
|
||||
|
||||
function baseValidator(result: AgentResult): ValidationCheck[] {
|
||||
const output = getStructuredOutput(result);
|
||||
const setOutputCalled = output !== null;
|
||||
const correctValue = setOutputCalled && output === "PULLFROG_MCP_WORKS";
|
||||
|
||||
return [
|
||||
{ name: "set_output", passed: setOutputCalled },
|
||||
{ name: "correct_value", passed: correctValue },
|
||||
];
|
||||
}
|
||||
|
||||
// --- exports ---
|
||||
|
||||
export const tests: Record<string, TestRunnerOptions> = {
|
||||
"mcpmerge-full": {
|
||||
name: "mcpmerge-full",
|
||||
fixture: fullFixture,
|
||||
validator: fullValidator,
|
||||
tags: ["mcpmerge"],
|
||||
agents: ["claude", "cursor", "gemini", "opencode"],
|
||||
env: sharedEnv,
|
||||
agentEnv: fullTestUuids.agentEnv,
|
||||
fileAgentEnv: fullTestUuids.agentEnv,
|
||||
},
|
||||
"mcpmerge-pullfrog-only": {
|
||||
name: "mcpmerge-pullfrog-only",
|
||||
fixture: baseFixture,
|
||||
validator: baseValidator,
|
||||
tags: ["mcpmerge"],
|
||||
agents: ["codex"],
|
||||
env: sharedEnv,
|
||||
},
|
||||
export const test: TestRunnerOptions = {
|
||||
name: "mcpmerge",
|
||||
fixture,
|
||||
validator,
|
||||
tags: ["mcpmerge"],
|
||||
env: { GITHUB_REPOSITORY: "pullfrog/test-repo-mcp" },
|
||||
agentEnv: testUuids.agentEnv,
|
||||
fileAgentEnv: testUuids.agentEnv,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user