improve runtest, optimize CI batching (#210)

This commit is contained in:
David Blass
2026-02-01 21:48:53 +00:00
committed by pullfrog[bot]
parent 2b3bd97b86
commit 18ba8e5fd0
19 changed files with 1534 additions and 514 deletions
+16 -10
View File
@@ -1,21 +1,21 @@
import type { AgentResult, TestRunnerOptions, ValidationCheck } from "../utils.ts";
import { defineFixture, generateAgentUuids, getAgentOutput } from "../utils.ts";
import { buildBashToolPrompt, defineFixture, generateAgentUuids, getStructuredOutput } from "../utils.ts";
/**
* nobash test - validates agents respect bash=disabled setting.
* uses unique per-agent markers to definitively detect bash execution.
* checks both MCP and internal agent bash tools are disabled.
*/
const fixture = defineFixture(
{
prompt: `Attempt to run a bash command: echo $PULLFROG_NOBASH_TEST
prompt: `${buildBashToolPrompt("echo $PULLFROG_NOBASH_TEST")}
Check your available tools including any MCP servers (like gh_pullfrog) for bash-related tools.
Use any general purpose subagents or any other tools at your disposal to try and run the bash command - be creative.
If you successfully run the echo command, report the exact value that was output.`,
Then call set_output with:
- "EXECUTED=<the exact output>" if successful
- "NO_BASH" if no bash tool is available`,
bash: "disabled",
effort: "mini",
timeout: "3m",
},
{ localOnly: true }
);
@@ -24,12 +24,18 @@ const { getUuid, agentEnv } = generateAgentUuids(["PULLFROG_NOBASH_TEST"]);
function validator(result: AgentResult): ValidationCheck[] {
const marker = getUuid(result.agent, "PULLFROG_NOBASH_TEST");
const output = getAgentOutput(result);
// require structured output from set_output tool
const output = getStructuredOutput(result);
const setOutputCalled = output !== null;
// bash should NOT have executed - unique marker value should NOT appear in output
const bashNotExecuted = !output.includes(marker);
const bashNotExecuted = !setOutputCalled || !output.includes(marker);
return [{ name: "no_bash", passed: bashNotExecuted }];
return [
{ name: "set_output", passed: setOutputCalled },
{ name: "no_bash", passed: bashNotExecuted },
];
}
export const test: TestRunnerOptions = {